68 lines
1.3 KiB
Bash
68 lines
1.3 KiB
Bash
#!/bin/zsh
|
|
|
|
# GIT
|
|
if command_exists 'git'; then
|
|
alias ga='git add'
|
|
alias gap='git add --patch'
|
|
alias gt='git tag'
|
|
alias gtl='git describe --tags --abbrev=0'
|
|
# alias gpb='git push origin'
|
|
|
|
git-move-root() {
|
|
git filter-branch --subdirectory-filter "$@" --prune-empty -- --all
|
|
}
|
|
fi
|
|
|
|
# OS-specific aliases
|
|
if [[ "$OSTYPE" != darwin* ]]; then
|
|
alias b='brew'
|
|
alias v='vim'
|
|
# Open file in emacs server; must be running!
|
|
alias e="emacsclient -n"
|
|
else
|
|
alias ipt='sudo iptables'
|
|
fi
|
|
|
|
# transmission-remote
|
|
if command_exists 'transmission-remote'; then
|
|
alias bt="transmission-remote server"
|
|
alias btl="bt -l"
|
|
alias bta="bt --add"
|
|
|
|
btr() { bt -t$1 -r }
|
|
bts() { bt -t$1 -S }
|
|
fi
|
|
|
|
alias va='vagrant'
|
|
|
|
# Interpreters
|
|
alias rbe='rbenv'
|
|
alias rb='ruby'
|
|
alias pye='pyenv'
|
|
alias py='python'
|
|
alias py3='python3'
|
|
[ -e /Applications/love.app ] && alias love="/Applications/love.app/Contents/MacOS/love"
|
|
|
|
# Shell conveniences
|
|
alias \\q='exit'
|
|
|
|
alias sha1='openssl sha1'
|
|
alias header='curl -I'
|
|
|
|
# Resume download if possible
|
|
alias wget='wget -c'
|
|
|
|
# Lets us sudo aliases
|
|
alias sudo='sudo '
|
|
|
|
# Make a directory and change to it
|
|
function mkd { mkdir "$@" && cd "$@" }
|
|
|
|
alias c='clear'
|
|
alias r='noglob rake -g'
|
|
|
|
# Disable zsh glob syntax on the rake command
|
|
alias rake='noglob rake'
|
|
|
|
# vim:set ft=zsh:
|