2016-11-10 10:37:15 -08:00
|
|
|
#
|
2016-11-16 06:06:41 -08:00
|
|
|
# These aliases are common to Bash and Zsh shells
|
2016-11-10 10:37:15 -08:00
|
|
|
#
|
|
|
|
|
2016-10-19 07:56:37 -07:00
|
|
|
alias q='exit'
|
|
|
|
alias clr='clear'
|
|
|
|
alias sudo='sudo '
|
|
|
|
|
2016-12-23 00:13:21 -08:00
|
|
|
alias ..='cd ..'
|
|
|
|
alias ...='cd ../..'
|
|
|
|
alias ....='cd ../../..'
|
|
|
|
alias -- -='cd -'
|
2016-10-19 07:56:37 -07:00
|
|
|
|
2016-11-10 09:35:10 -08:00
|
|
|
alias ln="${aliases[ln]:-ln} -v" # verbose ln
|
2016-12-23 00:13:21 -08:00
|
|
|
alias l='ls -1'
|
|
|
|
alias ll='ls -l'
|
|
|
|
alias la='ls -la'
|
2016-10-19 07:56:37 -07:00
|
|
|
|
2016-11-16 06:08:36 -08:00
|
|
|
# notify me before clobbering files
|
|
|
|
alias rm='rm -i'
|
|
|
|
alias cp='cp -i'
|
|
|
|
alias mv='mv -i'
|
|
|
|
|
|
|
|
alias gurl='curl --compressed'
|
|
|
|
alias mkdir='mkdir -p'
|
|
|
|
alias rsyncd='rsync -va --delete' # Hard sync two directories
|
|
|
|
alias wget='wget -c' # Resume dl if possible
|
|
|
|
|
|
|
|
alias pubkey='cat ~/.ssh/id_rsa.pub'
|
|
|
|
|
|
|
|
alias yd='youtube-dl'
|
|
|
|
alias ydm='youtube-dl --extract-audio --audio-format aac'
|
|
|
|
|
|
|
|
# Always enable colored `grep` output
|
|
|
|
# Note: `GREP_OPTIONS="--color=auto"` is deprecated, hence the alias usage.
|
|
|
|
alias grep='grep --color=auto'
|
|
|
|
alias fgrep='fgrep --color=auto'
|
|
|
|
alias egrep='egrep --color=auto'
|
|
|
|
|
|
|
|
alias mk='make'
|
|
|
|
alias exe='exercism'
|
2016-11-10 09:35:10 -08:00
|
|
|
|
|
|
|
# For example, to list all directories that contain a certain file: find . -name
|
|
|
|
# .gitattributes | map dirname
|
|
|
|
alias map="xargs -n1"
|
|
|
|
|
|
|
|
take() { mkdir "$1" && cd "$1"; }
|
|
|
|
hex() { echo -n $@ | xxd -psdu; }
|
2016-11-16 06:08:36 -08:00
|
|
|
|
|
|
|
if command -v compdef >/dev/null; then
|
|
|
|
compdef take=mkdir
|
|
|
|
fi
|