-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy path.zshrc
254 lines (199 loc) · 8.09 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
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
if [[ -n $SSH_CONNECTION ]]; then
export EDITOR='vi'
else
export EDITOR='vim'
fi
export TERM='xterm-256color'
export CHROME_REMOTE_DESKTOP_DEFAULT_DESKTOP_SIZES=960x540
source $HOME/antigen.zsh
antigen use oh-my-zsh
# Bundles
antigen bundle git
antigen bundle github
antigen bundle command-not-found
antigen bundle zsh-users/zsh-syntax-highlighting
# Theme
antigen theme https://gist.github.com/jeffgodwyll/0d7abb9d992fdceb3ba86f299fa2dc70 mmuse
antigen apply
# For theme: override virtualenv display config
BULLETTRAIN_VIRTUALENV_PREFIX='⚡'
case `uname` in
Darwin)
# default python
export PATH="/usr/local/opt/python/libexec/bin:$PATH"
# darwin path
export PATH=/usr/local/bin:/usr/local/sbin:$PATH
# iterm2 shell integration
test -e "${HOME}/.iterm2_shell_integration.zsh" && source "${HOME}/.iterm2_shell_integration.zsh"
# Android stuff
export ANDROID_HOME=~/Library/Android/sdk/
export PATH=${PATH}:~/Library/Android/sdk/platform-tools:~/Library/Android/sdk/tools
export PATH=~/flutter/bin:$PATH
;;
Linux)
# Android SDK
export ANDROID_HOME=~/android-sdk/sdk
# Paths
export PATH="~/android-sdk/sdk/platform-tools:~/android-sdk/sdk/tools:/usr/local/bin:/bin:/usr/bin:/usr/sbin:/sbin:/usr/lib/jvm/java-7-openjdk-amd64"
# Python path
# export PYTHONPATH=$PYTHONPATH:/usr/local/lib/python2.7/site-packages
# Games
export PATH=$PATH:/usr/games
# Linux brew, new package manager
export PATH="$HOME/.linuxbrew/bin:$PATH"
export MANPATH="$HOME/.linuxbrew/share/man:$MANPATH"
export INFOPATH="$HOME/.linuxbrew/share/info:$INFOPATH"
# autoenv
if [ -f ~/.linuxbrew/opt/autoenv/activate.sh ]; then
source ~/.linuxbrew/opt/autoenv/activate.sh
fi
# Android Studio
export PATH="$HOME/android-studio/bin:$PATH"
# java8 home
export JAVA8_HOME=/usr/lib/jvm/java-8-openjdk-amd64
# Go App Engine Path
# export PATH=$PATH:$HOME/go_appengine/
# # Go path
# export PATH=$PATH:~/.linuxbrew/opt/go/libexec/bin
# export GOPATH="$HOME/.linuxbrew/opt/go/bin"
# Packer for vagrant path
# export PATH=$PATH:$HOME/packer/
# Dart path
# export PATH=$PATH:/usr/lib/dart/bin
### Added by the Heroku Toolbelt
# export PATH="/usr/local/heroku/bin:$PATH"
;;
esac
# Google App Engine, dev_appserver and appcfg PATH
# TODO: Stop using this in the future after learning to properly use the newer
# gcloud tool
# if [ -d ~/google_appengine ]; then
# export PATH=$PATH:$HOME/google_appengine/
# fi
# git-flow-completion
# install git-flow with apt-get
# http://jeffkreeftmeijer.com/2010/why-arent-you-using-git-flow/
# http://nvie.com/posts/a-successful-git-branching-model/
source $HOME/git-flow-completion.zsh
# Aliases
alias aria='aria2c --file-allocation=none -c -x 10'
alias al='aria2c --file-allocation=none --force-sequential=true -c -x 10 -i'
alias aria_list='aria2c --file-allocation=none --force-sequential=true -c -x 10 -i'
alias chrome=google-chrome-unstable
alias hdmi='xrandr --output HDMI1 --auto --right-of LVDS1'
alias lock='i3lock -c #1e90ff'
alias ranger='~/downloads/ranger-1.6.1/ranger.py'
alias reload_sound='pulseaudio -k && sudo alsa force-reload'
alias route_sound='pactl load-module module-loopback'
alias settings=gnome-control-center
alias unroute_sound='pactl unload-module module-loopback'
alias utorrent='utserver -settingspath /opt/utorrent-server-alpha-v3_3/ &'
alias vga='xrandr --output VGA1 --auto --right-of LVDS1'
alias vga_same='xrandr --output VGA1 --auto --same-as LVDS1'
alias server='python -m SimpleHTTPServer'
alias subl='/Applications/Sublime\ Text.app/Contents/SharedSupport/bin/subl'
alias stree='/Applications/SourceTree.app/Contents/Resources/stree'
alias v='python3 -m venv env && source env/bin/activate'
# The next line updates PATH for the Google Cloud SDK.
if [ -f ~/google-cloud-sdk/path.zsh.inc ]; then
source '/Users/jeff/google-cloud-sdk/path.zsh.inc'
fi
# The next line enables shell command completion for gcloud.
if [ -f ~/google-cloud-sdk/completion.zsh.inc ]; then
source '/Users/jeff/google-cloud-sdk/completion.zsh.inc'
fi
###-begin-ng-completion###
#
# ng command completion script
#
# Installation: ng completion 1>> ~/.bashrc 2>>&1
# or ng completion 1>> ~/.zshrc 2>>&1
#
ng_opts='b build completion doc e2e g generate get github-pages:deploy gh-pages:deploy h help i init install lint make-this-awesome new s serve server set t test v version -h --help'
build_opts='--aot --base-href --environment --output-path --suppress-sizes --target --watch --watcher -bh -dev -e -o -prod -t -w'
generate_opts='class component directive enum module pipe route service c cl d e m p r s --help'
github_pages_deploy_opts='--base-href --environment --gh-token --gh-username --message --skip-build --target --user-page -bh -e -t'
help_opts='--json --verbose -v'
init_opts='--dry-run inline-style inline-template --link-cli --mobile --name --prefix --routing --skip-bower --skip-npm --source-dir --style --verbose -d -is -it -lc -n -p -sb -sd -sn -v'
new_opts='--directory --dry-run inline-style inline-template --link-cli --mobile --prefix --routing --skip-bower --skip-git --skip-npm --source-dir --style --verbose -d -dir -is -it -lc -p -sb -sd -sg -sn -v'
serve_opts='--aot --environment --host --live-reload --live-reload-base-url --live-reload-host --live-reload-live-css --live-reload-port --open --port --proxy-config --ssl --ssl-cert --ssl-key --target --watcher -H -e -lr -lrbu -lrh -lrp -o -p -pc -t -w'
set_opts='--global -g'
test_opts='--browsers --build --code-coverage --colors --lint --log-level --port --reporters --watch -cc -l -w'
version_opts='--verbose'
if test ".$(type -t complete 2>/dev/null || true)" = ".builtin"; then
_ng_completion() {
local cword pword opts
COMPREPLY=()
cword=${COMP_WORDS[COMP_CWORD]}
pword=${COMP_WORDS[COMP_CWORD - 1]}
case ${pword} in
ng) opts=$ng_opts ;;
b|build) opts=$build_opts ;;
g|generate) opts=$generate_opts ;;
gh-pages:deploy|github-pages:deploy) opts=$github_pages_deploy_opts ;;
h|help|-h|--help) opts=$help_opts ;;
init) opts=$init_opts ;;
new) opts=$new_opts ;;
s|serve|server) opts=$serve_opts ;;
set) opts=$set_opts ;;
t|test) opts=$test_opts ;;
v|version) opts=$version_opts ;;
*) opts='' ;;
esac
COMPREPLY=( $(compgen -W '${opts}' -- $cword) )
return 0
}
complete -o default -F _ng_completion ng
elif test ".$(type -w compctl 2>/dev/null || true)" = ".compctl: builtin" ; then
_ng_completion () {
local words cword opts
read -Ac words
read -cn cword
let cword-=1
case $words[cword] in
ng) opts=$ng_opts ;;
b|build) opts=$build_opts ;;
g|generate) opts=$generate_opts ;;
gh-pages:deploy|github-pages:deploy) opts=$github_pages_deploy_opts ;;
h|help|-h|--help) opts=$help_opts ;;
init) opts=$init_opts ;;
new) opts=$new_opts ;;
s|serve|server) opts=$serve_opts ;;
set) opts=$set_opts ;;
t|test) opts=$test_opts ;;
v|version) opts=$version_opts ;;
*) opts='' ;;
esac
setopt shwordsplit
reply=($opts)
unset shwordsplit
}
compctl -K _ng_completion ng
else
echo "Shell builtin command 'complete' or 'compctl' is redefined; cannot perform ng completion."
return 1
fi
###-end-ng-completion###
if [ -f ~/google-cloud-sdk/path.zsh.inc ]; then
source '/Users/jeff/google-cloud-sdk/path.zsh.inc'
fi
# added by travis gem
# if [ -e ~/.travis/travis.sh ]; then
# source '~/.travis/travis.sh'
# fi
export PATH="$HOME/.yarn/bin:$HOME/.config/yarn/global/node_modules/.bin:$PATH"
if which pyenv-virtualenv-init > /dev/null; then
eval "$(pyenv virtualenv-init -)";
fi
###-tns-completion-start-###
if [ -f /Users/jeff/.tnsrc ]; then
source /Users/jeff/.tnsrc
fi
###-tns-completion-end-###
###-tns-completion-start-###
if [ -f /Users/jeff/.tnsrc ]; then
source /Users/jeff/.tnsrc
fi
###-tns-completion-end-###
# global no match
unsetopt nomatch