helm/zsh/aliases
2013-08-04 05:04:22 -04:00

87 lines
1.6 KiB
Bash

#############
# Aliases #
#############
if is_mac; then
alias ls='ls -G'
else
alias ls='ls -G --color'
fi
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'
# Resume download if possible
alias wget='wget -c'
alias rb='ruby'
alias py='python'
alias js='node'
if is_mac; then
alias love="/Applications/love.app/Contents/MacOS/love"
fi
# tmux
alias t='tmux'
alias tn='tmux new -s'
alias ta='tmux attach -t'
alias tl='tmux list-sessions'
alias td='tmux detach'
# git
# 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'
# Laravel
alias artisan='php artisan'
alias bob='php artisan bob::build'
# debug
alias header='curl -I'
# directory shortcuts
alias dot='cd ~/.dotfiles'
if is_linux; then
# Safety nets
alias mv='mv -i'
alias cp='cp -i'
alias ln='ln -i'
# do not delete / or prompt if deleting more than 3 files at a time #
alias rm='rm -I --preserve-root'
alias chown='chown --preserve-root'
alias chmod='chmod --preserve-root'
alias chgrp='chgrp --preserve-root'
# iptables
alias ipt='sudo iptables'
elif is_mac; then
alias brewp='cd `brew --prefix`'
fi
# vim
if [[ ! -n $SSH_CLIENT ]]; then
if command_exists mvim; then
alias v='mvim'
else
alias v='gvim'
fi
else
alias v='vim'
fi
# vagrant
alias va='vagrant'
# vim:set ft=zsh: