Diff
1diff --git a/README.textile b/README.textile
2index 4325c91eb94d1fbd2ab5bb5ac5d8fcc29f21f963..28bab6b2c12abc25bf9fc1a2f92e1583e367e923 100644
3--- a/README.textile
4+++ b/README.textile
5@@ -10,22 +10,22 @@ h2. Setup
6
7 h3. The automatic installer... (do you trust me?)
8
9-You can install this via the command line with either `curl` or `wget`.
10+You can install this via the command line with either @curl@ or @wget@.
11
12-h4. via `curl`
13+h4. via @curl@
14
15 @curl -L http://install.ohmyz.sh | sh@
16
17-h4. via `wget`
18+h4. via @wget@
19
20 @wget --no-check-certificate http://install.ohmyz.sh -O - | sh@
21
22 h4. Optional: change the install directory
23
24-The default location is `~/.oh-my-zsh` (hidden in your home directory).
25+The default location is @~/.oh-my-zsh@ (hidden in your home directory).
26
27 You can change the install directory with the ZSH environment variable, either
28-by running `export ZSH=/your/path` before installing, or setting it before the
29+by running @export ZSH=/your/path@ before installing, or setting it before the
30 end of the install pipeline like this:
31
32 @curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | ZSH=~/.dotfiles/zsh sh@
33@@ -37,7 +37,7 @@ h3. The manual way
34
35 @git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh@
36
37-2. *OPTIONAL* Backup your existing ~/.zshrc file
38+2. *OPTIONAL* Backup your existing @~/.zshrc@ file
39
40 @cp ~/.zshrc ~/.zshrc.orig@
41
42@@ -53,9 +53,9 @@ h3. The manual way
43
44 h3. Problems?
45
46-You _might_ need to modify your PATH in ~/.zshrc if you're not able to find some commands after switching to _Oh My Zsh_.
47+You _might_ need to modify your @PATH@ in @~/.zshrc@ if you're not able to find some commands after switching to _Oh My Zsh_.
48
49-If you installed manually or changed the install location, check ZSH in ~/.zshrc
50+If you installed manually or changed the install location, check ZSH in @~/.zshrc@
51
52 h2. Usage
53
54@@ -72,16 +72,16 @@ the "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty tasty fo
55 h3. Customization
56
57 If you want to override any of the default behavior, just add a new file (ending in @.zsh@) into the @custom/@ directory.
58-If you have many functions which go well together you can put them as a *.plugin.zsh file in the @custom/plugins/@ directory and then enable this plugin.
59+If you have many functions which go well together you can put them as a @*.plugin.zsh@ file in the @custom/plugins/@ directory and then enable this plugin.
60 If you would like to override the functionality of a plugin distributed with oh-my-zsh, create a plugin of the same name in the @custom/plugins/@ directory and it will be loaded instead of the one in @plugins/@.
61
62 h3. Updates
63
64-By default you will be prompted to check for updates. If you would like oh-my-zsh to automatically update itself without prompting you, set the following in your ~/.zshrc
65+By default you will be prompted to check for updates. If you would like oh-my-zsh to automatically update itself without prompting you, set the following in your @~/.zshrc@
66
67 @DISABLE_UPDATE_PROMPT=true@
68
69-To disable updates entirely, put this in your ~/.zshrc
70+To disable updates entirely, put this in your @~/.zshrc@
71
72 @DISABLE_AUTO_UPDATE=true@
73
74diff --git a/lib/completion.zsh b/lib/completion.zsh
75index c54249c527b04b4c51ef014f2d9cdeddcf7ee252..fa1d97f4840fbcc6b60f2c385ffe9c98baa7cd5d 100644
76--- a/lib/completion.zsh
77+++ b/lib/completion.zsh
78@@ -44,7 +44,7 @@ zstyle ':completion:*:*:*:users' ignored-patterns \
79 named netdump news nfsnobody nobody nscd ntp nut nx obsrun openvpn \
80 operator pcap polkitd postfix postgres privoxy pulse pvm quagga radvd \
81 rpc rpcuser rpm rtkit scard shutdown squid sshd statd svn sync tftp \
82- usbmux uucp vcsa wwwrun xfs
83+ usbmux uucp vcsa wwwrun xfs '_*'
84
85 # ... unless we really want to.
86 zstyle '*' single-ignored show
87diff --git a/lib/correction.zsh b/lib/correction.zsh
88index 47eb83b1d523f2b0ae828fa0273377b967001734..3e1415a0ba840c1298e583c66c87eb2d6bb5f9ae 100644
89--- a/lib/correction.zsh
90+++ b/lib/correction.zsh
91@@ -1,13 +1,13 @@
92-alias man='nocorrect man'
93-alias mv='nocorrect mv'
94-alias mysql='nocorrect mysql'
95-alias mkdir='nocorrect mkdir'
96-alias gist='nocorrect gist'
97-alias heroku='nocorrect heroku'
98-alias ebuild='nocorrect ebuild'
99-alias hpodder='nocorrect hpodder'
100-alias sudo='nocorrect sudo'
101-
102 if [[ "$ENABLE_CORRECTION" == "true" ]]; then
103+ alias ebuild='nocorrect ebuild'
104+ alias gist='nocorrect gist'
105+ alias heroku='nocorrect heroku'
106+ alias hpodder='nocorrect hpodder'
107+ alias man='nocorrect man'
108+ alias mkdir='nocorrect mkdir'
109+ alias mv='nocorrect mv'
110+ alias mysql='nocorrect mysql'
111+ alias sudo='nocorrect sudo'
112+
113 setopt correct_all
114 fi
115diff --git a/lib/git.zsh b/lib/git.zsh
116index 305a77aff087716a9148ea0b2aa40012e989109e..b0e73bf3ab5dabbfb0654b06c4c8f2c4bfbc2a16 100644
117--- a/lib/git.zsh
118+++ b/lib/git.zsh
119@@ -1,8 +1,8 @@
120 # get the name of the branch we are on
121 function git_prompt_info() {
122- if [[ "$(git config --get oh-my-zsh.hide-status)" != "1" ]]; then
123+ if [[ "$(command git config --get oh-my-zsh.hide-status 2>/dev/null)" != "1" ]]; then
124 ref=$(command git symbolic-ref HEAD 2> /dev/null) || \
125- ref=$(command git rev-parse --short HEAD 2> /dev/null) || return
126+ ref=$(command git rev-parse --short HEAD 2> /dev/null) || return 0
127 echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX"
128 fi
129 }
130diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
131index 3c0f4f8f5f990e09d26d000176bb344d06a7c564..c217b91bbb57493b91263dc196e75caaec81c5a5 100644
132--- a/oh-my-zsh.sh
133+++ b/oh-my-zsh.sh
134@@ -46,7 +46,9 @@ else
135 fi
136
137 # Save the location of the current completion dump file.
138-ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
139+if [ -z "$ZSH_COMPDUMP" ]; then
140+ ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}"
141+fi
142
143 # Load and run compinit
144 autoload -U compinit
145diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh
146index 0aa14959d3540d9d34b3570248b58d722bcdac7f..50a694764c9166a5f63bb9caf1cfb4ce0aca51bc 100644
147--- a/plugins/autojump/autojump.plugin.zsh
148+++ b/plugins/autojump/autojump.plugin.zsh
149@@ -1,5 +1,7 @@
150 if [ $commands[autojump] ]; then # check if autojump is installed
151- if [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package
152+ if [ -f $HOME/.autojump/etc/profile.d/autojump.zsh ]; then # manual user-local installation
153+ . $HOME/.autojump/etc/profile.d/autojump.zsh
154+ elif [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package
155 . /usr/share/autojump/autojump.zsh
156 elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation
157 . /etc/profile.d/autojump.zsh
158@@ -7,8 +9,6 @@ if [ $commands[autojump] ]; then # check if autojump is installed
159 . /etc/profile.d/autojump.sh
160 elif [ -f /usr/local/share/autojump/autojump.zsh ]; then # freebsd installation
161 . /usr/local/share/autojump/autojump.zsh
162- elif [ -f $HOME/.autojump/etc/profile.d/autojump.zsh ]; then # manual user-local installation
163- . $HOME/.autojump/etc/profile.d/autojump.zsh
164 elif [ -f /opt/local/etc/profile.d/autojump.zsh ]; then # mac os x with ports
165 . /opt/local/etc/profile.d/autojump.zsh
166 elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump.zsh ]; then # mac os x with brew
167diff --git a/plugins/bower/_bower b/plugins/bower/_bower
168index 3338d78bec588a6465a5b6c24518c1184c212bd6..20931dcefb2c942096455f44225fb276581bf06b 100644
169--- a/plugins/bower/_bower
170+++ b/plugins/bower/_bower
171@@ -3,10 +3,11 @@ alias bl="bundle list"
172 alias bp="bundle package"
173 alias bo="bundle open"
174 alias bu="bundle update"
175+alias bi="bundle_install"
176
177 # The following is based on https://github.com/gma/bundler-exec
178
179-bundled_commands=(annotate berks cap capify cucumber foodcritic foreman guard irb jekyll kitchen knife middleman nanoc puma rackup rainbows rake rspec ruby shotgun spec spin spork strainer tailor taps thin thor unicorn unicorn_rails)
180+bundled_commands=(annotate berks cap capify cucumber foodcritic foreman guard irb jekyll kitchen knife middleman nanoc puma rackup rainbows rake rspec ruby shotgun spec spin spork spring strainer tailor taps thin thor unicorn unicorn_rails)
181
182 # Remove $UNBUNDLED_COMMANDS from the bundled_commands list
183 for cmd in $UNBUNDLED_COMMANDS; do
184@@ -15,7 +16,7 @@ done
185
186 ## Functions
187
188-bi() {
189+bundle_install() {
190 if _bundler-installed && _within-bundled-project; then
191 local bundler_version=`bundle version | cut -d' ' -f3`
192 if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then
193@@ -39,8 +40,8 @@ _bundler-installed() {
194 }
195
196 _within-bundled-project() {
197- local check_dir=$PWD
198- while [ $check_dir != "/" ]; do
199+ local check_dir="$PWD"
200+ while [ "$check_dir" != "/" ]; do
201 [ -f "$check_dir/Gemfile" ] && return
202 check_dir="$(dirname $check_dir)"
203 done
204diff --git a/plugins/colemak/colemak.plugin.zsh b/plugins/colemak/colemak.plugin.zsh
205index 34d42c280423836a39582089b504d240718a3f35..cb7cc5068647da2a35928da119c8efc5658866de 100644
206--- a/plugins/colemak/colemak.plugin.zsh
207+++ b/plugins/colemak/colemak.plugin.zsh
208@@ -19,4 +19,4 @@ bindkey -a 'N' vi-join
209 bindkey -a 'j' vi-forward-word-end
210 bindkey -a 'J' vi-forward-blank-word-end
211
212-lesskey $ZSH_CUSTOM/plugins/colemak/colemak-less
213+lesskey $ZSH/plugins/colemak/colemak-less
214diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh
215index 0696607d9fdc9d3e31df0552db55596d5dd6d22d..11b58e69d0381dd78b102e135e6652ea09ff9d00 100644
216--- a/plugins/colorize/colorize.plugin.zsh
217+++ b/plugins/colorize/colorize.plugin.zsh
218@@ -1,4 +1,4 @@
219-# Plugin for highligthing file content
220+# Plugin for highlighting file content
221 # Plugin highlights file content based on the filename extension.
222 # If no highlighting method supported for given extension then it tries
223 # guess it by looking for file content.
224@@ -6,9 +6,9 @@
225 alias colorize='colorize_via_pygmentize'
226
227 colorize_via_pygmentize() {
228- if [ ! -x $(which pygmentize) ]; then
229- echo package \'pygmentize\' is not installed!
230- exit -1
231+ if [ ! -x "$(which pygmentize)" ]; then
232+ echo "package \'pygmentize\' is not installed!"
233+ return -1
234 fi
235
236 if [ $# -eq 0 ]; then
237@@ -25,4 +25,4 @@ colorize_via_pygmentize() {
238 pygmentize -g "$FNAME"
239 fi
240 done
241-}
242+}
243diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh
244index b19650feeba177ad5ede7304c4969122bda9cc90..228a39da0ea09ddb60a87ab0434ecc881c894918 100644
245--- a/plugins/common-aliases/common-aliases.plugin.zsh
246+++ b/plugins/common-aliases/common-aliases.plugin.zsh
247@@ -3,7 +3,6 @@
248 #
249
250 # ls, the common ones I use a lot shortened for rapid fire usage
251-alias ls='ls --color' #I like color
252 alias l='ls -lFh' #size,show type,human readable
253 alias la='ls -lAFh' #long list,show almost all,show type,human readable
254 alias lr='ls -tRFh' #sorted by date,recursive,show type,human readable
255@@ -39,7 +38,7 @@ alias -g NE="2> /dev/null"
256 alias -g NUL="> /dev/null 2>&1"
257 alias -g P="2>&1| pygmentize -l pytb"
258
259-alias dud='du --max-depth=1 -h'
260+alias dud='du -d 1 -h'
261 alias duf='du -sh *'
262 alias fd='find . -type d -name'
263 alias ff='find . -type f -name'
264diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh
265index 9975aaca482ff737de7e0301879ad9181fa87195..86f2ca4dfba5bbaf5dcf391392423b622f517f8e 100644
266--- a/plugins/composer/composer.plugin.zsh
267+++ b/plugins/composer/composer.plugin.zsh
268@@ -46,3 +46,6 @@ alias cdu='composer dump-autoload'
269
270 # install composer in the current directory
271 alias cget='curl -s https://getcomposer.org/installer | php'
272+
273+# Add Composer's global binaries to PATH
274+export PATH=$PATH:~/.composer/vendor/bin
275diff --git a/plugins/django/django.plugin.zsh b/plugins/django/django.plugin.zsh
276index 9d898edca0e5bb154010c2efc539d52b17a2819f..aaaa7d21d2800914fb2720744d89c59a7c0a57fc 100644
277--- a/plugins/django/django.plugin.zsh
278+++ b/plugins/django/django.plugin.zsh
279@@ -141,6 +141,7 @@ _managepy-sqlinitialdata(){}
280 _managepy-sqlreset(){}
281 _managepy-sqlsequencereset(){}
282 _managepy-startapp(){}
283+_managepy-startproject(){}
284
285 _managepy-syncdb() {
286 _arguments -s : \
287@@ -198,6 +199,7 @@ _managepy-commands() {
288 'sqlreset:Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s).'
289 'sqlsequencereset:Prints the SQL statements for resetting sequences for the given app name(s).'
290 "startapp:Creates a Django app directory structure for the given app name in this project's directory."
291+ "startproject:Creates a Django project directory structure for the given project name in this current directory."
292 "syncdb:Create the database tables for all apps in INSTALLED_APPS whose tables haven't already been created."
293 'test:Runs the test suite for the specified applications, or the entire site if no apps are specified.'
294 'testserver:Runs a development server with data from the given fixture(s).'
295diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh
296index 7352e5bad8c7ea60340ed295ee2cdcc1f394f1d9..a6e16ddf7f352ffdcd10097586eae199f52cd23b 100644
297--- a/plugins/extract/extract.plugin.zsh
298+++ b/plugins/extract/extract.plugin.zsh
299@@ -52,7 +52,7 @@ function extract() {
300 (*.xz) unxz "$1" ;;
301 (*.lzma) unlzma "$1" ;;
302 (*.Z) uncompress "$1" ;;
303- (*.zip|*.war|*.jar) unzip "$1" -d $extract_dir ;;
304+ (*.zip|*.war|*.jar|*.sublime-package) unzip "$1" -d $extract_dir ;;
305 (*.rar) unrar x -ad "$1" ;;
306 (*.7z) 7za x "$1" ;;
307 (*.deb)
308diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py
309index 2568414320a79140ab387ad4fe788d8cd78367fd..c665a9ee1b0d39282952468b2e993b3557c39018 100644
310--- a/plugins/git-prompt/gitstatus.py
311+++ b/plugins/git-prompt/gitstatus.py
312@@ -1,4 +1,4 @@
313-#!/usr/bin/env python
314+#!/usr/bin/env python2
315 # -*- coding: UTF-8 -*-
316 from subprocess import Popen, PIPE
317 import re
318diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh
319index 25b1a1e1b42b6bbb25e7273ddf527035c9b31e74..bd69b1bd5ffaaaec95d4e46ae715cfc863adb8db 100644
320--- a/plugins/github/github.plugin.zsh
321+++ b/plugins/github/github.plugin.zsh
322@@ -40,7 +40,7 @@ fi
323 #
324 # Use this when creating a new repo from scratch.
325 empty_gh() { # [NAME_OF_REPO]
326- repo = $1
327+ repo=$1
328 ghuser=$( git config github.user )
329
330 mkdir "$repo"
331diff --git a/plugins/golang/golang.plugin.zsh b/plugins/golang/golang.plugin.zsh
332index 18bcaaff284dc0e9dff48627826e09f461744682..f2be6ca9c24627e7e6703965056cbc735a8a7d3c 100644
333--- a/plugins/golang/golang.plugin.zsh
334+++ b/plugins/golang/golang.plugin.zsh
335@@ -158,3 +158,6 @@ __go_tool_complete() {
336 }
337
338 compdef __go_tool_complete go
339+
340+# aliases
341+alias gfa='go fmt . ./...'
342diff --git a/plugins/gradle/gradle.plugin.zsh b/plugins/gradle/gradle.plugin.zsh
343index 9229512f7570cd2faf650fea5e82e6ac0218381b..97bf50b439eb56077a30d1a35b39a39b366fa11e 100644
344--- a/plugins/gradle/gradle.plugin.zsh
345+++ b/plugins/gradle/gradle.plugin.zsh
346@@ -60,7 +60,7 @@ function in_gradle() {
347 ############################################################################
348 _gradle_does_task_list_need_generating () {
349 [ ! -f .gradletasknamecache ] && return 0;
350- [ .gradletasknamecache -nt build.gradle ] && return 0;
351+ [ build.gradle -nt .gradletasknamecache ] && return 0;
352 return 1;
353 }
354
355diff --git a/plugins/grails/grails.plugin.zsh b/plugins/grails/grails.plugin.zsh
356index 5096879d8dde01cf0f389bb368a15a5108e79dbe..1b23b5d427937f103ec948a09735b63952fbf8ab 100644
357--- a/plugins/grails/grails.plugin.zsh
358+++ b/plugins/grails/grails.plugin.zsh
359@@ -39,7 +39,7 @@ marks() {
360
361 _completemarks() {
362 if [[ $(ls "${MARKPATH}" | wc -l) -gt 1 ]]; then
363- reply=($(ls $MARKPATH/**/*(-) | grep : | sed -E 's/(.*)\/([_\da-zA-Z\-]*):$/\2/g'))
364+ reply=($(ls $MARKPATH/**/*(-) | grep : | sed -E 's/(.*)\/([_a-zA-Z0-9\.\-]*):$/\2/g'))
365 else
366 if readlink -e "${MARKPATH}"/* &>/dev/null; then
367 reply=($(ls "${MARKPATH}"))
368diff --git a/plugins/mercurial/mercurial.plugin.zsh b/plugins/mercurial/mercurial.plugin.zsh
369index 2e99a12fbdc3b484f93ab186387896b8337c7ceb..ff95d5e40093d796783c2a72e0a8226dcc2d6ec2 100644
370--- a/plugins/mercurial/mercurial.plugin.zsh
371+++ b/plugins/mercurial/mercurial.plugin.zsh
372@@ -16,6 +16,8 @@ alias hgs='hg status'
373 alias hgsl='hg log --limit 20 --template "{node|short} | {date|isodatesec} | {author|user}: {desc|strip|firstline}\n" '
374 # this is the 'git commit --amend' equivalent
375 alias hgca='hg qimport -r tip ; hg qrefresh -e ; hg qfinish tip'
376+# list unresolved files (since hg does not list unmerged files in the status command)
377+alias hgun='hg resolve --list'
378
379 function in_hg() {
380 if [[ -d .hg ]] || $(hg summary > /dev/null 2>&1); then
381diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh
382index ed79685344f8cb527c51f2d926b1397d046cf4c6..2b7683078d19920cc656fac7057403c45496cd7c 100644
383--- a/plugins/mvn/mvn.plugin.zsh
384+++ b/plugins/mvn/mvn.plugin.zsh
385@@ -44,19 +44,22 @@ mvn-color()
386 # aliases
387 alias mvncie='mvn clean install eclipse:eclipse'
388 alias mvnci='mvn clean install'
389+alias mvncist='mvn clean install -DskipTests'
390 alias mvne='mvn eclipse:eclipse'
391 alias mvnce='mvn clean eclipse:clean eclipse:eclipse'
392 alias mvnd='mvn deploy'
393 alias mvnp='mvn package'
394 alias mvnc='mvn clean'
395 alias mvncom='mvn compile'
396+alias mvnct='mvn clean test'
397 alias mvnt='mvn test'
398 alias mvnag='mvn archetype:generate'
399 alias mvn-updates='mvn versions:display-dependency-updates'
400 alias mvntc7='mvn tomcat7:run'
401 alias mvntc='mvn tomcat:run'
402 alias mvnjetty='mvn jetty:run'
403-
404+alias mvndt='mvn dependency:tree'
405+alias mvns='mvn site'
406
407 function listMavenCompletions {
408 reply=(
409diff --git a/plugins/pip/_pip b/plugins/pip/_pip
410index 9892dd19c92688c070f65ffabce0247ebbceebe6..cb155e5f40eae2f921e68a7d41899f78a35c3d31 100644
411--- a/plugins/pip/_pip
412+++ b/plugins/pip/_pip
413@@ -1,4 +1,4 @@
414-#compdef pip
415+#compdef pip pip2 pip-2.7 pip3 pip-3.2 pip-3.3 pip-3.4
416 #autoload
417
418 # pip zsh completion, based on homebrew completion
419diff --git a/plugins/rbenv/rbenv.plugin.zsh b/plugins/rbenv/rbenv.plugin.zsh
420index b6795b91c59b94392060b23fe3664a6170632c16..213e1beb0b4986db4d95fbe38432edbfd0b38612 100644
421--- a/plugins/rbenv/rbenv.plugin.zsh
422+++ b/plugins/rbenv/rbenv.plugin.zsh
423@@ -7,7 +7,7 @@ _rbenv-from-homebrew-installed() {
424 }
425
426 FOUND_RBENV=0
427-rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv")
428+rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv" "/usr/local/opt/rbenv")
429 if _homebrew-installed && _rbenv-from-homebrew-installed ; then
430 rbenvdirs=($(brew --prefix rbenv) "${rbenvdirs[@]}")
431 fi
432diff --git a/plugins/repo/repo.plugin.zsh b/plugins/repo/repo.plugin.zsh
433index d690a9d22ad9470d7fc5ee07290b6f7ea08c7f4d..33f4195c7e8e8048956ac357249b125b399e3d12 100644
434--- a/plugins/repo/repo.plugin.zsh
435+++ b/plugins/repo/repo.plugin.zsh
436@@ -10,3 +10,9 @@ compdef _repo rs='repo sync'
437
438 alias rsrra='repo sync ; repo rebase --auto-stash'
439 compdef _repo rsrra='repo sync ; repo rebase --auto-stash'
440+
441+alias ru='repo upload'
442+compdef _repo ru='repo upload'
443+
444+alias rst='repo status'
445+compdef _repo rst='repo status'
446diff --git a/plugins/rsync/rsync.plugin.zsh b/plugins/rsync/rsync.plugin.zsh
447index 33a31a5c10eb81fc17b8d6688dea1185844b892a..1a3bb4cc32ba950dcbf8e65c93af5cee316e37be 100644
448--- a/plugins/rsync/rsync.plugin.zsh
449+++ b/plugins/rsync/rsync.plugin.zsh
450@@ -1,4 +1,4 @@
451-alias rsync-copy="rsync -av --progress -h"
452-alias rsync-move="rsync -av --progress -h --remove-source-files"
453-alias rsync-update="rsync -avu --progress -h"
454-alias rsync-synchronize="rsync -avu --delete --progress -h"
455+alias rsync-copy="rsync -avz --progress -h"
456+alias rsync-move="rsync -avz --progress -h --remove-source-files"
457+alias rsync-update="rsync -avzu --progress -h"
458+alias rsync-synchronize="rsync -avzu --delete --progress -h"
459diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh
460index 2fb8d54624dcfa86b49e53817a7168699ec01bd0..610ad34dc9c03a40e58e855524d52a41d1ca150b 100644
461--- a/plugins/ssh-agent/ssh-agent.plugin.zsh
462+++ b/plugins/ssh-agent/ssh-agent.plugin.zsh
463@@ -1,7 +1,7 @@
464 #
465 # INSTRUCTIONS
466 #
467-# To enabled agent forwarding support add the following to
468+# To enable agent forwarding support add the following to
469 # your .zshrc file:
470 #
471 # zstyle :omz:plugins:ssh-agent agent-forwarding on
472diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh
473old mode 100755
474new mode 100644
475index a2042343a478cc84f91ab8b2c98c7d2204b4d5c7..438f386fb394b0c6dedf11125c23695488db5c7e
476--- a/plugins/sublime/sublime.plugin.zsh
477+++ b/plugins/sublime/sublime.plugin.zsh
478@@ -7,6 +7,7 @@ if [[ $('uname') == 'Linux' ]]; then
479 "/opt/sublime_text/sublime_text"
480 "/usr/bin/sublime_text"
481 "/usr/local/bin/sublime_text"
482+ "/usr/bin/subl"
483 )
484 for _sublime_path in $_sublime_linux_paths; do
485 if [[ -a $_sublime_path ]]; then
486diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh
487index 0d2bb68c303542e617eaf39ffd51295b6747054b..4c07349a4d909f1edbb916b883b733e2be560adf 100644
488--- a/plugins/symfony2/symfony2.plugin.zsh
489+++ b/plugins/symfony2/symfony2.plugin.zsh
490@@ -17,5 +17,6 @@ compdef _symfony2 sf
491 alias sf='php app/console'
492 alias sfcl='php app/console cache:clear'
493 alias sfroute='php app/console router:debug'
494+alias sfcontainer='php app/console container:debug'
495 alias sfgb='php app/console generate:bundle'
496
497diff --git a/plugins/systemadmin/systemadmin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh
498rename from plugins/systemadmin/systemadmin.zsh
499rename to plugins/systemadmin/systemadmin.plugin.zsh
500diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant
501index e05b16f81ea1795afd639e94c0dddea558d3e5bf..9ddfa1be72c964eae113df938323da32383b959a 100644
502--- a/plugins/vagrant/_vagrant
503+++ b/plugins/vagrant/_vagrant
504@@ -8,6 +8,8 @@ _1st_arguments=(
505 'box:Box commands'
506 'connect:Connects to a shared, remote Vagrant environment'
507 'destroy:Destroys the vagrant environment'
508+ 'docker-logs:Shows Docker logs'
509+ 'docker-run:Run one-off commands against a Docker container'
510 'global-status:Reports the status of all active Vagrant environments on the system'
511 'halt:Halts the currently running vagrant environment'
512 'init:[box_name] [box_url] Initializes current folder for Vagrant usage'
513diff --git a/plugins/vundle/vundle.plugin.zsh b/plugins/vundle/vundle.plugin.zsh
514index 936c8d7d28329a97932d442034a135fc041d4fab..830774fe3f8153234e8ce84686a1aa59db5a5dbd 100644
515--- a/plugins/vundle/vundle.plugin.zsh
516+++ b/plugins/vundle/vundle.plugin.zsh
517@@ -4,7 +4,7 @@ function vundle-init () {
518 mkdir -p ~/.vim/bundle/vundle/
519 fi
520
521- if [ ! -d ~/.vim/bundle/vundle/.git/ ]
522+ if [ ! -d ~/.vim/bundle/vundle/.git ] && [ ! -f ~/.vim/bundle/vundle/.git ]
523 then
524 git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
525 echo "\n\tRead about vim configuration for vundle at https://github.com/gmarik/vundle\n"
526diff --git a/plugins/wd/wd.plugin.zsh b/plugins/wd/wd.plugin.zsh
527index 4816ab0edd37a57e76f9a5bd723b67f440a40684..e59bee8c767ad7da79d317218928953f5555317a 100644
528--- a/plugins/wd/wd.plugin.zsh
529+++ b/plugins/wd/wd.plugin.zsh
530@@ -1,6 +1,6 @@
531 #xc function courtesy of http://gist.github.com/subdigital/5420709
532 function xc {
533- xcode_proj=`find . -name "*.xc*" -d 1 | sort -r | head -1`
534+ xcode_proj=`ls | grep "\.xc" | sort -r | head -1`
535 if [[ `echo -n $xcode_proj | wc -m` == 0 ]]
536 then
537 echo "No xcworkspace/xcodeproj file found in the current directory."
538diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template
539index 5b2a6cf49bd292b296e59aedc6391ba5f45dc19c..a12eca2a0855f4a67c71d607f72eb0b29633f898 100644
540--- a/templates/zshrc.zsh-template
541+++ b/templates/zshrc.zsh-template
542@@ -7,10 +7,6 @@ export ZSH=$HOME/.oh-my-zsh
543 # time that oh-my-zsh is loaded.
544 ZSH_THEME="robbyrussell"
545
546-# Example aliases
547-# alias zshconfig="mate ~/.zshrc"
548-# alias ohmyzsh="mate ~/.oh-my-zsh"
549-
550 # Uncomment the following line to use case-sensitive completion.
551 # CASE_SENSITIVE="true"
552
553@@ -26,8 +22,8 @@ ZSH_THEME="robbyrussell"
554 # Uncomment the following line to disable auto-setting terminal title.
555 # DISABLE_AUTO_TITLE="true"
556
557-# Uncomment the following line to disable command auto-correction.
558-# DISABLE_CORRECTION="true"
559+# Uncomment the following line to enable command auto-correction.
560+# ENABLE_CORRECTION="true"
561
562 # Uncomment the following line to display red dots whilst waiting for completion.
563 # COMPLETION_WAITING_DOTS="true"
564@@ -48,6 +44,7 @@ ZSH_THEME="robbyrussell"
565 # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*)
566 # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/
567 # Example format: plugins=(rails git textmate ruby lighthouse)
568+# Add wisely, as too many plugins slow down shell startup.
569 plugins=(git)
570
571 source $ZSH/oh-my-zsh.sh
572@@ -72,3 +69,12 @@ export PATH=$HOME/bin:/usr/local/bin:$PATH
573
574 # ssh
575 # export SSH_KEY_PATH="~/.ssh/dsa_id"
576+
577+# Set personal aliases, overriding those provided by oh-my-zsh libs,
578+# plugins, and themes. Aliases can be placed here, though oh-my-zsh
579+# users are encouraged to define aliases within the ZSH_CUSTOM folder.
580+# For a full list of active aliases, run `alias`.
581+#
582+# Example aliases
583+# alias zshconfig="mate ~/.zshrc"
584+# alias ohmyzsh="mate ~/.oh-my-zsh"
585diff --git a/themes/Soliah.zsh-theme b/themes/Soliah.zsh-theme
586index 237e70fda314cc6ac047ebfbde7c38b2c641f8c3..070c5498164cc7bcf7d95e0cb44ca131b4f65702 100644
587--- a/themes/Soliah.zsh-theme
588+++ b/themes/Soliah.zsh-theme
589@@ -32,11 +32,12 @@ function check_git_prompt_info() {
590
591 # Determine if we are using a gemset.
592 function rvm_gemset() {
593- GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
594- if [[ -n $GEMSET ]]; then
595- echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|"
596- fi
597-
598+ if hash rvm 2>/dev/null; then
599+ GEMSET=`rvm gemset list | grep '=>' | cut -b4-`
600+ if [[ -n $GEMSET ]]; then
601+ echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|"
602+ fi
603+ fi
604 }
605
606 # Determine the time since last commit. If branch is clean,
607diff --git a/themes/bureau.zsh-theme b/themes/bureau.zsh-theme
608index 4d9cae0cceb406967680f26435230abd7a1ffa10..443d1d5ee736621b92a2123126c2e01a2f759f95 100644
609--- a/themes/bureau.zsh-theme
610+++ b/themes/bureau.zsh-theme
611@@ -70,7 +70,7 @@ bureau_git_prompt () {
612
613 _PATH="%{$fg_bold[white]%}%~%{$reset_color%}"
614
615-if [[ "%#" == "#" ]]; then
616+if [[ $EUID -eq 0 ]]; then
617 _USERNAME="%{$fg_bold[red]%}%n"
618 _LIBERTY="%{$fg[red]%}#"
619 else
620diff --git a/themes/gnzh.zsh-theme b/themes/gnzh.zsh-theme
621index 33f187bc6cd42770ae74329e769128c472b300e7..0519fbefb4150397be44d164cb6c93edcc8d9470 100644
622--- a/themes/gnzh.zsh-theme
623+++ b/themes/gnzh.zsh-theme
624@@ -14,11 +14,11 @@ eval PR_NO_COLOR="%{$terminfo[sgr0]%}"
625 eval PR_BOLD="%{$terminfo[bold]%}"
626
627 # Check the UID
628-if [[ $UID -ge 1000 ]]; then # normal user
629+if [[ $UID -ne 0 ]]; then # normal user
630 eval PR_USER='${PR_GREEN}%n${PR_NO_COLOR}'
631 eval PR_USER_OP='${PR_GREEN}%#${PR_NO_COLOR}'
632 local PR_PROMPT='$PR_NO_COLOR➤ $PR_NO_COLOR'
633-elif [[ $UID -eq 0 ]]; then # root
634+else # root
635 eval PR_USER='${PR_RED}%n${PR_NO_COLOR}'
636 eval PR_USER_OP='${PR_RED}%#${PR_NO_COLOR}'
637 local PR_PROMPT='$PR_RED➤ $PR_NO_COLOR'
638diff --git a/themes/steeef.zsh-theme b/themes/steeef.zsh-theme
639index e0080b8a526837b3cf75c3d3d7e5f13dc3348201..9d27410b861694e5c414ececefa3094aaa1bf467 100644
640--- a/themes/steeef.zsh-theme
641+++ b/themes/steeef.zsh-theme
642@@ -81,7 +81,7 @@ add-zsh-hook chpwd steeef_chpwd
643 function steeef_precmd {
644 if [[ -n "$PR_GIT_UPDATE" ]] ; then
645 # check for untracked files or updated submodules, since vcs_info doesn't
646- if git ls-files --other --exclude-standard --directory 2> /dev/null | grep -q "."; then
647+ if git ls-files --other --exclude-standard 2> /dev/null | grep -q "."; then
648 PR_GIT_UPDATE=1
649 FMT_BRANCH="(%{$turquoise%}%b%u%c%{$hotpink%}●${PR_RST})"
650 else
651diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh
652index 0f8c9c391413e460fd99d80a50c5fb6b1e5c0984..8b8ecae035fa0f47193b57e64fff82eff01af1ea 100644
653--- a/tools/check_for_upgrade.sh
654+++ b/tools/check_for_upgrade.sh
655@@ -5,7 +5,7 @@ function _current_epoch() {
656 }
657
658 function _update_zsh_update() {
659- echo "LAST_EPOCH=$(_current_epoch)" > ~/.zsh-update
660+ echo "LAST_EPOCH=$(_current_epoch)" >! ~/.zsh-update
661 }
662
663 function _upgrade_zsh() {
664@@ -22,6 +22,10 @@ fi
665
666 [ -f ~/.profile ] && source ~/.profile
667
668+# Cancel upgrade if the current user doesn't have write permissions for the
669+# oh-my-zsh directory.
670+[[ -w "$ZSH" ]] || return 0
671+
672 if [ -f ~/.zsh-update ]
673 then
674 . ~/.zsh-update