alias 1.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  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. ### Universal 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. alias filetree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'"
  12. ## not sure this is still needed, but might $DISPLAY
  13. alias reset_display='export DISPLAY=$(tmux showenv|grep ^DISPLAY|cut -d = -f 2)'
  14. ## Make ed more usable, command mode is now ':' like vi
  15. alias ed='ed -p:'
  16. ## Good for sending dirs from server to remote server
  17. alias rsy='rsync -avSPRh'
  18. ## This one is for copying off the network shares.
  19. alias rsyz='rsync -rltDvSPRh'
  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. ### qmv ### {{{
  27. if [[ $(command -v qmv) ]]; then
  28. ## Makes qmv more usable, and regex-able
  29. alias qm='qmv --format=destination-only'
  30. fi
  31. ### End qmv ### }}}
  32. ### pinfo ### {{{
  33. if [[ $(command -v pinfo) ]]; then
  34. ## Use color pinfo instead of info
  35. alias info='pinfo'
  36. fi
  37. ### End pinfo ### }}}
  38. ### Git Aliases ### {{{
  39. alias git_force_reset='git fetch --all && git reset --hard origin/master'
  40. ### End Git Aliases ### }}}
  41. ### Docker ### {{{
  42. if [[ $(command -v docker) ]]; then
  43. ## find last docker container
  44. alias dl='docker ps -l -q'
  45. fi
  46. ### End Docker ### }}}
  47. ### End Universal Aliases ### }}}