-
Notifications
You must be signed in to change notification settings - Fork 9
/
zshrc
150 lines (121 loc) · 4.12 KB
/
zshrc
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
if [ -s $HOME/.oh-my-zsh-custom ]; then
ZSH_CUSTOM=$HOME/.oh-my-zsh-custom
fi
# Set name of the theme to load.
# Look in ~/.oh-my-zsh/themes/
# Optionally, if you set this to "random", it'll load a random theme each
# time that oh-my-zsh is loaded.
if [ -n $ZSH_CUSTOM ] && [ -f $ZSH_CUSTOM/`whoami`.zsh-theme ]; then
ZSH_THEME="`whoami`"
else
ZSH_THEME="kitallis-darkblood"
fi
# Example aliases
# alias zshconfig="mate ~/.zshrc"
# alias ohmyzsh="mate ~/.oh-my-zsh"
# Set to this to use case-sensitive completion
# CASE_SENSITIVE="true"
# Comment this out to disable weekly auto-update checks
# DISABLE_AUTO_UPDATE="true"
# Uncomment following line if you want to disable colors in ls
# DISABLE_LS_COLORS="true"
# Uncomment following line if you want to disable autosetting terminal title.
DISABLE_AUTO_TITLE="true"
# Uncomment following line if you want red dots to be displayed while waiting for completion
# COMPLETION_WAITING_DOTS="true"
# Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
# Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(git rbenv ruby gem rails brew bundler)
DISABLE_UPDATE_PROMPT=true # will auto update without prompt
#DISABLE_AUTO_UPDATE="true" # will disable auto updates entirely
source $ZSH/oh-my-zsh.sh
unsetopt correct_all
# Customize to your needs...
export PATH=/usr/local/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/X11/bin
# aliases -----------------------------------------------------
# general
alias la="ls -lach"
alias lsd="ls | grep ^d"
which ack >> /dev/null || alias ack=ack-grep
# global aliases
alias -g H='| head'
alias -g T='| tail'
alias -g G='| ack'
alias -g L="| less"
alias -g M="| most"
alias -g B="&|"
alias -g HL="--help"
alias -g LL="2>&1 | less"
alias -g CA="2>&1 | cat -A"
alias -g NE="2> /dev/null"
alias -g NUL="> /dev/null 2>&1"
alias ...='cd ../..'
alias ....='cd ../../..'
alias .....='cd ../../../..'
alias ......='cd ../../../../..'
alias .......='cd ../../../../../..'
alias ll="ls -l"
if which brew &> /dev/null; then
alias i="brew install"
alias up="brew upgrade"
else if which apt-get &> /dev/null; then
alias i="sudo apt-get install"
alias up="sudo apt-get upgrade"
fi fi
alias gi="gem install"
alias ctags="/usr/local/Cellar/ctags/5.8/bin/ctags"
alias refreshctags="ctags -f tags --recurse=yes . && find . -name '*.rb' -o -name '*.java' -o -name '*.cs' -o -name '*.js' -o -name '*.haml' -o -name '*.erb' -o -name '*.coffee' >| cscope.files && cscope -b -q"
alias sp=spork
alias r=rake
alias b=bundle
alias be='bundle exec'
alias pp='pwd | pbcopy'
export HISTFILE=~/.zhistory
# git aliases
alias gst='git st'
alias gl='git pull'
alias gp='git push'
alias gd='git diff | mate'
alias gc='git commit -v'
alias gca='git commit -v -a'
alias gb='git branch'
alias gba='git branch -a'
alias glg='git lg'
# directory options
setopt auto_cd
setopt auto_pushd
# paths -------------------------------------------------------
export PATH="$HOME/.rbenv/bin:$PATH"
export PATH="$HOME/bin:$PATH"
export PATH="./bin:$PATH"
alias vi=vim
alias ep="vim ~/.zshrc && source ~/.zshrc"
alias eplocal="vim ~/.zshrc.local && source ~/.zshrc.local"
export EDITOR="vim"
if [ -f /Applications/MacVim.app/Contents/MacOS/Vim ]; then
alias vim="/Applications/MacVim.app/Contents/MacOS/Vim"
export EDITOR="/Applications/MacVim.app/Contents/MacOS/Vim"
export GIT_EDITOR=$EDITOR
fi
export LESS='-RM' # -R: print ANSI color escapes directly to the screen
# -M: use very verbose prompt, with pos/%
# folder aliases
[[ -e ~/.zshrc.local ]] && source ~/.zshrc.local
# quick access to directories
# softlinks (e.g. rspec) created in the directory ~/.soft_links will
# be accessible as ~rspec from anywhere
if [ -d ~/.soft_links ]; then
for i in $HOME/.soft_links/*; do
soft_link=`basename $i`;
hash -d $soft_link="$i"
done
fi
# rbenv
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
export PATH=./bin:~/.bin:$PATH
export JRUBY_OPTS=--1.9
### Added by the Heroku Toolbelt
export PATH="/usr/local/heroku/bin:$PATH"