bashrc 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. #-------------------------------------------------------------
  2. # Source global definitions (if any)
  3. #-------------------------------------------------------------
  4. if [ -f /etc/bashrc ]; then
  5. . /etc/bashrc # --> Read /etc/bashrc, if present.
  6. fi
  7. if [ -f /etc/bash_completion ]; then
  8. . /etc/bash_completion
  9. fi
  10. export EDITOR=vim
  11. export TERM=xterm-256color
  12. # https://wiki.archlinux.org/index.php/Bash#Additional_programs_and_options_manually
  13. complete -cf sudo
  14. complete -cf man
  15. # https://wiki.archlinux.org/index.php/Bash#Auto_.22cd.22_when_entering_just_a_path
  16. shopt -s autocd
  17. # Only load Liquid Prompt in interactive shells, not from a script or from scp
  18. [[ $- = *i* ]] && source ~/.liquidprompt/liquidprompt
  19. alias ls='ls -lsh --color=always --group-directories-first --time-style=+"%d.%m.%Y %H:%M"'
  20. alias la='ls -lsha --color=always --group-directories-first --time-style=+"%d.%m.%Y %H:%M"'
  21. alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'''
  22. alias grep='grep --color=tty -d skip'
  23. alias cp="cp -i" # confirm before overwriting something
  24. alias df="df -kTh" # human-readable sizes
  25. alias free='free -m' # show sizes in MB
  26. alias sys='sudo systemctl'
  27. alias ggraph="git log --graph --abbrev-commit --decorate=no --format=format:'%C(bold yellow)%ai%C(reset)%C(yellow)(%ar)%C(reset)%C(auto)%+d%C(reset)%n''%C(dim white)%an%C(reset)%n''%C(bold white)%B%C(reset)%C(blue)%H%C(reset)%n' --all"