bashrc 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263
  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. PATH="$(ruby -e 'print Gem.user_dir')/bin:$PATH"
  11. export EDITOR=vim
  12. export TERM=xterm-256color
  13. # https://wiki.archlinux.org/index.php/Bash#Additional_programs_and_options_manually
  14. complete -cf sudo
  15. complete -cf man
  16. bind '"\e[A": history-search-backward'
  17. bind '"\e[B": history-search-forward'
  18. # https://wiki.archlinux.org/index.php/Bash#Auto_.22cd.22_when_entering_just_a_path
  19. shopt -s autocd
  20. # Only load Liquid Prompt in interactive shells, not from a script or from scp
  21. [[ $- = *i* ]] && source ~/.liquidprompt/liquidprompt
  22. alias ls='ls -lsh --color=always --group-directories-first --time-style=+"%d.%m.%Y %H:%M"'
  23. alias la='ls -lsha --color=always --group-directories-first --time-style=+"%d.%m.%Y %H:%M"'
  24. alias lr='ls -R | grep ":$" | sed -e '\''s/:$//'\'' -e '\''s/[^-][^\/]*\//--/g'\'' -e '\''s/^/ /'\'' -e '\''s/-/|/'\'''
  25. alias grep='grep --color=tty -d skip'
  26. alias cp="cp -i" # confirm before overwriting something
  27. alias df="df -kTh" # human-readable sizes
  28. alias free='free -m' # show sizes in MB
  29. alias sys='sudo systemctl'
  30. alias mysqlr='mysql -u root -p'
  31. 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"
  32. starthttpd ()
  33. {
  34. sudo systemctl start httpd
  35. sudo systemctl start mysqld
  36. }
  37. if [ -f ~/.private-aliases ]; then
  38. . ~/.private-aliases
  39. fi