-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.zshrc
executable file
·184 lines (148 loc) · 5.15 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
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
umask 002
# any key unfreezes after a ctrl-s
stty ixany
# Path to your oh-my-zsh configuration.
ZSH=$HOME/.oh-my-zsh
# Base of the android install
ANDROID=$HOME/android
# 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.
ZSH_THEME="robbyrussell"
# 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 vi-mode brew github python django kubectl helm)
[[ -e $ZSH/oh-my-zsh.sh ]] && source $ZSH/oh-my-zsh.sh
# Customize to your needs...
#Basic UI
setopt nobeep
setopt autocd
#Prompt Stuff
setopt PROMPT_SUBST
export PS1="%m:%~>"
#export PS1="z|%~>"
# Prompt themes!
#autoload -U promptinit
#promptinit
#autoload -U colors; colors
#export PS1="${fg[green]%}%~%{$reset_color%}>"
# RPROMPT: Show git branch info on the right
setopt prompt_subst
autoload -Uz vcs_info
zstyle ':vcs_info:*' actionformats \
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{3}|%F{1}%a%F{5}]%f '
zstyle ':vcs_info:*' formats \
'%F{5}(%f%s%F{5})%F{3}-%F{5}[%F{2}%b%F{5}]%f '
zstyle ':vcs_info:(sv[nk]|bzr):*' branchformat '%b%F{1}:%F{3}%r'
zstyle ':vcs_info:*' enable git cvs svn
# or use pre_cmd, see man zshcontrib
vcs_info_wrapper() {
vcs_info
if [ -n "$vcs_info_msg_0_" ]; then
echo "%{$fg[grey]%}${vcs_info_msg_0_}%{$reset_color%}$del"
fi
}
RPROMPT=$'$(vcs_info_wrapper)'
# Edit the comand line by hitting esc-v
autoload -U edit-command-line
zle -N edit-command-line
bindkey -M vicmd v edit-command-line
#History
#setopt SHARE_HISTORY
setopt no_sharehistory
setopt inc_append_history
HISTSIZE=1000
SAVEHIST=1000
HISTFILE=~/.history
#bindkey -e # emacs
bindkey -v # vi defaults
bindkey \^U backward-kill-line # ctrl-u deletes from cursor to start of line
bindkey \^W backward-kill-word
bindkey \^A beginning-of-line
bindkey \^E end-of-line
bindkey \^R history-incremental-search-backward
bindkey \^S history-incremental-search-forward
alias lsports="lsof -i -P"
alias wgit="wget --no-check-certificate"
alias push="git push origin master"
alias pull="git pull --rebase origin master && git submodule update --init --recursive"
alias sshwwt="ssh -XC [email protected] -t ssh -XC [email protected]"
alias gittidy="git branch --merged | grep -v master | xargs git branch -d"
# Autocorrect Exceptions
alias ack="nocorrect ack"
alias git="nocorrect git"
unsetopt correct_all # just disable all of them. this feature is kind of annoying
# stimpy
alias cowsay="cowsay -f stimpy"
#kubectl
alias k="kubectl"
# All things pathy
path+=$ANDROID
path+=$ANDROID/tools
path+=$ANDROID/platform-tools
path+=$HOME/src/ec2-api-tools-1.3-30349/bin
path+=$HOME/src/ec2-ami-tools-1.3-30349/bin
path+=/opt/local/Library/Frameworks/Python.framework/Versions/Current/bin
path+=$HOME/local/gsutil
path+=/usr/local/lib/wxPython/bin
path+=/usr/local/share/npm/bin
path+=/usr/sbin
PATH=$HOME/local/bin:/usr/local/bin:/opt/local/bin:$PATH
path=($^path(-/N)) # filter out any paths that don't exists, or aren't directories/symlinks
export PATH
export EDITOR=vim
export EC2_HOME=$HOME/src/ec2-api-tools-1.3-30349
export EC2_AMITOOL_HOME=$HOME/src/ec2-ami-tools-1.3-26357
# Java
#export JAVA_HOME=/System/Library/Frameworks/JavaVM.framework/Versions/CurrentJDK/Home
#export CLASSPATH=$HOME/android/lib:.
if [[ -d $ANDROID/tools ]]; then
for jar in $ANDROID/tools/lib/*jar
do CLASSPATH+=:$jar
done
fi
[[ -e /Users/ted/local/src/libkml-1.2.0/build/lib/python2.7/site-packages ]] && export PYTHONPATH="/Users/ted/local/src/libkml-1.2.0/build/lib/python2.7/site-packages:$PYTHONPATH"
[[ -e /usr/local/lib/python2.7 ]] && PYTHONPATH="/usr/local/lib/python2.7/site-packages:/usr/local/lib/python:$PYTHONPATH"
[[ -e /usr/local/lib/python2.7/dist-packages ]] && PYTHONPATH="/usr/local/lib/python2.7/dist-packages:$PYTHONPATH"
export PYTHONPATH
export PYTHONSTARTUP=$HOME/.pythonrc
##
# pip zsh completion start
function _pip_completion {
local words cword
read -Ac words
read -cn cword
reply=( $( COMP_WORDS="$words[*]" \
COMP_CWORD=$(( cword-1 )) \
PIP_AUTO_COMPLETE=1 $words[1] ) )
}
compctl -K _pip_completion pip
# pip zsh completion end
##
if [ -f $HOME/.local_profile ]; then
source $HOME/.local_profile
fi
# Golang
export GOPATH=$HOME/go
export PATH=$GOPATH/bin:$PATH
source $HOME/.txsecrets
export AWS_PROFILE=strateos
source <(kubectl completion zsh)
# aws cli completion
autoload bashcompinit && bashcompinit
complete -C '/usr/local/bin/aws_completer' aws