Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 271 lines (229 sloc) 5.453 kB
f36c699 @derekwyatt Initial commit
authored
1 # Path to your oh-my-zsh configuration.
2 ZSH=$HOME/.oh-my-zsh
d0bde60 @derekwyatt Reorganized things...
authored
3 ZSH_THEME=""
f36c699 @derekwyatt Initial commit
authored
4 # Set to this to use case-sensitive completion
5 # CASE_SENSITIVE="true"
6
7 # Comment this out to disable weekly auto-update checks
8 # DISABLE_AUTO_UPDATE="true"
9
10 # Uncomment following line if you want to disable colors in ls
11 # DISABLE_LS_COLORS="true"
12
13 # Uncomment following line if you want to disable autosetting terminal title.
14 # DISABLE_AUTO_TITLE="true"
15
16 # Uncomment following line if you want red dots to be displayed while waiting for completion
17 COMPLETION_WAITING_DOTS="true"
18
3e317c9 @derekwyatt Eliminated the default - I don't remember why
authored
19 if [[ -z ${MY_SHELL_LEVEL} ]]; then
a8b8d93 Using SHLVL wasn't working on all my machines, so I just made my own
Derek Wyatt authored
20 export MY_SHELL_LEVEL=0
21 else
22 export MY_SHELL_LEVEL=$(($MY_SHELL_LEVEL+1))
23 fi
24
f94406e Fixed the displaying of 'ss' to limit the output
Derek Wyatt authored
25 export SS_DISPLAY_LIMIT=25
d0bde60 @derekwyatt Reorganized things...
authored
26 export ZSH_CUSTOM=~/.dotfiles/zsh_custom
478c050 Adding the vim-interaction plugin to my config
Derek Wyatt authored
27 plugins=(git regex-dirstack vim-interaction)
ffe07f7 @derekwyatt Aha! Getting rid of the vi-mode plugin is better for vi mode than not…
authored
28 source $ZSH/oh-my-zsh.sh
d0bde60 @derekwyatt Reorganized things...
authored
29 source $ZSH_CUSTOM/themes/gnzh.zsh-theme
ac85e14 Moved the directory stacking stuff out into a plugin... there's a bug…
Derek Wyatt authored
30
ffe07f7 @derekwyatt Aha! Getting rid of the vi-mode plugin is better for vi mode than not…
authored
31 bindkey -v
f36c699 @derekwyatt Initial commit
authored
32 bindkey -M viins 'jj' vi-cmd-mode
04999dc @derekwyatt Coloured up a 3gp file. Added some options to ZSH to make it more obv…
authored
33 setopt auto_pushd
34 setopt pushd_silent
35 setopt pushd_ignore_dups
36 setopt ignore_eof
745f721 @derekwyatt I can rm * without the warning, I think. I've got my big-boy pants o…
authored
37 setopt rm_star_silent
7c7450a I forgot to actually add the unsetopt nomatch. I guess I was doing it…
Derek Wyatt authored
38 unsetopt nomatch
bdfff93 @derekwyatt Shut off the autocorrect thing... it's wrong more than it's right
authored
39 unsetopt correct_all
f36c699 @derekwyatt Initial commit
authored
40
41 if [ $(uname) = Darwin ]; then
e8cfa26 @derekwyatt Added some PATH cleanups
authored
42 export PATH=.:~/bin:~/local/bin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
f36c699 @derekwyatt Initial commit
authored
43 else
0aa02f6 @derekwyatt Fixed the open alias
authored
44 alias open=gnome-open
e8cfa26 @derekwyatt Added some PATH cleanups
authored
45 export PATH=.:buildutil:~/bin:~/local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
f36c699 @derekwyatt Initial commit
authored
46 fi
47
48 export GPGKEY=B2F6D883
49 export GPG_TTY=$(tty)
50
d2be2ce @derekwyatt Added SBT permgen setting. Added SML to the path on mac
authored
51 export SBT_OPTS=-XX:PermSize=256M
52
f12cd77 @derekwyatt Fixed up the EDITOR in zshrc. Got rid of JAVA_HOME in zshrc. Changed …
authored
53 export EDITOR=vim
f36c699 @derekwyatt Initial commit
authored
54
55 if which dircolors > /dev/null; then
56 test -r ~/.dircolors && eval "$(dircolors -b ~/.dircolors)" || eval "$(dircolors -b)"
57 alias ls='ls --color=auto -F'
58 alias grep='grep --color=auto'
59 alias fgrep='fgrep --color=auto'
60 alias egrep='egrep --color=auto'
61 fi
62
63 function eecho
64 {
65 echo $@ 1>&2
66 }
67
68 function findWithSpec
69 {
70 local dirs=
c50a8d0 @derekwyatt Various simplifications of my life
authored
71 local egrepopts="-v '\\.sw[po]\\$|/\\.git/|^\\.git/|/\\.svn/|^\\.svn/'"
f36c699 @derekwyatt Initial commit
authored
72 local nullprint=
73 while [[ $# != 0 ]];
74 do
75 if [[ "$1" == "-Z" ]]; then
76 egrepopts="-Zz $egrepopts"
77 nullprint="-print0"
78 shift
79 elif [[ -d "$1" ]]; then
80 dirs="$dirs '$1'"
81 shift
82 else
83 break
84 fi
85 done
86 if [[ -z "$dirs" ]]; then
87 dirs=.
88 fi
89 eval "find $dirs $nullprint $@ | egrep $egrepopts"
90 }
91
92 function findsrc
93 {
94 findWithSpec "$@" '-name \*.java -o -name \*.scala -o -name Makefile -o -name \*.h -o -name \*.cpp -o -name \*.c'
95 }
96 alias findsrcz="findsrc -Z"
97
98 function findj
99 {
100 findWithSpec "$@" '-name \*.java'
101 }
102 alias findjz="findj -Z"
103
104 function finds
105 {
106 findWithSpec "$@" '-name \*.scala'
107 }
108 alias findsz="finds -Z"
109
110 function findsj
111 {
112 (finds "$@"; findj "$@")
113 }
114 alias findsjz="findsj -Z"
115
116 function findh
117 {
118 findWithSpec "$@" '-name \*.h -o -name \*.hpp'
119 }
120 alias findhz="findh -Z"
121
122 function findc
123 {
124 findWithSpec "$@" '-name \*.cpp -o -name \*.c'
125 }
126 alias findcz="findc -Z"
127
128 function findch
129 {
130 (findc "$@"; findh "$@")
131 }
132 alias findchz="findch -Z"
133
226da71 @derekwyatt changes
authored
134 function findpy
135 {
136 findWithSpec "$@" '-name \*.py'
137 }
138 alias findcpy="findpy -Z"
139
f36c699 @derekwyatt Initial commit
authored
140 function findf
141 {
142 findWithSpec "$@" "-type f"
143 }
144 alias findfz="findf -Z"
145
146 function findm
147 {
148 findWithSpec "$@" "-name Makefile"
149 }
150 alias findmz="findm -Z"
151
c50a8d0 @derekwyatt Various simplifications of my life
authored
152 function findpom
153 {
154 findWithSpec "$@" "-name pom.xml"
155 }
156 alias findpomz="findpom -Z"
157
158 function findx
159 {
160 findWithSpec "$@" "-name \*.xml"
161 }
162 alias findxz="findx -Z"
163
164 function findd
165 {
166 findWithSpec "$@" "-type d"
167 }
168 alias finddz="findd -Z"
169
226da71 @derekwyatt changes
authored
170 function findExtension
171 {
172 local ext=
173 local dir=.
174 if [[ $# == 0 ]]; then
175 echo "usage: findExtension [dir] <extension>"
176 return 1
177 else
178 ext=$@[$#]
179 if [[ $# != 1 ]]; then
180 dir=$1
181 fi
182 fi
183 findWithSpec $dir '-name \*'.$ext
184 }
185
aedf401 Git stuff
Derek Wyatt authored
186 alias fe=findExtension
f36c699 @derekwyatt Initial commit
authored
187 alias f=findWithSpec
aedf401 Git stuff
Derek Wyatt authored
188 alias fn='find . -name'
f36c699 @derekwyatt Initial commit
authored
189
190 function findClass
191 {
192 local pattern="${1-}"
193 if [ -z "$pattern" ]; then
194 eecho "No pattern supplied" 1>&2
195 return 1
196 fi
197 echo $CLASSPATH | tr ':' '\n' | grep -v '^ *$' | \
198 while read entry
199 do
200 echo "====== $entry ======"
201 if [ "${entry%.jar}" != "$entry" ]; then
202 if [ -f "$entry" ]; then
203 jar tf "$entry" | egrep $pattern
204 fi
205 elif [ -d "$entry" ]; then
206 find "$entry" | egrep -i $pattern
207 fi
208 done
209 }
210
211 function ff
212 {
213 if [ $# = 0 ]; then
214 eecho "usage: ff <file>" 1>&2
215 return 1
216 fi
217 if [ -d "$1" ]; then
218 eecho "That's a directory, dumbass." 1>&2
219 return 1
220 elif [ "${1%/*}" = "$1" ]; then
221 firefox -new-tab "file://$(pwd)/$1"
222 else
223 "cd" "${1%/*}"
224 local dir="$(pwd)"
225 "cd" - >/dev/null
226 firefox -new-tab "file://$dir/${1##*/}"
227 fi
228 return 0
229 }
230
1ca5d3c @derekwyatt Added a new function 'gitall' that will recursively apply a git comma…
authored
231 function gitall
232 {
233 find . -type d -a -name .git | while read d
234 do
235 local x=${d%.git}
236 echo ========= $x
237 (cd $x; git "$@")
238 done
239 }
240
f36c699 @derekwyatt Initial commit
authored
241 # Assorted
242 alias swps='find . -name .\*.sw[op]'
243 alias rmstd='xargs rm -vf'
244 alias xag='xargs -0 egrep'
c50a8d0 @derekwyatt Various simplifications of my life
authored
245 alias xg='xargs egrep'
246 alias xgi='xargs egrep -i'
d0bde60 @derekwyatt Reorganized things...
authored
247 alias pd="cd -"
71cf47b @derekwyatt I need to know what directory has the pending changes...
authored
248 alias grss='for f in $(find . -type d -a -name .git); do x=${f%/.git}; echo ==== $x; (cd $x; gss); done'
8f251ad @derekwyatt Octave is such a long word to type
authored
249 alias o=octave
c50a8d0 @derekwyatt Various simplifications of my life
authored
250 alias mvn=~/bin/mvn-colour
f36c699 @derekwyatt Initial commit
authored
251
aedf401 Git stuff
Derek Wyatt authored
252 alias gl='git pull --ff-only'
253 alias gf='git fetch'
254 alias gd='git diff'
255 alias gdc='git diff --cached'
256
257 alias gld="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr)%Creset' --abbrev-commit --date=relative"
258
f36c699 @derekwyatt Initial commit
authored
259 alias sc=screen
260 alias scl="screen -list"
261
f73be96 @derekwyatt Added pgrep alias; updates to themes and some rxvt themes
authored
262 alias pgrep="pgrep -fl"
263
dfb034c @derekwyatt Some work settings and prompt hacks
authored
264 alias bc="bc -lq"
265
af616e0 @derekwyatt Added sourcing of local configurations
authored
266 test -f ~/.zshrc_local && . ~/.zshrc_local
dfb034c @derekwyatt Some work settings and prompt hacks
authored
267
268 # Auvik Settings
269 export JAVA_OPTS="-XX:ReservedCodeCacheSize=128m -XX:+CMSClassUnloadingEnabled -XX:MaxPermSize=1024m -Xmx1024m -Xss2m -XX:+UseCodeCacheFlushing"
aedf401 Git stuff
Derek Wyatt authored
270
Something went wrong with that request. Please try again.