Тут показані розбіжності між вибраною ревізією та поточною версією сторінки.
| Порівняння попередніх версій Попередня ревізія Наступна ревізія | Попередня ревізія | ||
|
software:os:linux:bash_config [2020/05/11 01:11] charon |
software:os:linux:bash_config [2024/04/16 02:52] (поточний) charon |
||
|---|---|---|---|
| Рядок 1: | Рядок 1: | ||
| ====== Bash configuration ====== | ====== Bash configuration ====== | ||
| + | ===== About Fedora 38 ===== | ||
| + | Fedora checks // | ||
| + | [ -f " | ||
| + | from main config | ||
| + | ===== Main config ===== | ||
| <file bash .bashrc> | <file bash .bashrc> | ||
| ###################### | ###################### | ||
| Рядок 5: | Рядок 10: | ||
| ###################### | ###################### | ||
| # prepend additional user directories | # prepend additional user directories | ||
| - | export PATH=" | + | export PATH=" |
| ########################## | ########################## | ||
| Рядок 52: | Рядок 57: | ||
| # The PS4 shell variable defines the prompt that gets displayed, when you execute a shell script in debug mode | # The PS4 shell variable defines the prompt that gets displayed, when you execute a shell script in debug mode | ||
| export PS4=' | export PS4=' | ||
| + | |||
| + | ################ | ||
| + | # Autocomplete # | ||
| + | ################ | ||
| + | |||
| + | # enable programmable completion features (you don't need to enable | ||
| + | # this, if it's already enabled in / | ||
| + | # sources / | ||
| + | if ! shopt -oq posix; then | ||
| + | if [ -f / | ||
| + | . / | ||
| + | elif [ -f / | ||
| + | . / | ||
| + | fi | ||
| + | fi | ||
| + | |||
| + | [ -f " | ||
| ######## | ######## | ||
| Рядок 58: | Рядок 80: | ||
| export HISTSIZE=1000 | export HISTSIZE=1000 | ||
| export HISTTIMEFORMAT=" | export HISTTIMEFORMAT=" | ||
| + | export EDITOR=/ | ||
| + | export LESS=" | ||
| + | |||
| + | export SSH_ASKPASS='/ | ||
| + | export XDG_CONFIG_HOME=$HOME/ | ||
| + | export XDG_CACHE_HOME=$HOME/ | ||
| + | export XDG_DATA_HOME=$HOME/ | ||
| [ -f " | [ -f " | ||
| + | </ | ||
| + | ===== Aliases ===== | ||
| + | <file bash .bash_aliases> | ||
| + | alias ls="/ | ||
| + | alias dir=" | ||
| + | alias l=" | ||
| + | alias cw=" | ||
| + | alias x=" | ||
| + | alias cls=" | ||
| + | alias bc=" | ||
| + | alias tt=traceroute | ||
| + | |||
| + | # Open last modified file in vim (not checked!) | ||
| + | alias Vim=" | ||
| + | |||
| + | # Find top 5 big files | ||
| + | alias findbig=" | ||
| + | |||
| + | # To clear all the history and screen | ||
| + | alias hcl=' | ||
| + | |||
| + | # Make basic commands verbose | ||
| + | alias cp="cp -v" | ||
| + | alias rm="rm -v" | ||
| + | alias mv="mv -v" | ||
| + | |||
| + | # To navigate to the different directories | ||
| + | alias ..='cd ..' | ||
| + | alias ...=' | ||
| + | |||
| + | # Create and change to a new directory | ||
| + | mcd () | ||
| + | { | ||
| + | if [ " | ||
| + | echo "mcd directory-name"; | ||
| + | else | ||
| + | if [ ! -d $1 ]; then | ||
| + | mkdir $1; | ||
| + | cd $1; | ||
| + | else | ||
| + | echo "$1 directory exists"; | ||
| + | fi; | ||
| + | fi | ||
| + | } | ||
| + | # display currently mounted file systems nicely | ||
| + | showmounted() { (echo " | ||
| </ | </ | ||