helm/bash/aliases

67 lines
1.5 KiB
Plaintext
Raw Normal View History

2014-09-21 07:10:47 -07:00
#!/bin/bash
2014-09-19 15:24:34 -07:00
alias q='exit'
alias clr='clear'
alias catn='cat -n' # cat + line numbers
2015-01-20 00:00:13 -08:00
# Allow sudo with aliases
alias sudo='sudo '
alias ls='ls -G'
alias l='ls -o'
alias la='ls -AGFoh'
2014-09-19 15:24:34 -07:00
# Command fixes
alias ln="${aliases[ln]:-ln} -v" # verbose ln
alias wget='wget -c' # Resume download if possible
2014-09-21 07:10:47 -07:00
alias rsyncd='rsync -va --delete' # Hard sync two directories
2014-09-19 15:24:34 -07:00
# Shortcut for git
2015-01-20 00:00:13 -08:00
is-callable hub && alias git='hub'
g() { [ $# -eq 0 ] && git status --short || git $* }
2014-09-21 07:10:47 -07:00
2014-09-19 15:24:34 -07:00
alias gi='git init'
alias ga='git add'
alias gap='git add --patch'
alias gc='git commit --verbose'
alias gcm='git commit --verbose -m'
alias gco='git checkout'
alias gcl='git clone'
alias gp='git push'
alias gpl='git pull'
alias gb='git branch'
alias gt='git tag'
2014-09-22 09:06:02 -07:00
alias gs='git status --short'
alias gS='git status'
2014-09-19 15:24:34 -07:00
alias gr='git reset "HEAD^"'
alias gd='git diff'
if is-callable 'tmux'; then
2014-12-13 16:35:07 -08:00
alias t='tmux'
2014-09-19 15:24:34 -07:00
2014-12-13 16:35:07 -08:00
# Start new session or create a grouped session so I'm not simply watching
# the same session in both windows.
alias ta='tmux new -s $(hostname) || tmux new -t $(hostname) -s $(hostname)-2 || tmux attach -t "io-2"'
function ts {
tmux send-keys "$*"
2014-09-19 15:24:34 -07:00
}
2014-12-13 16:35:07 -08:00
alias tls='tmux ls'
# New instance attached to old session
alias tn='tmux new-session -t "x"'
2014-09-19 15:24:34 -07:00
fi
alias va='vagrant'
alias rk='rake'
alias rkg='rake -g'
# Interpreters
alias rb='ruby'
alias rbe='rbenv'
2014-11-18 22:22:08 -08:00
alias b='bundle'
2014-09-19 15:24:34 -07:00
alias be='bundle exec'
2014-12-13 16:35:07 -08:00
alias bi='bundle install --path vendor'
2014-09-19 15:24:34 -07:00
alias py='python'
alias pye='pyenv'
2014-12-13 16:35:07 -08:00
alias pyi='ipython'