alias 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869
  1. ##### My (demuredemeanor) bashrc sub source alias script
  2. # Uses tabstop=4; shiftwidth=4 tabs; foldmarker={{{,}}};
  3. # https://notabug.org/demure/dotfiles/
  4. # legacy repo http://github.com/demure/dotfiles
  5. # vim:set syntax=sh:
  6. ### Misc Aliases ### {{{
  7. ## Remove OS X 'junk' files
  8. alias rmds='find . -name ".DS_Store" -depth -exec rm -i {} \;'
  9. alias rmd_='find . -iname '._*' -exec rm -rf {} \;'
  10. ## Show ls -R with readable depth
  11. ## From http://xmodulo.com/useful-bash-aliases-functions.html
  12. alias filetree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'"
  13. ## List programs connected to network
  14. ## From http://xmodulo.com/useful-bash-aliases-functions.html
  15. alias listen="lsof -P -i -n"
  16. ## not sure this is still needed, but might $DISPLAY
  17. alias reset_display='export DISPLAY=$(tmux showenv|grep ^DISPLAY|cut -d = -f 2)'
  18. ## Make ed more usable, command mode is now ':' like vi
  19. alias ed='ed -p:'
  20. ## Preserve user conf while sudoing vim
  21. alias svi='sudo -E vim'
  22. ## Delete duplicate lines from file name augment
  23. alias deldup="awk '!x[$0]++' "
  24. ## Shortcut for wicd-curses
  25. alias wic='wicd-curses'
  26. ### End Misc Aliases ### }}}
  27. ### rsync Aliases ### {{{
  28. ## Old rsync alias
  29. alias rsy='rsync -avrSPXRh'
  30. ## Good for sending dirs from server to remote server
  31. alias rsy1='rsync -avSPRh'
  32. ## This one is for copying off the network shares.
  33. alias rsy2='rsync -rltDvSPRh'
  34. ### End rsync Aliases ### }}}
  35. ### qmv ### {{{
  36. if [[ $(command -v qmv) ]]; then
  37. ## Makes qmv more usable, and regex-able
  38. alias qm='qmv --format=destination-only'
  39. fi
  40. ### End qmv ### }}}
  41. ### pinfo ### {{{
  42. if [[ $(command -v pinfo) ]]; then
  43. ## Use color pinfo instead of info
  44. alias info='pinfo'
  45. fi
  46. ### End pinfo ### }}}
  47. ### Git Aliases ### {{{
  48. alias git_force_reset='git fetch --all && git reset --hard origin/master'
  49. ### End Git Aliases ### }}}
  50. ### Docker ### {{{
  51. if [[ $(command -v docker) ]]; then
  52. ## find last docker container
  53. alias dl='docker ps -l -q'
  54. fi
  55. ### End Docker ### }}}