alias 1.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  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. ## grep alias
  8. # added due to death of GREP_OPTIONS
  9. alias grep='grep --color=auto --exclude-dir=.cvs --exclude-dir=.git --exclude-dir=.hg --exclude-dir=.svn'
  10. ## Remove OS X 'junk' files
  11. alias rmds='find . -name ".DS_Store" -depth -exec rm -i {} \;'
  12. ## Show ls -R with readable depth
  13. alias filetree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'"
  14. ## not sure this is still needed, but might $DISPLAY
  15. alias reset_display='export DISPLAY=$(tmux showenv|grep ^DISPLAY|cut -d = -f 2)'
  16. ## Make ed more usable, command mode is now ':' like vi
  17. alias ed='ed -p:'
  18. ## Good for sending dirs from server to remote server
  19. alias rsy='rsync -avrSPXRh'
  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. ### qmv ### {{{
  25. if [[ $(command -v qmv) ]]; then
  26. ## Makes qmv more usable, and regex-able
  27. alias qm='qmv --format=destination-only'
  28. fi
  29. ### End qmv ### }}}
  30. ### pinfo ### {{{
  31. if [[ $(command -v pinfo) ]]; then
  32. ## Use color pinfo instead of info
  33. alias info='pinfo'
  34. fi
  35. ### End pinfo ### }}}
  36. ### Git Aliases ### {{{
  37. alias git_force_reset='git fetch --all && git reset --hard origin/master'
  38. ### End Git Aliases ### }}}
  39. ### Docker ### {{{
  40. if [[ $(command -v docker) ]]; then
  41. ## find last docker container
  42. alias dl='docker ps -l -q'
  43. fi
  44. ### End Docker ### }}}
  45. ### End Universal Aliases ### }}}