dotfiles/zsh/aliases

264 lines
8.1 KiB
Plaintext
Raw Normal View History

2013-07-07 21:25:47 +00:00
# Handle the fact that this file will be used with multiple OSs
platform=`uname`
if [[ $platform == 'Linux' ]]; then
2015-12-06 05:15:13 +00:00
alias l='ls -lhg --color'
alias ll='ls -lahg --color'
2016-10-23 16:45:42 +00:00
alias flux='redshift'
2013-07-07 21:25:47 +00:00
elif [[ $platform == 'Darwin' ]]; then
2013-07-07 21:30:11 +00:00
alias l='ls -laG'
2015-02-24 04:34:00 +00:00
alias ls='ls -laG'
2013-07-07 21:30:11 +00:00
alias ll='ls -lG'
2017-02-16 20:54:10 +00:00
else
alias python='winpty python.exe'
2017-02-18 15:49:56 +00:00
alias python3='winpty python.exe'
2013-07-07 21:25:47 +00:00
fi
2013-07-07 21:30:11 +00:00
alias c='cd'
2015-10-16 05:11:24 +00:00
alias c-='cd -'
alias cd-='echo "Use c- instead"'
2013-07-07 21:30:11 +00:00
alias ..='cd ../'
alias ...='cd ../..'
alias cd..='cd ..'
alias cd...='cd ../..'
alias cd....='cd ../../..'
alias cd.....='cd ../../../..'
alias aliases='vim ~/.dotfiles/zsh/aliases'
2014-06-25 16:41:29 +00:00
alias al='aliases'
2013-07-10 16:13:13 +00:00
alias b='bundle'
2013-07-07 21:25:47 +00:00
alias be='bundle exec'
alias bi='bundle install'
2014-06-25 16:41:29 +00:00
alias br='bundle exec rake'
2013-07-07 21:30:11 +00:00
alias beg='bundle exec guard'
2014-05-17 19:31:36 +00:00
alias bl='brew link --overwrite'
alias bld='brew link --overwrite --dry-run'
2013-09-16 20:55:52 +00:00
alias bower='noglob bower'
2013-07-07 21:25:47 +00:00
alias bu='bundle update'
2014-03-07 20:00:19 +00:00
alias bo='bundle open'
2016-12-12 04:53:07 +00:00
alias chrome='google-chrome-stable'
alias clipboard='xclip -selection c'
alias cloc='cloc --no3 --by-file-by-lang .'
2013-07-07 21:30:11 +00:00
alias cls=clear
2013-07-07 21:25:47 +00:00
alias code='cd ~/code'
alias cpr='cp -r'
2015-02-24 04:34:00 +00:00
alias cw='compass watch'
2016-04-14 13:34:42 +00:00
alias dc='gdc'
2015-10-16 05:11:24 +00:00
alias dot='cd ~/.'
2013-07-07 21:30:11 +00:00
alias duh='du -csh'
alias functions='vim ~/.dotfiles/zsh/functions'
2013-07-10 16:13:13 +00:00
alias f='fg'
2014-05-17 19:31:36 +00:00
alias gib='gem install bundler'
2013-07-10 16:13:13 +00:00
alias history='fc -l 1'
2014-03-07 20:00:19 +00:00
alias histroy='history'
2013-07-10 16:13:13 +00:00
alias h='heroku'
2014-06-25 16:41:29 +00:00
alias ho='heroku open'
2014-09-30 00:51:23 +00:00
alias hc='heroku config'
2014-06-25 16:41:29 +00:00
alias hca='heroku config:add'
2014-09-30 00:51:23 +00:00
alias hcu='heroku config:unset'
2015-10-16 05:11:24 +00:00
alias hcr='heroku config:unset'
alias hl='heroku logs -t -n 5000'
2016-10-31 00:52:08 +00:00
alias hmo='heroku maintenance:on'
alias hmoo='heroku maintenance:off'
2016-10-23 16:45:42 +00:00
alias hr='heroku releases'
alias hrs='heroku restart'
2016-12-16 13:46:59 +00:00
alias hscale='heroku ps:scale '
2013-07-10 16:13:13 +00:00
alias irb='irb --readline -r irb/completion'
2015-02-24 04:34:00 +00:00
alias lcc='lein clean'
alias lca='lein cljsbuild auto dev'
alias ldi='lein deps install'
2014-06-25 16:41:29 +00:00
alias li='lineman'
alias lir='lineman run'
alias lib='lineman build'
alias lig='lineman grunt'
alias lis='lineman spec'
alias lic='lineman spec-ci'
2015-02-24 04:34:00 +00:00
alias lsd='lein start-dev'
2014-09-30 00:51:23 +00:00
alias mc='mvn compile'
alias mct='mvn test'
alias mi='mvn install'
alias mci='mvn clean install'
alias mp='mvn package'
alias mcp='mvn clean package'
2016-01-18 20:50:23 +00:00
alias opensource='cd ~/.personal-files/dev/open-source'
2013-07-10 16:13:13 +00:00
alias patch='git format-patch HEAD^ --stdout > patch.diff'
2015-11-17 22:01:42 +00:00
alias pi='yaourt -S' # wrapper around Arch Pacman
alias po='pacman -Qdt' # see orphaned packages
2017-01-15 02:07:11 +00:00
alias pr='yaourt -R' # giving me trouble now
2016-10-23 16:45:42 +00:00
alias prr='pacman -Rdd'
2016-04-14 13:34:42 +00:00
alias pss='sudo pacman -Syu'
alias pu='yaourt -U'
2013-07-10 16:13:13 +00:00
alias reguard='killall -9 ruby ; guard'
alias r='rails'
2014-06-25 16:41:29 +00:00
alias rr='bundle exec rake release'
alias rb='rbenv'
2014-03-07 20:00:19 +00:00
alias rbg='rbenv gemset active'
2014-02-17 07:00:21 +00:00
alias rbp='cd $RBENV_PATH/versions/$(rbenv version | sed -e "s/ (set.*$//")'
alias rbl='cd $RBENV_PATH/versions/$(rbenv version | sed -e "s/ (set.*$//")/lib/ruby'
2014-01-25 04:04:23 +00:00
alias rg='rails generate'
2014-05-17 19:31:36 +00:00
alias rl='reload'
2013-07-16 23:36:06 +00:00
alias rmr='rm -rf'
2013-07-10 16:13:13 +00:00
alias rc='rails console'
2013-07-29 14:41:32 +00:00
alias rs='rails server'
2013-07-10 16:13:13 +00:00
alias reload='source ~/.zshrc'
2016-10-23 16:45:42 +00:00
alias restart='sudo shutdown now -r'
2014-02-17 07:00:21 +00:00
alias s='cd ~/.ssh'
alias sc='vim ~/.ssh/config'
2016-12-12 04:53:07 +00:00
alias stream='streamlink --player mpv'
2016-10-23 16:45:42 +00:00
alias shutdown='sudo shutdown now'
2014-09-30 00:51:23 +00:00
alias t='tree'
2013-07-10 16:13:13 +00:00
alias u='cd ..'
alias v='vim'
alias vi='vim'
alias vim='vim'
2014-09-30 00:51:23 +00:00
alias vh='vagrant halt'
alias vs='vagrant ssh'
alias vu='vagrant up'
alias vimrc='vim ~/.vimrc'
2016-12-12 04:53:07 +00:00
alias weather='curl wttr.in/toronto'
2013-07-07 21:30:11 +00:00
# Git
2015-11-04 19:25:27 +00:00
alias am='git commit --amend'
2015-11-18 02:50:00 +00:00
alias ama='git commit --amend -C head --author'
2015-11-04 19:25:27 +00:00
alias ams='git commit -S --amend' # signed
alias ammend='echo "use am instead"'
alias amend='echo "use am instead"'
2014-01-25 04:04:23 +00:00
alias g='gst'
alias ga='git add -A :/'
alias gaa='git add -A'
2016-04-14 13:34:42 +00:00
alias gaap='git add -Ap'
2013-07-07 21:30:11 +00:00
alias gau='git add --update'
alias gb='git branch'
2013-07-16 23:36:06 +00:00
alias gbd='git branch -D'
2014-05-17 19:31:36 +00:00
alias gbl='git branch --all'
2014-09-30 00:51:23 +00:00
alias gbm='git branch -m'
2015-11-04 19:25:27 +00:00
alias gbr='git branch -rv'
alias gbv='git branch -v'
2013-07-07 21:30:11 +00:00
alias gc='git commit'
2014-06-25 16:41:29 +00:00
alias gcs='git commit -S'
2013-07-07 21:25:47 +00:00
alias gcl='git clone'
alias gcm="git commit -m"
2014-06-25 16:41:29 +00:00
alias gcms="git commit -S -m"
2013-07-07 21:25:47 +00:00
alias gco='git checkout'
2013-07-16 23:36:06 +00:00
alias gcob='git checkout -b'
2014-06-25 16:41:29 +00:00
alias gcon='vi .git/config'
2013-07-07 21:30:11 +00:00
alias gcp='git cherry-pick'
2014-12-01 00:18:25 +00:00
alias gcpa='git cherry-pick --abort'
alias gcpc='git cherry-pick --continue'
2014-05-17 19:31:36 +00:00
alias gcps='git cherry-pick -n'
2013-07-07 21:25:47 +00:00
alias gd='git diff'
alias gdc='git diff --cached'
alias gdm='git diff master'
2013-07-07 21:30:11 +00:00
alias gds='git diff --stat=160,120'
alias gdw='git diff --color-words'
alias gf='git fetch'
2015-02-24 04:34:00 +00:00
alias gfa='git fetch --all'
2014-12-01 00:18:25 +00:00
alias gfix="git commit --amend -C HEAD"
alias gfixs="git commit -S -a --amend -C HEAD" # signed
2014-02-17 07:00:21 +00:00
alias gfo='git fetch origin'
alias gfm='git fetch origin master'
2015-02-24 04:34:00 +00:00
alias gfup='git fetch upstream'
2015-11-04 19:25:27 +00:00
alias ggrep='git log --all --oneline | grep '
2013-07-07 21:30:11 +00:00
alias gh="source ~/.githelpers && show_git_head"
2015-10-16 05:11:24 +00:00
alias gla='git lg --all'
alias gl='git lg -30'
alias gll='git lg'
2014-01-25 04:04:23 +00:00
alias gli='git show --pretty="format:" --name-only'
alias glog='git log'
2013-07-25 16:54:40 +00:00
alias gm='git merge'
2015-11-04 19:25:27 +00:00
alias gmnff='git merge --no-ff'
2013-07-10 16:13:13 +00:00
alias gmff='git merge --ff-only'
2015-10-16 05:11:24 +00:00
alias gmffm='git merge --ff-only master'
2014-02-17 07:00:21 +00:00
alias gmffs='git merge --ff-only --squash'
2013-07-07 21:30:11 +00:00
alias gmtheirs='git merge -Xtheirs'
2013-07-07 21:25:47 +00:00
alias gp='git push'
2014-05-17 19:31:36 +00:00
alias gpa='git push && echo "pushing tags..." && git push --tags'
2014-01-25 04:04:23 +00:00
alias gpd='git push && git push heroku master'
2014-03-07 20:00:19 +00:00
alias gpdf='gpf && gphf'
2015-10-16 05:11:24 +00:00
alias gpp='echo "Pushing Upstream master to production" && git push production master'
2015-03-21 19:13:00 +00:00
alias gppp='echo "Pushing to remotes first..." && git push origin master:master && git push upstream master:master && echo "Pushing upstream master to Production..." && git push production upstream/master:master'
alias gps='git push staging'
2015-02-24 04:34:00 +00:00
alias gpps='echo "Pushing Upstream master to staging" && git push staging upstream/master:master -f'
2014-03-07 20:00:19 +00:00
alias gppf='gpf && git push production HEAD:production -f'
2014-09-30 00:51:23 +00:00
alias gph='echo "pushing $(git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3) to Heroku master" && git push heroku HEAD:master'
2014-03-07 20:00:19 +00:00
alias gphf='git push heroku master --force'
2015-10-16 05:11:24 +00:00
alias gpu='git push --set-upstream origin HEAD'
2013-07-07 21:30:11 +00:00
alias gpff='git pull --ff-only'
2015-10-16 05:11:24 +00:00
alias gpl='echo "you may want to use gpff instead" ; git pull'
2015-02-24 04:34:00 +00:00
alias gplup='git pull upstream master'
2016-10-23 16:45:42 +00:00
alias gpo='git push origin'
2013-07-07 21:30:11 +00:00
alias gpom='git push origin master'
2013-07-07 21:25:47 +00:00
alias gpr='git pull --rebase'
2014-05-17 19:31:36 +00:00
alias gpt='git push --tags'
2013-07-07 21:30:11 +00:00
alias gr='git reset'
2016-04-14 13:34:42 +00:00
alias gr1='git reset HEAD^1'
2014-01-25 04:04:23 +00:00
alias grb='git rebase'
alias grba='git rebase --abort'
alias grbc='git rebase --continue'
2015-11-29 19:04:40 +00:00
alias grbs='git rebase --skip'
2014-02-17 07:00:21 +00:00
alias grbi='git rebase -i'
2015-10-16 05:11:24 +00:00
alias grbm='git rebase master'
alias grbmi='git rebase master -i'
2014-02-17 07:00:21 +00:00
alias grbo='git fetch origin master && git rebase origin/master'
2015-10-16 05:11:24 +00:00
alias grboi='git fetch origin master && git rebase origin/master -i'
alias grbum='git fetch upstream master && git rebase upstream/master'
2013-07-07 21:30:11 +00:00
alias gre='git remote'
2014-09-30 00:51:23 +00:00
alias grea='git remote add'
2016-04-14 13:34:42 +00:00
alias gremo='git remote remove origin; git remote add origin'
2014-09-30 00:51:23 +00:00
alias greao='git remote add origin'
2013-09-25 22:54:37 +00:00
alias gref='git reflog'
2013-08-13 15:17:54 +00:00
alias grev='git remote -v'
2013-07-16 15:24:18 +00:00
alias grm='git rm'
2015-02-24 04:34:00 +00:00
alias grmr='git rm -r'
2016-04-14 13:34:42 +00:00
alias grp='git reset -p'
2013-07-07 21:30:11 +00:00
alias gsnapshot='git stash save "snapshot: $(date)" && git stash apply "stash@{0}"'
2014-03-07 20:00:19 +00:00
alias gsh='git show'
2013-07-07 21:30:11 +00:00
alias gst='git status'
alias gs='git stash'
2016-04-14 13:34:42 +00:00
alias gsk='git stash -k -u'
alias gss='git stash save'
2013-07-07 21:30:11 +00:00
alias gsd='git stash drop'
2014-09-30 00:51:23 +00:00
alias gsdl='git stash drop stash@{0}'
2013-07-07 21:30:11 +00:00
alias gsl='git stash list'
2016-04-14 13:34:42 +00:00
alias gsi='git stash -p'
2013-07-07 21:30:11 +00:00
alias gsp='git stash pop'
2015-03-21 19:13:00 +00:00
alias gsp1='git stash pop stash@{0}'
alias gsp2='git stash pop stash@{1}'
alias gsp3='git stash pop stash@{2}'
alias gsp4='git stash pop stash@{3}'
alias gsp5='git stash pop stash@{4}'
alias gsp6='git stash pop stash@{5}'
2014-05-17 19:31:36 +00:00
alias gt='git tag'
alias gta='git tag -a'
alias gtd='git tag -d'
alias gtl='git tag -l'
2013-07-07 21:30:11 +00:00
alias gx='git reset --hard'
2015-11-04 19:25:27 +00:00
alias gxx='git reset --hard HEAD~1'
alias gstats='echo "Total commits: $(git rev-list HEAD --count)"; echo "\nAuthor breakdown:"; git shortlog | grep -E "^[^ ]"'
2015-10-16 05:11:24 +00:00
alias gwip="git add . && git commit -m \"WIP\""
2013-07-07 21:30:11 +00:00
2016-12-12 04:53:07 +00:00
# Arch
alias ipconfig='ip addr'
alias ifconfig='ip addr'
2016-01-18 20:50:23 +00:00
# Python
alias pys="venv/bin/python manage.py runserver"
2013-07-07 21:30:11 +00:00
# Notes
alias notes='cd ~/.personal-files/documents'
alias pn='vim ~/.personal-files/documents/Notes/stack.txt'
alias writing='cd ~/.personal-files/brain/writing'
2013-07-07 21:25:47 +00:00
2013-07-07 21:30:11 +00:00
# Projects
2016-04-14 13:34:42 +00:00
alias dev='cd ~/.personal-files/dev'
2016-01-18 20:50:23 +00:00
alias projects='cd ~/.personal-files/dev/projects'
alias dot='cd ~/.dotfiles'
2016-01-18 20:50:23 +00:00
alias work='cd ~/.work-files'
alias brain='cd ~/.personal-files/brain'
2014-02-17 07:00:21 +00:00
# Work
2014-12-01 00:18:25 +00:00
alias dh='git push heroku-staging master -f'
# Other aliases
2016-05-25 18:29:16 +00:00
alias wl='vim ~/.work-aliases'
source ~/.work-aliases