.bashrc (995B)
1 # .bashrc 2 3 # Source global definitions 4 if [ -f /etc/bashrc ]; then 5 . /etc/bashrc 6 fi 7 8 # User specific environment 9 if ! [[ "$PATH" =~ "$HOME/.local/bin:$HOME/bin:" ]]; then 10 PATH="$HOME/.local/bin:$HOME/bin:$PATH" 11 fi 12 export PATH 13 14 # Uncomment the following line if you don't like systemctl's auto-paging feature: 15 # export SYSTEMD_PAGER= 16 17 # User specific aliases and functions 18 if [ -d ~/.bashrc.d ]; then 19 for rc in ~/.bashrc.d/*; do 20 if [ -f "$rc" ]; then 21 . "$rc" 22 fi 23 done 24 fi 25 unset rc 26 27 # 28 # Custom 29 # 30 __prompt() { 31 local c=$? 32 PS1='\n' 33 ((c)) && PS1+="\[\e[91m\][$c]\[\e[0m\] " 34 PS1+='\[\e[92m\]\u\[\e[97m\]@\[\e[92m\]\h\[\e[97m\]:\[\e[94m\]\w/\[\e[97m\]>\[\e[0m\] ' 35 } 36 PROMPT_COMMAND=__prompt 37 38 # Makes Emacs' vterm work. 39 if [[ "$INSIDE_EMACS" = 'vterm' ]] \ 40 && [[ -n ${EMACS_VTERM_PATH} ]] \ 41 && [[ -f ${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh ]]; then 42 source ${EMACS_VTERM_PATH}/etc/emacs-vterm-bash.sh 43 fi 44 45 alias make='make -j$(nproc)'