helm/zsh/aliases
Henrik Lissner 91ebf6e21f Clean up zsh rcfiles + add py|rbenv init
* Made PATH initializing smarter
* zsh rcfiles are no longer fired twice (thanks to zshenv)
* Introduced speculative rb|pyenv support
* General cleanup all around
2014-03-29 17:56:33 -04:00

86 lines
1.6 KiB
Bash

# GIT
if command_exists 'git'; then
# On top of oh-my-zsh's git aliases
alias gs='git status'
alias gst='git stash'
alias gap='git add -p'
alias gf='git ls-files | grep -i'
alias gt='git tag'
alias gtl='git describe --tags --abbrev=0'
# find oh-my-zsh's here: ~/.oh-my-zsh/plugins/git/git.plugin.zsh
fi
# Tmux
command_exists 'tmux' && alias t='tmux'
# transmission-remote
if command_exists 'transmission-remote'; then
alias bt="transmission-remote server"
alias btl="bt -l"
alias bta="bt --add"
function btr {
bt -t$1 -r
}
fi
alias va='vagrant'
# Interpreters
command_exists "ruby" && alias rb='ruby'
command_exists "rbenv" && alias re='rbenv'
command_exists "python" && alias py='python'
command_exists "node" && alias js='node'
if [ -e /Applications/love.app ]; then
alias love="/Applications/love.app/Contents/MacOS/love"
fi
# Shell conveniences
alias l='ls -1'
alias ll='ls -l'
alias la='ls -la'
alias l.='ls -Ad .*'
alias du='du -h -d 1'
alias q='exit'
alias sha1='openssl sha1'
alias mkdir='mkdir -pv'
alias header='curl -I'
# Resume download if possible
alias wget='wget -c'
# Lets us sudo aliases
alias sudo='sudo '
if is_linux; then
alias ls='ls --color'
alias ipt='sudo iptables'
elif is_mac; then
alias ls='ls -G'
alias b='brew'
alias ql='quicklook'
function o {
if [ $# -eq 0 ]; then
open .
else
open "$@"
fi
}
fi
alias v="vim"
# Make a directory and change to it
function mkd {
mkdir "$@" && cd "$@"
}
alias reload='exec $SHELL -l'
alias c='clear'
# vim:set ft=zsh: