.bash_aliases 852 B

12345678910111213141516171819202122232425262728293031323334353637
  1. theos=$(uname -s)
  2. case $theos in
  3. "Darwin" )
  4. alias ls='ls -G';;
  5. "Linux" )
  6. alias ls='ls --color=auto';;
  7. esac
  8. alias grep='grep --color -s'
  9. alias l='ls -lhatr'
  10. #alias ls='ls --color=auto'
  11. alias rm='rm -i'
  12. # Git stuff
  13. alias gdp='git diff --color HEAD^ HEAD'
  14. alias gl='git log --pretty=format:"%Cgreen%h %Creset %s %Cgreenby %an (%ar) %Cred %d" --graph'
  15. alias gdc='git diff --color'
  16. alias gst='git status'
  17. alias grp='git remote prune origin'
  18. # Docker
  19. alias dockerkillall='docker kill $(docker ps -q)'
  20. alias dockerdelall='docker rm $(docker ps -qa)'
  21. # export standard terminal for remote connections
  22. #alias ssh='export TERM=xterm && ssh'
  23. alias hexdump='hexdump -c'
  24. alias pwgen='pwgen -B -s'
  25. # open multiple files in tabs
  26. alias vim='vim -p'
  27. if [ $theos == "Darwin" ]; then
  28. alias flushdns='sudo killall -HUP mDNSResponder'
  29. fi