Користувальницькькі налаштування

Налаштування сайту


software:os:linux:bash_config

Розбіжності

Тут показані розбіжності між вибраною ревізією та поточною версією сторінки.

Посилання на цей список змін

Наступна ревізія
Попередня ревізія
software:os:linux:bash_config [2020/05/11 01:09]
charon створено
software:os:linux:bash_config [2024/04/16 02:52] (поточний)
charon
Рядок 1: Рядок 1:
 ====== Bash configuration ====== ====== Bash configuration ======
-<code>+===== About Fedora 38 ===== 
 +Fedora checks //~/.bashrc.d/// existence and sources everything from it. So move files below to this directory as //main//, //aliases// and remove line 
 +  [ -f "$HOME/.bash_aliases" ] && source "$HOME/.bash_aliases" 
 +from main config   
 +===== Main config ===== 
 +<file bash .bashrc>
 ###################### ######################
 # Configure PATH ENV # # Configure PATH ENV #
 ###################### ######################
 # prepend additional user directories # prepend additional user directories
-export PATH="$PATH:/snap/bin:/usr/local/scripts:$HOME/bin:$HOME/.local/bin:$HOME/scripts"+export PATH="$PATH:/usr/local/scripts:$HOME/bin:$HOME/.local/bin:$HOME/scripts"
  
 ########################## ##########################
Рядок 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='$0.$LINENO+ ' export PS4='$0.$LINENO+ '
 +
 +################
 +# Autocomplete #
 +################
 +
 +# enable programmable completion features (you don't need to enable
 +# this, if it's already enabled in /etc/bash.bashrc and /etc/profile
 +# sources /etc/bash.bashrc).
 +if ! shopt -oq posix; then
 +  if [ -f /usr/share/bash-completion/bash_completion ]; then
 +    . /usr/share/bash-completion/bash_completion
 +  elif [ -f /etc/bash_completion ]; then
 +    . /etc/bash_completion
 +  fi
 +fi
 +
 +[ -f "$HOME/.local/bin/aws_completer" ] && complete -C "$HOME/.local/bin/aws_completer" aws
  
 ######## ########
Рядок 58: Рядок 80:
 export HISTSIZE=1000 export HISTSIZE=1000
 export HISTTIMEFORMAT="%t%d.%m.%y %H:%M:%S%t" export HISTTIMEFORMAT="%t%d.%m.%y %H:%M:%S%t"
 +export EDITOR=/usr/bin/vim.nox
 +export LESS="-e -X"
 +
 +export SSH_ASKPASS='/usr/bin/ksshaskpass'
 +export XDG_CONFIG_HOME=$HOME/.config
 +export XDG_CACHE_HOME=$HOME/.cache
 +export XDG_DATA_HOME=$HOME/.local/share
  
 [ -f "$HOME/.bash_aliases" ] && source "$HOME/.bash_aliases" [ -f "$HOME/.bash_aliases" ] && source "$HOME/.bash_aliases"
-</code>+</file> 
 +===== Aliases ===== 
 +<file bash .bash_aliases> 
 +alias ls="/bin/ls --color=never -F --group-directories-first" 
 +alias dir="ls -a" 
 +alias l="ls -la" 
 +alias cw="clear; w" 
 +alias x="exit" 
 +alias cls="clear" 
 +alias bc="bc -ql" 
 +alias tt=traceroute 
 + 
 +# Open last modified file in vim (not checked!) 
 +alias Vim="vim `ls -t | head -1`" 
 + 
 +# Find top 5 big files 
 +alias findbig="find . -type f -exec ls -s {} \; | sort -n -r | head -5" 
 + 
 +# To clear all the history and screen 
 +alias hcl='history -c; clear' 
 + 
 +# 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 ...='cd ../..' 
 + 
 +# Create and change to a new directory 
 +mcd () 
 +
 +   if [ "$1" == "" ]; then 
 +       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 "DEVICE PATH TYPE FLAGS" && mount | awk '$2=$4="";1') | column -t; } 
 +</file>
software/os/linux/bash_config.1589148548.txt.gz · Востаннє змінено: 2020/05/11 01:09 повз charon