123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869 |
- ##### My (demuredemeanor) bashrc sub source alias script
- # Uses tabstop=4; shiftwidth=4 tabs; foldmarker={{{,}}};
- # https://notabug.org/demure/dotfiles/
- # legacy repo http://github.com/demure/dotfiles
- # vim:set syntax=sh:
- ### Misc Aliases ### {{{
- ## Remove OS X 'junk' files
- alias rmds='find . -name ".DS_Store" -depth -exec rm -i {} \;'
- alias rmd_='find . -iname '._*' -exec rm -rf {} \;'
- ## Show ls -R with readable depth
- ## From http://xmodulo.com/useful-bash-aliases-functions.html
- alias filetree="ls -R | grep ":$" | sed -e 's/:$//' -e 's/[^-][^\/]*\//--/g' -e 's/^/ /' -e 's/-/|/'"
- ## List programs connected to network
- ## From http://xmodulo.com/useful-bash-aliases-functions.html
- alias listen="lsof -P -i -n"
- ## not sure this is still needed, but might $DISPLAY
- alias reset_display='export DISPLAY=$(tmux showenv|grep ^DISPLAY|cut -d = -f 2)'
- ## Make ed more usable, command mode is now ':' like vi
- alias ed='ed -p:'
- ## Preserve user conf while sudoing vim
- alias svi='sudo -E vim'
- ## Delete duplicate lines from file name augment
- alias deldup="awk '!x[$0]++' "
- ## Shortcut for wicd-curses
- alias wic='wicd-curses'
- ### End Misc Aliases ### }}}
- ### rsync Aliases ### {{{
- ## Old rsync alias
- alias rsy='rsync -avrSPXRh'
- ## Good for sending dirs from server to remote server
- alias rsy1='rsync -avSPRh'
- ## This one is for copying off the network shares.
- alias rsy2='rsync -rltDvSPRh'
- ### End rsync Aliases ### }}}
- ### qmv ### {{{
- if [[ $(command -v qmv) ]]; then
- ## Makes qmv more usable, and regex-able
- alias qm='qmv --format=destination-only'
- fi
- ### End qmv ### }}}
- ### pinfo ### {{{
- if [[ $(command -v pinfo) ]]; then
- ## Use color pinfo instead of info
- alias info='pinfo'
- fi
- ### End pinfo ### }}}
- ### Git Aliases ### {{{
- alias git_force_reset='git fetch --all && git reset --hard origin/master'
- ### End Git Aliases ### }}}
- ### Docker ### {{{
- if [[ $(command -v docker) ]]; then
- ## find last docker container
- alias dl='docker ps -l -q'
- fi
- ### End Docker ### }}}
|