-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathzshrc
73 lines (63 loc) · 1.83 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
# Lines configured by zsh-newuser-install
HISTFILE=~/.histfile
HISTSIZE=1000
SAVEHIST=1000
setopt appendhistory autocd extendedglob prompt_subst
bindkey -e
# End of lines configured by zsh-newuser-install
# The following lines were added by compinstall
zstyle :compinstall filename '/Users/rlayte/.zshrc'
autoload -Uz compinit colors vcs_info
colors
compinit
# End of lines added by compinstall
TERM=xterm-256color
local smiley="%(?,%{$fg[green]%}>%{$reset_color%},%{$fg[red]%}x%{$reset_color%})"
function __git_prompt {
local DIRTY="%{$fg[yellow]%}"
local CLEAN="%{$fg[green]%}"
local UNMERGED="%{$fg[red]%}"
local RESET="%{$terminfo[sgr0]%}"
git rev-parse --git-dir >& /dev/null
if [[ $? == 0 ]]
then
if [[ `git ls-files -u >& /dev/null` == '' ]]
then
git diff --quiet >& /dev/null
if [[ $? == 1 ]]
then
echo -n $DIRTY
else
git diff --cached --quiet >& /dev/null
if [[ $? == 1 ]]
then
echo -n $DIRTY
else
echo -n $CLEAN
fi
fi
else
echo -n $UNMERGED
fi
echo -n "("
echo -n `git branch | grep '* ' | sed 's/..//'`
echo -n ")"
echo -n $RESET
fi
}
PROMPT='
%{$fg[blue]%}%~ $(__git_prompt)%
${smiley} %{$reset_color%}'
# load tmuxinator if installed
[[ -s $HOME/.tmuxinator/scripts/tmuxinator ]] && . $HOME/.tmuxinator/scripts/tmuxinator
alias ls="ls -G1"
alias ll="ls -l"
alias tmux="TERM=screen-256color-bce tmux"
alias vi="mvim -v"
alias vim="mvim -v"
export EDITOR='vim'
export PATH="$PATH:/var/lib/gems/1.8/bin"
export PATH="$PATH:$GOPATH/bin"
export PATH="$PATH:/usr/local/opt/go/libexec/bin"
export PATH="/usr/local/sbin:$PATH"
export GOPATH="$HOME/work/go"