-
Notifications
You must be signed in to change notification settings - Fork 0
/
zshrc
88 lines (70 loc) · 2 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
# oh-my-zsh
ZSH=$HOME/.oh-my-zsh
ZSH_THEME="robbyrussell"
COMPLETION_WAITING_DOTS="true"
DISABLE_CORRECTION="true"
plugins=(bundler gem git heroku brew osx pod pow powder rails stellar vagrant xcode zeus zsh-syntax-highlighting)
source $ZSH/oh-my-zsh.sh
# Zsh
HISTSIZE=1000000
SAVEHIST=1000000
HIST_EXPIRE_DUPS_FIRST=true # removes duplicates when history file fills up
REPORTTIME=1 # report time for commands running longer than 1s
# Locale
export LANG="en_US.UTF-8"
export LC_ALL="en_US.UTF-8"
# Disable ZLE inside Emacs
if [[ -n $INSIDE_EMACS ]]; then
unsetopt zle
fi
# Aliases
alias cp="cp -i"
alias mv="mv -i"
alias rm="rm -i"
alias ducks='du -cks * | sort -rn | head -11'
alias vi="mvim"
alias vim="mvim -v"
alias gdf="git diff"
alias gds="git diff --staged"
alias gdfw="git diff --color-words"
alias gdsw="git diff --staged --color-words"
alias gg="git grep"
alias ggs="git-grep-sed"
alias ios-simulator="open /Applications/Xcode.app/Contents/Developer/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app"
alias airport="/System/Library/PrivateFrameworks/Apple80211.framework/Resources/airport"
# Functions
unalias g
function g() {
if [[ $# > 0 ]]; then
git $@
else
git status -s
fi
}
# Editor
export EDITOR="mvim -v"
# PATH
export PATH=/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/bin:/usr/X11/bin
# Homebrew
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
# Postgres.app
export PATH=/Applications/Postgres.app/Contents/Versions/latest/bin:$PATH
# Racket executables
export PATH=/Applications/Racket/bin:$PATH
# Go workspace
export GOPATH=$HOME/.go
# Go-installed binaries
export PATH=$GOPATH/bin:$PATH
# Node.js modules
export NODE_PATH=/usr/local/lib/node_modules
# npm-installed binaries
export PATH=/usr/local/share/npm/bin:$PATH
# rbenv
if which rbenv > /dev/null; then eval "$(rbenv init -)"; fi
# pyenv
if which pyenv > /dev/null; then eval "$(pyenv init -)"; fi
# My executables
unalias sr
export PATH=$HOME/bin:$PATH
# z
. `brew --prefix`/etc/profile.d/z.sh