dotfiles/.zshrc

88 lines
1.2 KiB
Bash
Raw Normal View History

export ZSH=$HOME/.oh-my-zsh
2016-07-17 16:18:06 +00:00
2016-07-18 23:38:17 +00:00
ZSH_THEME="shadowfacts"
2016-07-17 16:18:06 +00:00
plugins=(osx git)
source $ZSH/oh-my-zsh.sh
2016-09-17 14:16:14 +00:00
# Use Homebrew bin before defaults
export PATH="/usr/local/bin:$PATH"
2016-07-17 16:25:02 +00:00
2016-09-17 14:16:14 +00:00
# command line tools
2016-07-17 16:18:06 +00:00
alias fuck='$(thefuck $(fc -ln -1))'
alias subl="/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl"
alias git=hub
alias python=python3
alias pip=pip3
alias oldruby="/usr/local/bin/ruby"
2016-09-17 20:50:23 +00:00
alias ruby="/usr/local/Cellar/ruby/2.3.1/bin/ruby"
2016-07-17 16:18:06 +00:00
2016-07-18 23:15:32 +00:00
# lazily load nvm
2016-07-17 16:18:06 +00:00
export NVM_DIR=~/.nvm
2016-07-18 23:15:32 +00:00
#. $(brew --prefix nvm)/nvm.sh
nvm() {
unset -f nvm
. $(brew --prefix nvm)/nvm.sh
nvm "$@"
}
node() {
unset -f node
. $(brew --prefix nvm)/nvm.sh
node "$@"
}
npm() {
unset -f npm
. $(brew --prefix nvm)/nvm.sh
npm "$@"
}
2016-07-17 16:25:02 +00:00
2016-09-10 19:47:50 +00:00
# Go up N directories
up() {
str=""
count=0
while [ "$count" -lt "$1" ];
do
str=$str"../"
let count=count+1
done
2016-12-11 19:42:30 +00:00
cd $str"$2"
2016-09-10 19:47:50 +00:00
}
2016-12-17 16:47:17 +00:00
# Git helper functions
psh() {
branch=`git branch 2> /dev/null | grep \* | awk '{print $2}'`
git push origin $branch "$@"
}
pll() {
branch=`git branch 2> /dev/null | grep \* | awk '{print $2}'`
git pull origin $branch "$@"
}
a() {
git add "$@"
}
s() {
git status
}
c() {
git commit "$@"
}
ca() {
git commit --amend "$@"
}
2016-07-17 16:25:02 +00:00
# default file openings
alias -s ipr=open