78bbf7a6e52e7aabc82f22c43c9309a5f0ff1282

Author
Robby Russell <robby@planetargon.com>
Committer
Robby Russell <robby@planetargon.com>
Date

Message

Merge pull request #3809 from ncanceill/easymerge

Easy-to-Merge

Diff

This diff is truncated to protect this page.

   1diff --git a/README.markdown b/README.markdown
   2index 9f96e315ddec6570fbd43a5ac4cdff6daa9c0fc4..3805d1eb41f68cc40b400aa9b4e4c1c36c8b38d7 100644
   3--- a/README.markdown
   4+++ b/README.markdown
   5@@ -15,9 +15,9 @@ To learn more, visit http://ohmyz.sh and/or follow [ohmyzsh](https://twitter.com
   6 __Disclaimer:__ _Oh My Zsh works best on Mac OS X and Linux._
   7 
   8 * Unix-based operating system (Mac OS X or Linux)
   9-* [Zsh](http://www.zsh.org) should be installed (v4.3.9 or more recent)
  10-  * This is commonly pre-installed. (`zsh --version` to confirm)
  11+* [Zsh](http://www.zsh.org) should be installed (v4.3.9 or more recent). If not pre-installed (`zsh --version` to confirm), check the following instruction here: [Installing-ZSH](https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH)
  12 * `curl` or `wget` should be installed
  13+* `git` should be installed
  14 
  15 ### Basic Installation
  16 
  17@@ -25,11 +25,11 @@ Oh My Zsh is installed by running one of the following commands in your terminal
  18 
  19 #### via curl
  20 
  21-`curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh`
  22+`sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"`
  23 
  24 #### via wget
  25 
  26-`wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh`
  27+`sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"`
  28 
  29 ## Using Oh My Zsh
  30 
  31@@ -51,7 +51,7 @@ Most plugins (should! we're working on this) include a __README__, which documen
  32 
  33 ### Themes
  34 
  35diff --git a/lib/git.zsh b/lib/git.zsh
  36index 118841f06efc88a698463a47698371c64619b5c5..caa7e632913251f9694b3a3b7cb357e2879e02cf 100644
  37--- a/lib/git.zsh
  38+++ b/lib/git.zsh
  39@@ -36,24 +36,27 @@ git_remote_status() {
  40         ahead=$(command git rev-list ${hook_com[branch]}@{upstream}..HEAD 2>/dev/null | wc -l)
  41         behind=$(command git rev-list HEAD..${hook_com[branch]}@{upstream} 2>/dev/null | wc -l)
  42 
  43-        if [ $ahead -eq 0 ] && [ $behind -gt 0 ]
  44+        if [ $ahead -gt 0 ] && [ $behind -eq 0 ]
  45         then
  46-            echo "$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE"
  47-        elif [ $ahead -gt 0 ] && [ $behind -eq 0 ]
  48+            git_remote_status="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE"
  49+            git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))%{$reset_color%}"
  50+        elif [ $behind -gt 0 ] && [ $ahead -eq 0 ] 
  51         then
  52-            echo "$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE"
  53+            git_remote_status="$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE"
  54+            git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE$((behind))%{$reset_color%}"
  55         elif [ $ahead -gt 0 ] && [ $behind -gt 0 ]
  56         then
  57-            echo "$ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE"
  58+            git_remote_status="$ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE"
  59+            git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))%{$reset_color%}$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE$((behind))%{$reset_color%}"
  60         fi
  61-    fi
  62-}
  63 
  64-# Checks if there are commits ahead from remote
  65-function git_prompt_ahead() {
  66-  if $(echo "$(command git log @{upstream}..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
  67-    echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
  68-  fi
  69+        if [ $ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_DETAILED ]
  70+        then
  71+            git_remote_status="$ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_PREFIX$remote$git_remote_status_detailed$ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_SUFFIX"
  72+        fi
  73+
  74+        echo $git_remote_status
  75+    fi
  76 }
  77 
  78 # Gets the number of commits ahead from remote
  79@@ -64,6 +67,29 @@ function git_commits_ahead() {
  80   fi
  81 }
  82 
  83+# Outputs if current branch is ahead of remote
  84+function git_prompt_ahead() {
  85+  if [[ -n "$(command git rev-list origin/$(current_branch)..HEAD 2> /dev/null)" ]]; then
  86+    echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
  87+  fi
  88+}
  89+
  90+# Outputs if current branch is behind remote
  91+function git_prompt_behind() {
  92+  if [[ -n "$(command git rev-list HEAD..origin/$(current_branch) 2> /dev/null)" ]]; then
  93+    echo "$ZSH_THEME_GIT_PROMPT_BEHIND"
  94+  fi
  95+}
  96+
  97+# Outputs if current branch exists on remote or not
  98+function git_prompt_remote() {
  99+  if [[ -n "$(command git show-ref origin/$(current_branch) 2> /dev/null)" ]]; then
 100+    echo "$ZSH_THEME_GIT_PROMPT_REMOTE_EXISTS"
 101+  else
 102+    echo "$ZSH_THEME_GIT_PROMPT_REMOTE_MISSING"
 103+  fi
 104+}
 105+
 106 # Formats prompt string for current git commit short SHA
 107 function git_prompt_short_sha() {
 108   SHA=$(command git rev-parse --short HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER"
 109diff --git a/lib/misc.zsh b/lib/misc.zsh
 110index 0b7cb26967437479cae98aae452985a9e9cb1c8e..c9a8e9e8f51af1c193afda6c946ab729395993d3 100644
 111--- a/lib/misc.zsh
 112+++ b/lib/misc.zsh
 113@@ -20,3 +20,6 @@ alias afind='ack-grep -il'
 114 if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then
 115 	export LC_CTYPE=${LANG%%:*} # pick the first entry from LANG
 116 fi
 117+
 118+# recognize comments
 119+setopt interactivecomments
 120diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
 121index bc7a8e4966426a5f0f43c34153b7c5dbfac8240b..ec64c240f0203b64b1d32fe6da2ae657e93329f1 100644
 122--- a/oh-my-zsh.sh
 123+++ b/oh-my-zsh.sh
 124@@ -14,7 +14,7 @@ if [[ -z "$ZSH_CUSTOM" ]]; then
 125     ZSH_CUSTOM="$ZSH/custom"
 126 fi
 127 
 128-# Set ZSH_CACHE_DIR to the path where cache files sould be created
 129+# Set ZSH_CACHE_DIR to the path where cache files should be created
 130 # or else we will use the default cache/
 131 if [[ -z "$ZSH_CACHE_DIR" ]]; then
 132   ZSH_CACHE_DIR="$ZSH/cache/"
 133@@ -29,6 +29,11 @@ for config_file ($ZSH/lib/*.zsh); do
 134   source $config_file
 135 done
 136 
 137+# Load all of your custom configurations from custom/
 138+for config_file ($ZSH_CUSTOM/*.zsh(N)); do
 139+  source $config_file
 140+done
 141+unset config_file
 142 
 143 is_plugin() {
 144   local base_dir=$1
 145@@ -72,12 +77,6 @@ for plugin ($plugins); do
 146   fi
 147 done
 148 
 149-# Load all of your custom configurations from custom/
 150-for config_file ($ZSH_CUSTOM/*.zsh(N)); do
 151-  source $config_file
 152-done
 153-unset config_file
 154-
 155 # Load the theme
 156 if [ "$ZSH_THEME" = "random" ]; then
 157   themes=($ZSH/themes/*zsh-theme)
 158diff --git a/plugins/adb/_adb b/plugins/adb/_adb
 159index 22089581a98f5f292dc21cac91c62e6d5108abab..f30f3247f1ecbb884b260f83e6507e94fcab7203 100644
 160--- a/plugins/adb/_adb
 161+++ b/plugins/adb/_adb
 162@@ -16,14 +16,22 @@ _1st_arguments=(
 163 'help:show the help message'
 164 'install:push this package file to the device and install it'
 165 'jdwp:list PIDs of processes hosting a JDWP transport'
 166-'logcat:View device log'
 167+'kill-server:kill the server if it is running'
 168+'logcat:view device log'
 169 'pull:copy file/dir from device'
 170 'push:copy file/dir to device'
 171+'reboot:reboots the device, optionally into the bootloader or recovery program'
 172+'reboot-bootloader:reboots the device into the bootloader'
 173+'remount:remounts the partitions on the device read-write'
 174+'root:restarts the adbd daemon with root permissions'
 175+'sideload:push a ZIP to device and install it'
 176 'shell:run remote shell interactively'
 177 'sync:copy host->device only if changed (-l means list but dont copy)'
 178-‘tcpip:restart host adb in tcpip mode’
 179+'start-server:ensure that there is a server running'
 180+'tcpip:restart host adb in tcpip mode'
 181 'uninstall:remove this app package from the device'
 182 'version:show version num'
 183+'wait-for-device:block until device is online'
 184 )
 185 
 186 local expl
 187diff --git a/plugins/apache2-macports/README.md b/plugins/apache2-macports/README.md
 188new file mode 100644
 189index 0000000000000000000000000000000000000000..099fc8da31dbe0fb2850e3336c45357b14ec5dbd
 190--- /dev/null
 191+++ b/plugins/apache2-macports/README.md
 192@@ -0,0 +1,19 @@
 193+## APACHE2 MACPORTS PLUGIN
 194+
 195+
 196+---
 197+
 198+### FEATURES
 199+
 200+| Alias          | Function                                                                       | Description           |
 201+|:--------------:|:-------------------------------------------------------------------------------|----------------------:|
 202+| apache2restart | sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper restart | Restart apache daemon |
 203+| apache2start   | sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper start   | Start apache daemon   |
 204+| apache2stop    | sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper stop    | Stop apache daemon    |
 205+
 206+---
 207+
 208+### CONTRIBUTORS
 209+ - Alexander Rinass (alex@rinass.net)
 210+
 211+---
 212diff --git a/plugins/archlinux/README.md b/plugins/archlinux/README.md
 213new file mode 100644
 214index 0000000000000000000000000000000000000000..ad42d4cd282bfe7047d9e10b5c9bb834431f8234
 215--- /dev/null
 216+++ b/plugins/archlinux/README.md
 217@@ -0,0 +1,64 @@
 218+## ARCHLINUX PLUGIN
 219+
 220+
 221+---
 222+
 223+### FEATURES
 224+
 225+| Alias        | Function                                | Description                                                                                                         |
 226+|:------------:|-----------------------------------------|:--------------------------------------------------------------------------------------------------------------------|
 227+| pacin        | sudo pacman -S                          | Install specific package(s) from the repositories                                                                   |
 228+| pacins       | sudo pacman -U                          | Install specific package not from the repositories but from a file                                                  |
 229+| pacinsd      | sudo pacman -S --asdeps                 | Install given package(s) as dependencies of another package                                                         |
 230+| pacloc       | pacman -Qi                              | Display information about a given package in the local database                                                     |
 231+| paclocs      | pacman -Qs                              | Search for package(s) in the local database                                                                         |
 232+| paclsorphans | sudo pacman -Qdt'                       | List all orphaned packages                                                                                          |
 233+| pacmir       | sudo pacman -Syy                        | Force refresh of all package lists after updating /etc/pacman.d/mirrorlist                                          |
 234+| pacre        | sudo pacman -R                          | Remove the specified package(s), retaining its configuration(s) and required dependencies                           |
 235+| pacrem       | sudo pacman -Rns                        | Remove the specified package(s), its configuration(s) and unneeded dependencies                                     |
 236+| pacrep       | pacman -Si                              | Display information about a given package in the repositories                                                       |
 237+| pacreps      | pacman -Ss                              | Search for package(s) in the repositories                                                                           |
 238+| pacrmorphans | sudo pacman -Rs $(pacman -Qtdq)'        | Delete all orphaned packages                                                                                        |
 239+| pacupd       | sudo pacman -Sy && sudo abs && sudo aur | Update and refresh the local package, ABS and AUR databases against repositories                                    |
 240+| pacupd       | sudo pacman -Sy && sudo abs             | Update and refresh the local package and ABS databases against repositories                                         |
 241+| pacupd       | sudo pacman -Sy && sudo aur             | Update and refresh the local package and AUR databases against repositories                                         |
 242+| pacupd       | sudo pacman -Sy                         | Update and refresh the local package database against repositories                                                  |
 243+| pacupg       | sudo pacman -Syu                        | Synchronize with repositories before upgrading packages that are out of date on the local system.                   |
 244+| yaconf       | yaourt -C                               | Fix all configuration files with vimdiff                                                                            |
 245+| yain         | yaourt -S                               | Install specific package(s) from the repositories                                                                   |
 246+| yains        | yaourt -U                               | Install specific package not from the repositories but from a file                                                  |
 247+| yainsd       | yaourt -S --asdeps                      | Install given package(s) as dependencies of another package                                                         |
 248+| yaloc        | yaourt -Qi                              | Display information about a given package in the local database                                                     |
 249+| yalocs       | yaourt -Qs                              | Search for package(s) in the local database                                                                         |
 250+| yalst        | yaourt -Qe                              | List installed packages, even those installed from AUR (they're tagged as "local")                                  |
 251+| yamir        | yaourt -Syy                             | Force refresh of all package lists after updating /etc/pacman.d/mirrorlist                                          |
 252+| yaorph       | yaourt -Qtd                             | Remove orphans using yaourt                                                                                         |
 253+| yare         | yaourt -R                               | Remove the specified package(s), retaining its configuration(s) and required dependencies                           |
 254+| yarem        | yaourt -Rns                             | Remove the specified package(s), its configuration(s) and unneeded dependencies                                     |
 255+| yarep        | yaourt -Si                              | Display information about a given package in the repositories                                                       |
 256+| yareps       | yaourt -Ss                              | Search for package(s) in the repositories                                                                           |
 257+| yasu         | yaourt --sucre                          | Same as yaupg, but without confirmation                                                                             |
 258+| yaupd        | yaourt -Sy && sudo abs && sudo aur      | Update and refresh the local package, ABS and AUR databases against repositories                                    |
 259+| yaupd        | yaourt -Sy && sudo abs                  | Update and refresh the local package and ABS databases against repositories                                         |
 260+| yaupd        | yaourt -Sy && sudo aur                  | Update and refresh the local package and AUR databases against repositories                                         |
 261+| yaupd        | yaourt -Sy                              | Update and refresh the local package database against repositories                                                  |
 262+| yaupg        | yaourt -Syua                            | Synchronize with repositories before upgrading packages (AUR packages too) that are out of date on the local system |
 263+
 264+| Function       | Description                                                                                                       |
 265+|----------------|:------------------------------------------------------------------------------------------------------------------|
 266+| pacdisowned    | List all disowned files in your system                                                                            |
 267+| paclist        | List all installed packages with a short description - [Source](https://bbs.archlinux.org/viewtopic.php?id=93683) |
 268+| pacmanallkeys  | Get all keys for developers and trusted users                                                                     |
 269+| pacmansignkeys |                                                                                                                   |
 270+
 271+---
 272+
 273+### CONTRIBUTORS
 274+ - Benjamin Boudreau - dreurmail@gmail.com
 275+ - Celso Miranda - contacto@celsomiranda.net
 276+ - KhasMek - Boushh@gmail.com
 277+ - Martin Putniorz - mputniorz@gmail.com
 278+ - MatthR3D - matthr3d@gmail.com
 279+ - ornicar - thibault.duplessis@gmail.com
 280+
 281+---
 282diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh
 283index 6330a2152b59e5581cb8d4188af252424cddc505..b83c24560bf84c65629b90b7f0f5790ab966270f 100644
 284--- a/plugins/archlinux/archlinux.plugin.zsh
 285+++ b/plugins/archlinux/archlinux.plugin.zsh
 286@@ -2,7 +2,7 @@
 287 # Usage is also described at https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins
 288 
 289 # Look for yaourt, and add some useful functions if we have it.
 290-if [[ -x `which yaourt` ]]; then
 291+if [[ -x `command -v yaourt` ]]; then
 292   upgrade () {
 293     yaourt -Syu
 294   }
 295@@ -21,11 +21,11 @@ if [[ -x `which yaourt` ]]; then
 296   alias yalst='yaourt -Qe'         # List installed packages, even those installed from AUR (they're tagged as "local")
 297   alias yaorph='yaourt -Qtd'       # Remove orphans using yaourt
 298   # Additional yaourt alias examples
 299-  if [[ -x `which abs` && -x `which aur` ]]; then
 300+  if [[ -x `command -v abs` && -x `command -v aur` ]]; then
 301     alias yaupd='yaourt -Sy && sudo abs && sudo aur'  # Update and refresh the local package, ABS and AUR databases against repositories
 302-  elif [[ -x `which abs` ]]; then
 303+  elif [[ -x `command -v abs` ]]; then
 304     alias yaupd='yaourt -Sy && sudo abs'   # Update and refresh the local package and ABS databases against repositories
 305-  elif [[ -x `which aur` ]]; then
 306+  elif [[ -x `command -v aur` ]]; then
 307     alias yaupd='yaourt -Sy && sudo aur'   # Update and refresh the local package and AUR databases against repositories
 308   else
 309     alias yaupd='yaourt -Sy'               # Update and refresh the local package database against repositories
 310@@ -49,11 +49,11 @@ alias pacreps='pacman -Ss'             # Search for package(s) in the repositori
 311 alias pacloc='pacman -Qi'              # Display information about a given package in the local database
 312 alias paclocs='pacman -Qs'             # Search for package(s) in the local database
 313 # Additional pacman alias examples
 314-if [[ -x `which abs` && -x `which aur` ]]; then
 315+if [[ -x `command -v abs` && -x `command -v aur` ]]; then
 316   alias pacupd='sudo pacman -Sy && sudo abs && sudo aur'  # Update and refresh the local package, ABS and AUR databases against repositories
 317-elif [[ -x `which abs` ]]; then
 318+elif [[ -x `command -v abs` ]]; then
 319   alias pacupd='sudo pacman -Sy && sudo abs'              # Update and refresh the local package and ABS databases against repositories
 320-elif [[ -x `which aur` ]]; then
 321+elif [[ -x `command -v aur` ]]; then
 322   alias pacupd='sudo pacman -Sy && sudo aur'              # Update and refresh the local package and AUR databases against repositories
 323 else
 324   alias pacupd='sudo pacman -Sy'     # Update and refresh the local package database against repositories
 325diff --git a/plugins/atom/README.md b/plugins/atom/README.md
 326new file mode 100644
 327index 0000000000000000000000000000000000000000..75d77a0ac1c3732be4dbab1b4062e4f8e1d315fc
 328--- /dev/null
 329+++ b/plugins/atom/README.md
 330@@ -0,0 +1,17 @@
 331+## atom
 332+
 333+Plugin for Atom, a cross platform text and code editor, available for Linux, Mac OS X, and Windows.
 334+
 335+### Requirements
 336+
 337+ * [Atom](https://atom.io/)
 338+
 339+### Usage
 340+
 341+ * If `at` command is called without an argument, launch Atom
 342+
 343+ * If `at` is passed a directory, `cd` to it and open it in Atom
 344+
 345+ * If `at` is passed a file, open it in Atom
 346+
 347+ * if `att` command is called, it is equivalent to `at .`, opening the current folder in Atom
 348diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
 349index 0ae18dd561f9a052cb5a49a01b9ac7c2cd47203f..e5e3f12364696e7ba2feb31eb8272dc5f7547808 100644
 350--- a/plugins/aws/aws.plugin.zsh
 351+++ b/plugins/aws/aws.plugin.zsh
 352@@ -22,7 +22,7 @@ function aws_profiles {
 353 compctl -K aws_profiles asp
 354 
 355 if _homebrew-installed && _awscli-homebrew-installed ; then
 356-  _aws_zsh_completer_path=$(brew --prefix)/opt/awscli/libexec/bin/aws_zsh_completer.sh
 357+  _aws_zsh_completer_path=$(brew --prefix awscli)/libexec/bin/aws_zsh_completer.sh
 358 else
 359   _aws_zsh_completer_path=$(which aws_zsh_completer.sh)
 360 fi
 361diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh
 362index 14ca4c81726ede87c295765e10aeb19f6376d086..b70b42f984540b2d58e9a6720e57234ec5ae21d6 100755
 363--- a/plugins/bgnotify/bgnotify.plugin.zsh
 364+++ b/plugins/bgnotify/bgnotify.plugin.zsh
 365@@ -33,9 +33,9 @@ bgnotify () {
 366   if hash terminal-notifier 2>/dev/null; then #osx
 367     terminal-notifier -message "$2" -title "$1"
 368   elif hash growlnotify 2>/dev/null; then #osx growl
 369-    growlnotify -m $1 $2
 370+    growlnotify -m "$1" "$2"
 371   elif hash notify-send 2>/dev/null; then #ubuntu!
 372-    notify-send $1 $2
 373+    notify-send "$1" "$2"
 374   elif hash notifu 2>/dev/null; then #cygwyn support!
 375     notifu /m "$2" /p "$1"
 376   fi
 377diff --git a/plugins/brew/_brew b/plugins/brew/_brew
 378index d11aa245de88d64c81d6b7fc6d082b0498dbce93..4c99a383ae237077bf0a5f9241a6aa7fddba2ee7 100644
 379--- a/plugins/brew/_brew
 380+++ b/plugins/brew/_brew
 381@@ -35,6 +35,7 @@ _1st_arguments=(
 382   'info:information about a formula'
 383   'install:install a formula'
 384   'reinstall:install a formula anew; re-using its current options'
 385+  'leaves:show installed formulae that are not dependencies of another installed formula'
 386   'link:link a formula'
 387   'list:list files in a formula or not-installed formulae'
 388   'log:git commit log for a formula'
 389diff --git a/plugins/bundler/README.md b/plugins/bundler/README.md
 390index 56f0c71767c66d0ba5c3f0306a6450d8f438c278..edd95ccc23a37bf04bf46930c080fd4c5a40d985 100644
 391--- a/plugins/bundler/README.md
 392+++ b/plugins/bundler/README.md
 393@@ -39,7 +39,7 @@ This will exclude the `foreman` and `spin` gems (i.e. their executable) from bei
 394 
 395 ## Excluded gems
 396 
 397-These gems should not be called with `bundle exec`. Please see the Issues on GitHub for clarification.
 398+These gems should not be called with `bundle exec`. Please see [issue #2923](https://github.com/robbyrussell/oh-my-zsh/pull/2923) on GitHub for clarification.
 399 
 400 `berks`
 401 `foreman`
 402diff --git a/plugins/docker/_docker b/plugins/docker/_docker
 403index fd459a0cac85e2a12d2fcbeaf4a0d11843dea59b..e95a22bfd453ffe39d979d2400f777d8ace155d0 100644
 404--- a/plugins/docker/_docker
 405+++ b/plugins/docker/_docker
 406@@ -100,11 +100,6 @@ __info() {
 407     # no arguments
 408 }
 409 
 410-__insert() {
 411-    __docker_images
 412-    _arguments '*:files:_files'
 413-}
 414-
 415 __inspect() {
 416     __docker_images
 417     __docker_all_containers
 418@@ -278,7 +273,6 @@ _1st_arguments=(
 419     "images":"List images"
 420     "import":"Create a new filesystem image from the contents of a tarball"
 421     "info":"Display system-wide information"
 422-    "insert":"Insert a file in an image"
 423     "inspect":"Return low-level information on a container"
 424     "kill":"Kill a running container"
 425     "load":"Load an image from a tar archive"
 426@@ -335,8 +329,6 @@ case "$words[1]" in
 427         __import ;;
 428     info)
 429         __info ;;
 430-    insert)
 431-        __insert ;;
 432     inspect)
 433         __inspect ;;
 434     kill)
 435diff --git a/plugins/forklift/README.md b/plugins/forklift/README.md
 436new file mode 100644
 437index 0000000000000000000000000000000000000000..b452a357cd60026c15fbb47daeb9f97b300bb749
 438--- /dev/null
 439+++ b/plugins/forklift/README.md
 440@@ -0,0 +1,13 @@
 441+## forklift
 442+
 443+Plugin for ForkLift, an FTP application for OS X.
 444+
 445+### Requirements
 446+
 447+* [ForkLift](http://forkliftapp.com/forklift/)
 448+
 449+### Usage
 450+
 451+* If `fl` is called without arguments then the current folder is opened in ForkLift. Is equivalent to `fl .`
 452+
 453+* If `fl` is called with a directory as the argument, then that directory is opened in ForkLift
 454diff --git a/plugins/history-substring-search/README.markdown b/plugins/history-substring-search/README.markdown
 455index 143b813a1a1e8ba917c6f55708a309bbce92dc90..c154afdce90afe7fa7ca3272f412b86e7984c5fa 100644
 456--- a/plugins/history-substring-search/README.markdown
 457+++ b/plugins/history-substring-search/README.markdown
 458@@ -1,6 +1,6 @@
 459 To activate this script, please include it the `plugins` variable within `~/.zshrc`
 460 
 461-  `plugins=(git history-substring-search.zsh)`
 462+  `plugins=(git history-substring-search)`
 463 
 464 See the "history-substring-search.zsh" file for more information:
 465 
 466diff --git a/plugins/history/README.md b/plugins/history/README.md
 467new file mode 100644
 468index 0000000000000000000000000000000000000000..dd9286894ba31aa693160b66e9700cd117d6c612
 469--- /dev/null
 470+++ b/plugins/history/README.md
 471@@ -0,0 +1,15 @@
 472+## history
 473+
 474+Provides a couple of convenient aliases for using the `history` command to examine your command line history.
 475+
 476+### Requirements
 477+
 478+* None.
 479+
 480+### Usage
 481+
 482+* If `h` is called, your command history is listed. Equivalent to using `history`
 483+
 484+* If `hsi` is called with an argument, a **case insensitive** `grep` search is performed on your command history, looking for commands that match the argument provided
 485+
 486+* If `hsi` is called without an argument you will help on `grep` arguments
 487diff --git a/plugins/httpie/README.md b/plugins/httpie/README.md
 488new file mode 100644
 489index 0000000000000000000000000000000000000000..1d4ec48bdb90dcdd4a7011375238acbbba177486
 490--- /dev/null
 491+++ b/plugins/httpie/README.md
 492@@ -0,0 +1,6 @@
 493+## HTTPie
 494+**Maintainer:** [lululau](https://github.com/lululau)
 495+
 496+This plugin adds completion for HTTPie, which is a command line HTTP client, a user-friendly cURL replacement. 
 497+
 498+[HTTPie Homepage](http://httpie.org)
 499diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh
 500index 4a36b882dcac1d81fd9f17ab56b83f44e8de2639..8ad60b8fecdf1da67b2ad5d2f64512a0ec0ee2ce 100644
 501--- a/plugins/jira/jira.plugin.zsh
 502+++ b/plugins/jira/jira.plugin.zsh
 503@@ -49,6 +49,20 @@ open_jira_issue () {
 504     else
 505       $open_cmd  "$jira_url/browse/$jira_prefix$1"
 506     fi
 507+  else 
 508+    local addcomment=''
 509+    if [[ "$2" == "m" ]]; then
 510+      addcomment="#add-comment"
 511+      echo "Add comment to issue #$1"
 512+    else
 513+      echo "Opening issue #$1"
 514+    fi
 515+    
 516+    if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then
 517+      $open_cmd  "$jira_url/issues/$1$addcomment"
 518+    else
 519+      $open_cmd  "$jira_url/browse/$1$addcomment"
 520+    fi
 521   fi
 522 }
 523 
 524diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh
 525index d082c11e54280c392846ef8800545ef9d01a0644..e58e7373dec677429dd1f4af43ae8a7368a56c9d 100644
 526--- a/plugins/jump/jump.plugin.zsh
 527+++ b/plugins/jump/jump.plugin.zsh
 528@@ -13,7 +13,7 @@ jump() {
 529 }
 530 
 531 mark() {
 532-	if (( $# == 0 )); then
 533+	if [[ ( $# == 0 ) || ( "$1" == "." ) ]]; then
 534 		MARK=$(basename "$PWD")
 535 	else
 536 		MARK="$1"
 537diff --git a/plugins/kitchen/_kitchen b/plugins/kitchen/_kitchen
 538new file mode 100644
 539index 0000000000000000000000000000000000000000..54105b61ac40795e4f305c757cdd4d746cd034e4
 540--- /dev/null
 541+++ b/plugins/kitchen/_kitchen
 542@@ -0,0 +1,41 @@
 543+# author: Peter Eisentraut
 544+# source: https://gist.github.com/petere/10307599
 545+# compdef kitchen
 546+
 547+_kitchen() {
 548+	local curcontext="$curcontext" state line
 549+	typeset -A opt_args
 550+
 551+	_arguments '1: :->cmds'\
 552+	           '2: :->args'
 553+
 554+	case $state in
 555+		cmds)
 556+			_arguments "1:Commands:(console converge create destroy diagnose driver help init list login setup test verify version)"
 557+			;;
 558+		args)
 559+			case $line[1] in
 560+				converge|create|destroy|diagnose|list|setup|test|verify)
 561+					compadd "$@" all
 562+					_kitchen_instances
 563+					;;
 564+				login)
 565+					_kitchen_instances
 566+					;;
 567+			esac
 568+			;;
 569+	esac
 570+}
 571+
 572+_kitchen_instances() {
 573+	if [[ $_kitchen_instances_cache_dir != $PWD ]]; then
 574+		unset _kitchen_instances_cache
 575+	fi
 576+	if [[ ${+_kitchen_instances_cache} -eq 0 ]]; then
 577+		_kitchen_instances_cache=(${(f)"$(bundle exec kitchen list -b 2>/dev/null || kitchen list -b 2>/dev/null)"})
 578+		_kitchen_instances_cache_dir=$PWD
 579+	fi
 580+	compadd -a _kitchen_instances_cache
 581+}
 582+
 583+_kitchen "$@"
 584diff --git a/plugins/laravel5/laravel5.plugin.zsh b/plugins/laravel5/laravel5.plugin.zsh
 585index 2afa993179807a07cc9bf214e85605f4563f71c1..38454f40d560c5537d0cd7f7d3d4708d750bc774 100644
 586--- a/plugins/laravel5/laravel5.plugin.zsh
 587+++ b/plugins/laravel5/laravel5.plugin.zsh
 588@@ -15,6 +15,6 @@ compdef _laravel5 la5
 589 #Alias
 590 alias la5='php artisan'
 591 
 592-alias la5dump='php artisan dump-autoload'
 593 alias la5cache='php artisan cache:clear'
 594-alias la5routes='php artisan routes'
 595+alias la5routes='php artisan route:list'
 596+alias la5vendor='php artisan vendor:publish'
 597diff --git a/plugins/last-working-dir/last-working-dir.plugin.zsh b/plugins/last-working-dir/last-working-dir.plugin.zsh
 598index 4fa6fcc34800ec812a75cdd01a9ba8eecbf49fcc..75041f08ef63874a9ecba86180ea912bb9d43e2c 100644
 599--- a/plugins/last-working-dir/last-working-dir.plugin.zsh
 600+++ b/plugins/last-working-dir/last-working-dir.plugin.zsh
 601@@ -15,7 +15,7 @@ function chpwd() {
 602 
 603 # Changes directory to the last working directory.
 604 function lwd() {
 605-	[[ ! -r "$cache_file" ]] || cd `cat "$cache_file"`
 606+	[[ ! -r "$cache_file" ]] || cd "`cat "$cache_file"`"
 607 }
 608 
 609 # Automatically jump to last working directory unless this isn't the first time
 610diff --git a/plugins/mercurial/README.md b/plugins/mercurial/README.md
 611new file mode 100644
 612index 0000000000000000000000000000000000000000..89e1c17431b53ed996c9121baec858007c7de69a
 613--- /dev/null
 614+++ b/plugins/mercurial/README.md
 615@@ -0,0 +1,64 @@
 616+# Mercurial plugin
 617+### Usage
 618+Update .zshrc:
 619+
 620+1. Add name to the list of plugins, e.g. `plugins = (..., mercurial, ...)`
 621+   (that is pretty obvious).
 622+2. Change PROMPT variable of current theme to contain current folder mercurial repo info:
 623+
 624+   robbyrussel theme is used by default, so you need to modify PROMPT var
 625+   from [this file](https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/robbyrussell.zsh-theme)
 626+   by adding `$(hg_prompt_info)` after `$(git_prompt_info)`, so currently it
 627+   looks next:
 628+
 629+   ```diff
 630+   - PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
 631+   + PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)$(hg_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
 632+   ```
 633+   
 634+   and put modified var at the end of **.zshrc**.
 635+3. Initialize additional vars used in plugin. So in short put next in **.zshrc**:
 636+   
 637+   ```
 638+   ZSH_THEME_HG_PROMPT_PREFIX="%{$fg_bold[magenta]%}hg:(%{$fg[red]%}"
 639+   ZSH_THEME_HG_PROMPT_SUFFIX="%{$reset_color%}"
 640+   ZSH_THEME_HG_PROMPT_DIRTY="%{$fg[magenta]%}) %{$fg[yellow]%}✗%{$reset_color%}"
 641+   ZSH_THEME_HG_PROMPT_CLEAN="%{$fg[magenta]%})"
 642+   ```
 643+
 644+### What's inside?
 645+#### Adds handy aliases:
 646+###### general
 647+* `hgc` - `hg commit`
 648+* `hgb` - `hg branch`
 649+* `hgba` - `hg branches`
 650+* `hgbk` - `hg bookmarks`
 651+* `hgco` - `hg checkout`
 652+* `hgd`  - `hg diff`
 653+* `hged` - `hg diffmerge`
 654+
 655+###### pull and update
 656+* `hgi` - `hg incoming`
 657+* `hgl` - `hg pull -u`
 658+* `hglr` - `hg pull --rebase`
 659+* `hgo` - `hg outgoing`
 660+* `hgp` - `hg push`
 661+* `hgs` - `hg status`
 662+* `hgsl` - `hg log --limit 20 --template "{node|short} | {date|isodatesec} | {author|user}: {desc|strip|firstline}\n"`
 663+
 664+###### this is the 'git commit --amend' equivalent
 665+* `hgca` - `hg qimport -r tip ; hg qrefresh -e ; hg qfinish tip`
 666+
 667+###### list unresolved files (since hg does not list unmerged files in the status command)
 668+* `hgun` - `hg resolve --list`
 669+
 670+#### Displays repo branch and directory status in prompt
 671+This is the same as git plugin does.
 672+
 673+**Note**: additional changes to **.zshrc** are required in order for this to
 674+work.
 675+
 676+### Mantainers
 677+[ptrv](https://github.com/ptrv) - original creator
 678+
 679+[oshybystyi](https://github.com/oshybystyi) - created this README and know how most of code works
 680diff --git a/plugins/mix-fast/README.md b/plugins/mix-fast/README.md
 681new file mode 100644
 682index 0000000000000000000000000000000000000000..9a5eccc3f675937adb0291a5123903e16b89a678
 683--- /dev/null
 684+++ b/plugins/mix-fast/README.md
 685@@ -0,0 +1,28 @@
 686+# mix-fast
 687+
 688+Fast mix autocompletion plugin.
 689+
 690+This script caches the output for later usage and significantly speeds it up.
 691+It generates a .mix_tasks cache file for current project. Currently if you want
 692+to update cache you should remove .mix_tasks file
 693+
 694+Inspired by and based on rake-fast zsh plugin.
 695+
 696+This is entirely based on [this pull request by Ullrich Schäfer](https://github.com/robb/.dotfiles/pull/10/), which is inspired by [this Ruby on Rails trick from 2006](http://weblog.rubyonrails.org/2006/3/9/fast-mix-task-completion-for-zsh/).
 697+
 698+
 699+## Installation
 700+
 701+Just add the plugin to your `.zshrc`:
 702+
 703+```bash
 704+plugins=(foo bar mix-fast)
 705+```
 706+
 707+You might consider adding `.mix_tasks` to your [global .gitignore](https://help.github.com/articles/ignoring-files#global-gitignore)
 708+
 709+## Usage
 710+
 711+`mix`, then press tab
 712+
 713+Currently maintained by [styx](https://github.com/styx/)
 714diff --git a/plugins/mix-fast/mix-fast.plugin.zsh b/plugins/mix-fast/mix-fast.plugin.zsh
 715new file mode 100644
 716index 0000000000000000000000000000000000000000..3719c352554cf63546b1212a310c311dd9efb2e4
 717--- /dev/null
 718+++ b/plugins/mix-fast/mix-fast.plugin.zsh
 719@@ -0,0 +1,29 @@
 720+_mix_refresh () {
 721+  if [ -f .mix_tasks ]; then
 722+    rm .mix_tasks
 723+  fi
 724+  echo "Generating .mix_tasks..." > /dev/stderr
 725+  _mix_generate
 726+  cat .mix_tasks
 727+}
 728+
 729+_mix_does_task_list_need_generating () {
 730+  [ ! -f .mix_tasks ];
 731+}
 732+
 733+_mix_generate () {
 734+  mix --help | grep -v 'iex -S' | tail -n +2 | cut -d " " -f 2 > .mix_tasks
 735+}
 736+
 737+_mix () {
 738+  if [ -f mix.exs ]; then
 739+    if _mix_does_task_list_need_generating; then
 740+      echo "\nGenerating .mix_tasks..." > /dev/stderr
 741+      _mix_generate
 742+    fi
 743+    compadd `cat .mix_tasks`
 744+  fi
 745+}
 746+
 747+compdef _mix mix
 748+alias mix_refresh='_mix_refresh'
 749diff --git a/plugins/mix/_mix b/plugins/mix/_mix
 750index b7c982e0ac9083f19d6cb9050a124ca68587d576..319932b3fbe16d178971e0fcf107d635a0127420 100644
 751--- a/plugins/mix/_mix
 752+++ b/plugins/mix/_mix
 753@@ -1,28 +1,43 @@
 754-#compdef mix 
 755+#compdef mix
 756 #autoload
 757 
 758 # Elixir mix zsh completion
 759 
 760 local -a _1st_arguments
 761 _1st_arguments=(
 762-    'archive:Archive this project into a .ez file'
 763-    'clean:Clean generated application files'
 764+    'app.start:Start all registered apps'
 765+    'archive:List all archives'
 766+    'archive.build:Archive this project into a .ez file'
 767+    'archive.install:Install an archive locally'
 768+    'archive.uninstall:Uninstall archives'
 769+    'clean:Delete generated application files'
 770+    'cmd:Executes the given command'
 771     'compile:Compile source files'
 772+    'compile.protocols:Consolidates all protocols in all paths'
 773     'deps:List dependencies and their status'
 774-    "deps.clean:Remove dependencies' files"
 775+    "deps.clean:Remove the given dependencies' files"
 776     'deps.compile:Compile dependencies'
 777     'deps.get:Get all out of date dependencies'
 778     'deps.unlock:Unlock the given dependencies'
 779-    'deps.update:Update dependencies'
 780-    'do:Executes the commands separated by comma'
 781-    'escriptize:Generates an escript for the project'
 782+    'deps.update:Update the given dependencies'
 783+    'do:Executes the tasks separated by comma'
 784+    'escript.build:Builds an escript for the project'
 785     'help:Print help information for tasks'
 786+    'hex:Print hex help information'
 787+    'hex.config:Read or update hex config'
 788+    'hex.docs:Publish docs for package'
 789+    'hex.info:Print hex information'
 790+    'hex.key:Hex API key tasks'
 791+    'hex.outdated:Shows outdated hex deps for the current project'
 792+    'hex.owner:Hex package ownership tasks'
 793+    'hex.publish:Publish a new package version'
 794+    'hex.search:Search for package names'
 795+    'hex.user:Hex user tasks'
 796+    'loadconfig:Loads and persists the given configuration'
 797     'local:List local tasks'
 798-    'local.install:Install a task or an archive locally'
 799+    'local.hex:Install hex locally'
 800     'local.rebar:Install rebar locally'
 801-    'local.uninstall:Uninstall local tasks or archives'
 802-    'local.hex:Install Hex locally'
 803-    'new:Creates a new Elixir project'
 804+    'new:Create a new Elixir project'
 805     'run:Run the given file or expression'
 806     "test:Run a project's tests"
 807     '--help:Describe available tasks'
 808@@ -34,7 +49,7 @@ __task_list ()
 809     local expl
 810     declare -a tasks
 811 
 812-    tasks=(archive clean compile deps deps.clean deps.compile deps.get deps.unlock deps.update do escriptize help local local.install local.rebar local.uninstall new run test)
 813diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh
 814index d0f9f009a21c1454dda1ea992ee86447b6aa806e..a6e3a83e6a738a7e4931afc5ffa62bc28d27d9ff 100644
 815--- a/plugins/osx/osx.plugin.zsh
 816+++ b/plugins/osx/osx.plugin.zsh
 817@@ -138,23 +138,6 @@ function man-preview() {
 818   man -t "$@" | open -f -a Preview
 819 }
 820 
 821-function trash() {
 822-  local trash_dir="${HOME}/.Trash"
 823-  local temp_ifs="$IFS"
 824-  IFS=$'\n'
 825-  for item in "$@"; do
 826-    if [[ -e "$item" ]]; then
 827-      item_name="$(basename $item)"
 828-      if [[ -e "${trash_dir}/${item_name}" ]]; then
 829-        mv -f "$item" "${trash_dir}/${item_name} $(date "+%H-%M-%S")"
 830-      else
 831-        mv -f "$item" "${trash_dir}/"
 832-      fi
 833-    fi
 834-  done
 835-  IFS=$temp_ifs
 836-}
 837-
 838 function vncviewer() {
 839   open vnc://$@
 840 }
 841diff --git a/plugins/paver/paver.plugin.zsh b/plugins/paver/paver.plugin.zsh
 842new file mode 100644
 843index 0000000000000000000000000000000000000000..40bdbd12f9b46078337f839abcc4aee869fd438b
 844--- /dev/null
 845+++ b/plugins/paver/paver.plugin.zsh
 846@@ -0,0 +1,16 @@
 847+_paver_does_target_list_need_generating () {
 848+  [ ! -f .paver_targets ] && return 0;
 849+  [ pavement.py -nt .paver_targets ] && return 0;
 850+  return 1;
 851+}
 852+
 853+_paver () {
 854+  if [ -f pavement.py ]; then
 855+    if _paver_does_target_list_need_generating; then
 856+      paver --help 2>&1 |grep '-'|grep -v -e '--'|awk -F '-' '{print $1}'|tr -d ' ' > .paver_targets
 857+    fi
 858+    compadd `cat .paver_targets`
 859+  fi
 860+}
 861+
 862+compdef _paver paver
 863diff --git a/plugins/pod/_pod b/plugins/pod/_pod
 864index 8c0f4460f7321f21202e16b9716deadf2d486b87..508a471027469b40579bdc7e7fd53bc437703ab3 100644
 865--- a/plugins/pod/_pod
 866+++ b/plugins/pod/_pod
 867@@ -1,389 +1,682 @@
 868 #compdef pod
 869 #autoload
 870+# setopt XTRACE VERBOSE
 871+# vim: ft=zsh sw=2 ts=2 et
 872+
 873 
 874 # -----------------------------------------------------------------------------
 875 #          FILE:  _pod
 876-#   DESCRIPTION:  Cocoapods (0.27.1) autocomplete plugin for Oh-My-Zsh
 877+#   DESCRIPTION:  Cocoapods (0.33.1) autocomplete plugin for Oh-My-Zsh
 878 #                 http://cocoapods.org
 879+#                 Generated with `pod --completion-script
 880 #        AUTHOR:  Alexandre Joly (alexandre.joly@mekanics.ch)
 881 #        GITHUB:  https://github.com/mekanics
 882 #       TWITTER:  @jolyAlexandre
 883-#       VERSION:  0.0.3
 884-#       LICENSE:  MIT
 885+#       VERSION:  0.0.5
 886 # -----------------------------------------------------------------------------
 887 
 888-local -a _1st_arguments
 889-_1st_arguments=(
 890-    'help:Show help for the given command'
 891-    'init:Generate a Podfile for the current directory'
 892-    'install:Install project dependencies'
 893-    'ipc:Inter-process communication'
 894-    'list:List pods'
 895-    'outdated:Show outdated project dependencies'
 896-    'podfile-info:Shows information on installed Pods'
 897-    'push:Push new specifications to a spec-repo'
 898-    'repo:Manage spec-repositories'
 899-    'search:Searches for pods'
 900-    'setup:Setup the CocoaPods environment'
 901-    'spec:Manage pod specs'
 902-    'update:Update outdated project dependencies'
 903-)
 904-
 905-local -a _repo_arguments
 906-_repo_arguments=(
 907-    'add:Add a spec repo'
 908-    'lint:Validates all specs in a repo'
 909-    'remove:Remove a spec repo.'
 910-    'update:Update a spec repo'
 911-)
 912-
 913-local -a _spec_arguments
 914-_spec_arguments=(
 915-    'cat:Prints a spec file'
 916-    'create:Create spec file stub'
 917-    'edit:Edit a spec file'
 918-    'lint:Validates a spec file'
 919-    'which:Prints the path of the given spec'
 920-)
 921-
 922-local -a _ipc_arguments
 923-_ipc_arguments=(
 924-    'list:Lists the specifications know to CocoaPods'
 925-    'podfile:Converts a Podfile to YAML'
 926-    'repl:The repl listens to commands on standard input'
 927-    'spec:Converts a podspec to YAML'
 928-    'update-search-index:Updates the search index'
 929-)
 930-
 931-local -a _list_arguments
 932-_list_arguments=(
 933-    'new:Lists pods introduced in the master spec-repo since the last check'
 934-)
 935-
 936-local -a _inherited_options
 937-_inherited_options=(
 938-    '(--silent)--silent[Show nothing]' \
 939-    '(--version)--version[Show the version of CocoaPods]' \
 940-    '(--no-color)--no-color[Show output without color]' \
 941-    '(--verbose)--verbose[Show more debugging information]' \
 942-    '(--help)--help[Show help banner of specified command]'
 943-)
 944-
 945-local -a _install_options
 946-_install_options=(
 947-    '(--no-clean)--no-clean[Leave SCM dirs like `.git` and `.svn` intact after downloading]' \
 948-    '(--no-integrate)--no-integrate[Skip integration of the Pods libraries in the Xcode project(s)]' \
 949-    '(--no-repo-update)--no-repo-update[Skip running `pod repo update` before install]'
 950-)
 951-
 952-local -a _update_options
 953-_update_options=(
 954-    '(--no-clean)--no-clean[Leave SCM dirs like `.git` and `.svn intact after downloading]' \
 955-    '(--no-integrate)--no-integrate[Skip integration of the Pods libraries in the Xcode project(s)]' \
 956-    '(--no-repo-update)--no-repo-update[Skip running `pod repo update before install]'
 957-)
 958-
 959-local -a _outdated_options
 960-_outdated_options=(
 961-    '(--no-repo-update)--no-repo-update[Skip running `pod repo update` before install]'
 962-)
 963-
 964-local -a _search_options
 965-_search_options=(
 966-    '(--full)--full[Search by name, summary, and description]' \
 967diff --git a/plugins/rails/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh
 968index 5ed96f8cddf6f7012bcea1d11bb127a3c956b315..52aabab72324de2b3e2698ab25aff66feaabe6c4 100644
 969--- a/plugins/rails/rails.plugin.zsh
 970+++ b/plugins/rails/rails.plugin.zsh
 971@@ -59,7 +59,7 @@ alias rn='rake notes'
 972 alias rr='rake routes'
 973 
 974 # legacy stuff
 975-alias ss='thin --stats "/thin/stats" start'
 976+alias sstat='thin --stats "/thin/stats" start'
 977 alias sg='ruby script/generate'
 978 alias sd='ruby script/destroy'
 979 alias sp='ruby script/plugin'
 980diff --git a/plugins/rails3/rails3.plugin.zsh b/plugins/rails3/rails3.plugin.zsh
 981deleted file mode 100644
 982index 261b921087d220cefee029f6a1dce42899cfb67f..0000000000000000000000000000000000000000
 983--- a/plugins/rails3/rails3.plugin.zsh
 984+++ /dev/null
 985@@ -1,4 +0,0 @@
 986-echo "It looks like you have been using the 'rails3' plugin,"
 987-echo "which has been deprecated in favor of a newly consolidated 'rails' plugin."
 988-echo "You will want to modify your ~/.zshrc configuration to begin using it."
 989-echo "Learn more at https://github.com/robbyrussell/oh-my-zsh/pull/2240"
 990diff --git a/plugins/rails4/rails4.plugin.zsh b/plugins/rails4/rails4.plugin.zsh
 991deleted file mode 100644
 992index 5452c242cab529ee8e5816717c3cd0281199d681..0000000000000000000000000000000000000000
 993--- a/plugins/rails4/rails4.plugin.zsh
 994+++ /dev/null
 995@@ -1,4 +0,0 @@
 996-echo "It looks like you have been using the 'rails4' plugin,"
 997-echo "which has been deprecated in favor of a newly consolidated 'rails' plugin."
 998-echo "You will want to modify your ~/.zshrc configuration to begin using it."
 999-echo "Learn more at https://github.com/robbyrussell/oh-my-zsh/pull/2240"
1000diff --git a/plugins/sublime/README.md b/plugins/sublime/README.md
1001index e38cf66dc0d9715417fae5ead9abaa49e9d80fd5..e1e666f05413c483d80959ea7fa208f8577a4793 100644
1002--- a/plugins/sublime/README.md
1003+++ b/plugins/sublime/README.md
1004@@ -14,4 +14,6 @@ Plugin for Sublime Text, a cross platform text and code editor, available for Li
1005 
1006  * If `st` is passed a file, open it in Sublime Text
1007 
1008- * if `stt` command is called, it is equivalent to `st .`, opening the current folder in Sublime Text
1009+ * If `stt` command is called, it is equivalent to `st .`, opening the current folder in Sublime Text
1010+ 
1011+ * If `sst` command is called, it is like `sudo st`, opening the file or folder in Sublime Text. Useful for editing system protected files.
1012diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh
1013index 38a7596fd9183ea388210eaa48cbb64224f59beb..3e338e4d301bd1df47340a941d5c40023af9f716 100644
1014--- a/plugins/sublime/sublime.plugin.zsh
1015+++ b/plugins/sublime/sublime.plugin.zsh
1016@@ -5,6 +5,7 @@ if [[ $('uname') == 'Linux' ]]; then
1017     _sublime_linux_paths=(
1018         "$HOME/bin/sublime_text"
1019         "/opt/sublime_text/sublime_text"
1020+        "/opt/sublime_text_3/sublime_text"
1021         "/usr/bin/sublime_text"
1022         "/usr/local/bin/sublime_text"
1023         "/usr/bin/subl"
1024@@ -33,7 +34,7 @@ elif  [[ "$OSTYPE" = darwin* ]]; then
1025 
1026     for _sublime_path in $_sublime_darwin_paths; do
1027         if [[ -a $_sublime_path ]]; then
1028-            alias subl="'$_sublime_path'"
1029+            subl () { "$_sublime_path" $* }
1030             alias st=subl
1031             break
1032         fi
1033diff --git a/plugins/taskwarrior/taskwarrior.plugin.zsh b/plugins/taskwarrior/taskwarrior.plugin.zsh
1034index c1830042eff664d503d7b8d9fbcd1bc6605ee29f..5d1e6ffea23fabfa87ae3d3e2f81dd1082d85684 100644
1035--- a/plugins/taskwarrior/taskwarrior.plugin.zsh
1036+++ b/plugins/taskwarrior/taskwarrior.plugin.zsh
1037@@ -8,7 +8,7 @@
1038 # TaskWarrior<http://taskwarrior.org/>. It uses the zsh tab completion
1039 # script (_task) distributed with TaskWarrior for the completion definitions.
1040 #
1041-# Typing task[tabtab] will give you a list of current tasks, task 66[tabtab]
1042+# Typing task [tabtab] will give you a list of current tasks, task 66[tabtab]
1043 # gives a list of available modifications for that task, etc.
1044 ################################################################################
1045 
1046diff --git a/plugins/tugboat/_tugboat b/plugins/tugboat/_tugboat
1047new file mode 100644
1048index 0000000000000000000000000000000000000000..6bf736920ebb1a8d2c358928cb3f81b9790c0c81
1049--- /dev/null
1050+++ b/plugins/tugboat/_tugboat
1051@@ -0,0 +1,106 @@
1052+#compdef tugboat
1053+#autoload
1054+
1055+# Tugboat zsh autocompletion
1056+
1057+
1058+local -a _commands
1059+_commands=(
1060+  'add-key:[NAME] Upload an ssh public key.'
1061+  'authorize:Authorize a DigitalOcean account with tugboat.'
1062+  'create:[NAME] Create a droplet.'
1063+  'destroy:[FUZZY_NAME] Destroy a droplet.'
1064+  'destroy_image:[FUZZY_NAME] Destroy an image.'
1065+  'droplets:Retrieve a list of your droplets.'
1066+  'halt:[FUZZY_NAME] Shutdown a droplet.'
1067+  'help:[COMMAND] Describe commands or a specific command.'
1068+  'images:Retrieve a list of your images.'
1069+  'info:[FUZZY_NAME] [OPTIONS] Show a droplets information.'
1070+  'info_image:[FUZZY_NAME] [OPTIONS] Show an images information.'
1071+  'keys:Show available SSH keys.'
1072+  'password-reset:[FUZZY_NAME] Reset root password.'
1073+  'rebuild:[FUZZY_NAME] [IMAGE_NAME] Rebuild a droplet.'
1074+  'regions:Show regions.'
1075+  'resize:[FUZZY_NAME -s, --size=N] Resize a droplet.'
1076+  'restart:[FUZZY_NAME] Restart a droplet.'
1077+  'sizes:Show available droplet sizes.'
1078+  'snapshot:[SNAPSHOT_NAME] [FUZZY_NAME] [OPTIONS] Queue a snapshot of the droplet.'
1079+  'ssh:[FUZZY_NAME] SSH into a droplet.'
1080+  'start:[FUZZY_NAME] Start a droplet.'
1081+  'verify:Check your DigitalOcean credentials.'
1082+  'version:Show version.'
1083+  'wait:[FUZZY_NAME] Wait for a droplet to reach a state.'
1084+)
1085+
1086+local -a _create_arguments
1087+_create_arguments=(
1088+  '-s:[--size=N] The size_id of the droplet'
1089+  '-i:[--image=N] The image_id of the droplet'
1090+  '-r:[--region=N] The region_id of the droplet'
1091+  '-k:[--keys=KEYS] A comma separated list of SSH key ids to add to the droplet'
1092+  '-p:[--private-networking] Enable private networking on the droplet'
1093+  '-b:[--backups-enabled] Enable backups on the droplet'
1094+  '-q:[--quiet]'
1095+)
1096+
1097+__task_list ()
1098+{
1099+  local expl
1100+  declare -a tasks
1101+
1102+  arguments=(add-key authorize create destroy destroy_image droplets halt help images info info_image keys password-reset rebuild regions resize restart sizes snapshot ssh start verify version wait)
1103+
1104+  _wanted tasks expl 'help' compadd $arguments
1105+}
1106+
1107+__droplets_list ()
1108+{
1109+    _wanted application expl 'command' compadd $(command tugboat droplets | cut -d " " -f1)
1110+}
1111+
1112+__tugboat-create ()
1113+{
1114+    local curcontext="$curcontext" state line
1115+    typeset -A opt_args
1116+
1117+    _arguments -C \
1118+        ':command:->command' \
1119+        '*::options:->options'
1120+
1121+    case $state in
1122+        (command)
1123+            _describe -t commands "gem subcommand" _create_arguments
1124+            return
1125+        ;;
1126+    esac
1127+}
1128+
1129+local curcontext="$curcontext" state line
1130+typeset -A opt_args
1131+
1132+_arguments -C \
1133+    ':command:->command' \
1134+    '*::options:->options'
1135+
1136+case $state in
1137+  (command)
1138+    _describe -t commands "gem subcommand" _commands
1139+    return
1140+  ;;
1141+
1142+  (options)
1143+    case $line[1] in
1144+      (help)
1145+        _arguments ':feature:__task_list'
1146+      ;;
1147+
1148+      (ssh)
1149+        _arguments ':feature:__droplets_list'
1150+      ;;
1151diff --git a/plugins/vi-mode/README.md b/plugins/vi-mode/README.md
1152new file mode 100644
1153index 0000000000000000000000000000000000000000..03e67cca27a332e49b2d92577e1547c628744da3
1154--- /dev/null
1155+++ b/plugins/vi-mode/README.md
1156@@ -0,0 +1,75 @@
1157+vi-mode
1158+=======
1159+This plugin increase `vi-like` zsh functionality.
1160+
1161+Use `ESC` or `CTRL-[` to enter `Normal mode`.
1162+
1163+
1164+History
1165+-------
1166+
1167+- `ctrl-p` : Previous command in history
1168+- `ctrl-n` : Next command in history
1169+- `/`      : Search backward in history
1170+- `n`      : Repeat the last `/`
1171+
1172+
1173+Mode indicators
1174+---------------
1175+
1176+*Normal mode* is indicated with red `<<<` mark at the right prompt, when it
1177+wasn't defined by theme.
1178+
1179+
1180+Vim edition
1181+-----------
1182+
1183+- `v`   : Edit current command line in Vim
1184+
1185+
1186+Movement
1187+--------
1188+
1189+- `$`   : To the end of the line
1190+- `^`   : To the first non-blank character of the line
1191+- `0`   : To the first character of the line
1192+- `w`   : [count] words forward
1193+- `W`   : [count] WORDS forward
1194+- `e`   : Forward to the end of word [count] inclusive
1195+- `E`   : Forward to the end of WORD [count] inclusive
1196+- `b`   : [count] words backward
1197+- `B`   : [count] WORDS backward
1198+- `t{char}`   : Till before [count]'th occurrence of {char} to the right
1199+- `T{char}`   : Till before [count]'th occurrence of {char} to the left
1200+- `f{char}`   : To [count]'th occurrence of {char} to the right
1201+- `F{char}`   : To [count]'th occurrence of {char} to the left
1202+- `;`   : Repeat latest f, t, F or T [count] times
1203+- `,`   : Repeat latest f, t, F or T in opposite direction
1204+
1205+
1206+Insertion
1207+---------
1208+
1209+- `i`   : Insert text before the cursor
1210+- `I`   : Insert text before the first character in the line
1211+- `a`   : Append text after the cursor
1212+- `A`   : Append text at the end of the line
1213+- `o`   : Insert new command line below the current one
1214+- `O`   : Insert new command line above the current one
1215+
1216+
1217+Delete and Insert
1218+-----------------
1219+
1220+- `ctrl-h`      : While in *Insert mode*: delete character after the cursor
1221+- `ctrl-w`      : While in *Insert mode*: delete word after the cursor
1222+- `d{motion}`   : Delete text that {motion} moves over
1223+- `dd`          : Delete line
1224+- `D`           : Delete characters under the cursor until the end of the line
1225+- `c{motion}`   : Delete {motion} text and start insert
1226+- `cc`          : Delete line and start insert
1227+- `C`           : Delete to the end of the line and start insert
1228+- `r{char}`     : Replace the character under the cursor with {char}
1229+- `R`           : Enter replace mode: Each character replaces existing one
1230+- `x`           : Delete [count] characters under and after the cursor
1231+- `X`           : Delete [count] characters before the cursor
1232diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
1233index 5faa1a823aa7c9764aef2eb95aed5fa16a5e3bb4..b2c804edb298a4fbb2ff3291235e948522778689 100644
1234--- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
1235+++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
1236@@ -1,10 +1,18 @@
1237 virtualenvwrapper='virtualenvwrapper.sh'
1238 
1239 if (( $+commands[$virtualenvwrapper] )); then
1240-  source ${${virtualenvwrapper}:c}
1241+  function {
1242+    setopt local_options
1243+    unsetopt equals
1244+    source ${${virtualenvwrapper}:c}
1245+  }
1246 elif [[ -f "/etc/bash_completion.d/virtualenvwrapper" ]]; then
1247-  virtualenvwrapper="/etc/bash_completion.d/virtualenvwrapper"
1248-  source "/etc/bash_completion.d/virtualenvwrapper"
1249+  function {
1250+    setopt local_options
1251+    unsetopt equals
1252+    virtualenvwrapper="/etc/bash_completion.d/virtualenvwrapper"
1253+    source "/etc/bash_completion.d/virtualenvwrapper"
1254+  }
1255 else
1256   print "zsh virtualenvwrapper plugin: Cannot find ${virtualenvwrapper}.\n"\
1257         "Please install with \`pip install virtualenvwrapper\`" >&2
1258diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh
1259index 572427b0b61209f03616ae14cdd9d0b3bf67e109..d407edb964f67a222a630eb16c22573d6e05e655 100644
1260--- a/plugins/web-search/web-search.plugin.zsh
1261+++ b/plugins/web-search/web-search.plugin.zsh
1262@@ -11,6 +11,7 @@ function web_search() {
1263     yahoo       "https://search.yahoo.com/search?p="
1264     duckduckgo  "https://www.duckduckgo.com/?q="
1265     yandex      "https://yandex.ru/yandsearch?text="
1266+    github      "https://github.com/search?q="
1267   )
1268 
1269   # define the open command
1270@@ -49,6 +50,7 @@ alias google='web_search google'
1271 alias yahoo='web_search yahoo'
1272 alias ddg='web_search duckduckgo'
1273 alias yandex='web_search yandex'
1274+alias github='web_search github'
1275 
1276 #add your own !bang searches here
1277 alias wiki='web_search duckduckgo \!w'
1278diff --git a/plugins/zeus/zeus.plugin.zsh b/plugins/zeus/zeus.plugin.zsh
1279index 5ec9fa57941f5c721e2d3db6fe6c71c33ee2b23f..0c01083a5a3e90096b092db19542c68b52fddfae 100644
1280--- a/plugins/zeus/zeus.plugin.zsh
1281+++ b/plugins/zeus/zeus.plugin.zsh
1282@@ -19,8 +19,8 @@ alias zsr='zeus server'
1283 alias zerver='zeus server'
1284 
1285 # Rake
1286-alias zr='zeus rake'
1287-alias zake='zeus rake'
1288+alias zr='noglob zeus rake'
1289+alias zake='noglob zeus rake'
1290 
1291 # Generate
1292 alias zg='zeus generate'
1293diff --git a/themes/adben.zsh-theme b/themes/adben.zsh-theme
1294index 212b823a5c95c3a8bd64f39480fb7b9ab6d2be25..e4774cf0ed9d6535e164416382a1e4fa559c1491 100644
1295--- a/themes/adben.zsh-theme
1296+++ b/themes/adben.zsh-theme
1297@@ -42,7 +42,7 @@ GREEN_BASE_START="${PR_RESET}${PR_GREY}>${PR_RESET}${PR_GREEN}>${PR_BRIGHT_GREEN
1298 GREEN_START_P1="${PR_RESET}${GREEN_BASE_START}${PR_RESET} "
1299 DIVISION="${PR_RESET}${PR_RED} < ${PR_RESET}"
1300 VCS_DIRTY_COLOR="${PR_RESET}${PR_YELLOW}"
1301-Vcs_CLEAN_COLOR="${PR_RESET}${PR_GREEN}"
1302+VCS_CLEAN_COLOR="${PR_RESET}${PR_GREEN}"
1303 VCS_SUFIX_COLOR="${PR_RESET}${PR_RED}› ${PR_RESET}"
1304 # ########## COLOR ###########
1305 # ########## SVN ###########
1306diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme
1307index 8c7be6e0123e95f7c737966e3f975d8a67102808..b8d0b58722302256657e33440137ce1e852b84d2 100644
1308--- a/themes/agnoster.zsh-theme
1309+++ b/themes/agnoster.zsh-theme
1310@@ -126,7 +126,7 @@ prompt_hg() {
1311       if `hg st | grep -q "^\?"`; then
1312         prompt_segment red black
1313         st='±'
1314-      elif `hg st | grep -q "^(M|A)"`; then
1315+      elif `hg st | grep -q "^[MA]"`; then
1316         prompt_segment yellow black
1317         st='±'
1318       else
1319diff --git a/themes/avit.zsh-theme b/themes/avit.zsh-theme
1320index a21a9c8c4cbd2831d24fb35338583e1bdb7ea6ff..65466b82f4458e52c4728801c2c76a8b0b43291a 100644
1321--- a/themes/avit.zsh-theme
1322+++ b/themes/avit.zsh-theme
1323@@ -38,34 +38,32 @@ function _ruby_version() {
1324 # Determine the time since last commit. If branch is clean,
1325 # use a neutral color, otherwise colors will vary according to time.
1326 function _git_time_since_commit() {
1327-  if git rev-parse --git-dir > /dev/null 2>&1; then
1328-    # Only proceed if there is actually a commit.
1329-    if [[ $(git log 2>&1 > /dev/null | grep -c "^fatal: bad default revision") == 0 ]]; then
1330-      # Get the last commit.
1331-      last_commit=$(git log --pretty=format:'%at' -1 2> /dev/null)
1332-      now=$(date +%s)
1333-      seconds_since_last_commit=$((now-last_commit))
1334-
1335-      # Totals
1336-      minutes=$((seconds_since_last_commit / 60))
1337-      hours=$((seconds_since_last_commit/3600))
1338-
1339-      # Sub-hours and sub-minutes
1340-      days=$((seconds_since_last_commit / 86400))
1341-      sub_hours=$((hours % 24))
1342-      sub_minutes=$((minutes % 60))
1343-
1344-      if [ $hours -gt 24 ]; then
1345-          commit_age="${days}d"
1346-      elif [ $minutes -gt 60 ]; then
1347-          commit_age="${sub_hours}h${sub_minutes}m"
1348-      else
1349-          commit_age="${minutes}m"
1350-      fi
1351-
1352-      color=$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL
1353-      echo "$color$commit_age%{$reset_color%}"
1354+# Only proceed if there is actually a commit.
1355+  if git log -1 > /dev/null 2>&1; then
1356+    # Get the last commit.
1357+    last_commit=$(git log --pretty=format:'%at' -1 2> /dev/null)
1358+    now=$(date +%s)
1359+    seconds_since_last_commit=$((now-last_commit))
1360+
1361+    # Totals
1362+    minutes=$((seconds_since_last_commit / 60))
1363+    hours=$((seconds_since_last_commit/3600))
1364+
1365+    # Sub-hours and sub-minutes
1366+    days=$((seconds_since_last_commit / 86400))
1367+    sub_hours=$((hours % 24))
1368+    sub_minutes=$((minutes % 60))
1369+
1370+    if [ $hours -gt 24 ]; then
1371+      commit_age="${days}d"
1372+    elif [ $minutes -gt 60 ]; then
1373+      commit_age="${sub_hours}h${sub_minutes}m"
1374+    else
1375+      commit_age="${minutes}m"
1376     fi
1377+
1378+    color=$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL
1379+    echo "$color$commit_age%{$reset_color%}"
1380   fi
1381 }
1382 
1383@@ -99,4 +97,3 @@ ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[grey]%}"
1384 export LSCOLORS="exfxcxdxbxegedabagacad"
1385 export LS_COLORS='di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:'
1386 export GREP_COLOR='1;33'
1387-
1388diff --git a/themes/michelebologna.zsh-theme b/themes/michelebologna.zsh-theme
1389index a7599c8f52ce077e2b4aa7dd223f86a528cec1f4..fec2438734af2f0fcd5a03bd882ffce52598e471 100644
1390--- a/themes/michelebologna.zsh-theme
1391+++ b/themes/michelebologna.zsh-theme
1392@@ -1,44 +1,74 @@
1393-# reference colors
1394-GREEN="%{$fg_bold[green]%}"
1395-RED="%{$fg_bold[red]%}"
1396-CYAN="%{$fg_bold[cyan]%}"
1397-YELLOW="%{$fg_bold[yellow]%}"
1398-BLUE="%{$fg_bold[blue]%}"
1399-MAGENTA="%{$fg_bold[magenta]%}"
1400-WHITE="%{$fg_bold[white]%}"
1401-
1402-COLOR_ARRAY=($GREEN $RED $CYAN $YELLOW $BLUE $MAGENTA $WHITE)
1403-
1404-# color reset
1405-RESET_COLOR="%{$reset_color%}"
1406-
1407-# which color should be applied?
1408-USERNAME_NORMAL_COLOR=$WHITE
1409-USERNAME_ROOT_COLOR=$RED
1410-HOSTNAME_NORMAL_COLOR=$BLUE
1411-# uncomment next line if you want auto-generated hostname color
1412-#for i in $HOST; HOSTNAME_NORMAL_COLOR=$COLOR_ARRAY[$[((#i))%7+1]]
1413-HOSTNAME_ROOT_COLOR=$RED
1414-HOSTNAME_COLOR=%(!.$HOSTNAME_ROOT_COLOR.$HOSTNAME_NORMAL_COLOR)
1415-CURRENT_DIR_COLOR=$CYAN
1416-
1417-# zsh commands
1418-USERNAME_COMMAND="%n"
1419-HOSTNAME_COMMAND="%m"
1420-CURRENT_DIR="%~"
1421-
1422-# output: colors + commands
1423-USERNAME_OUTPUT="%(!..$USERNAME_NORMAL_COLOR$USERNAME_COMMAND$RESET_COLOR@)"
1424-HOSTNAME_OUTPUT="$HOSTNAME_COLOR$HOSTNAME_COMMAND$RESET_COLOR"
1425-CURRENT_DIR_OUTPUT="$CURRENT_DIR_COLOR$CURRENT_DIR"
1426-LAST_COMMAND_OUTPUT="%(?.%(!.$RED.$GREEN).$YELLOW)"
1427-
1428-# git theming
1429-ZSH_THEME_GIT_PROMPT_PREFIX="("
1430+# Michele Bologna's theme
1431+# http://michelebologna.net
1432+#
1433+# This a theme for oh-my-zsh. Features a colored prompt with:
1434+# * username@host: [jobs] [git] workdir % 
1435+# * hostname color is based on hostname characters. When using as root, the 
1436+# prompt shows only the hostname in red color.
1437+# * [jobs], if applicable, counts the number of suspended jobs tty
1438+# * [git], if applicable, represents the status of your git repo (more on that
1439+# later)
1440+# * '%' prompt will be green if last command return value is 0, yellow otherwise.
1441+# 
1442+# git prompt is inspired by official git contrib prompt: 
1443+# https://github.com/git/git/tree/master/contrib/completion/git-prompt.sh
1444+# and it adds:
1445+# * the current branch
1446+# * '%' if there are untracked files
1447+# * '$' if there are stashed changes
1448+# * '*' if there are modified files
1449+# * '+' if there are added files
1450+# * '<' if local repo is behind remote repo
1451+# * '>' if local repo is ahead remote repo
1452+# * '=' if local repo is equal to remote repo (in sync)
1453+# * '<>' if local repo is diverged
1454+
1455+local green="%{$fg_bold[green]%}"
1456+local red="%{$fg_bold[red]%}"
1457+local cyan="%{$fg_bold[cyan]%}"
1458+local yellow="%{$fg_bold[yellow]%}"
1459+local blue="%{$fg_bold[blue]%}"
1460+local magenta="%{$fg_bold[magenta]%}"
1461+local white="%{$fg_bold[white]%}"
1462+local reset="%{$reset_color%}"
1463+
1464+local -a color_array
1465+color_array=($green $red $cyan $yellow $blue $magenta $white)
1466+
1467+local username_normal_color=$white
1468+local username_root_color=$red
1469+local hostname_root_color=$red
1470+
1471+# calculating hostname color with hostname characters
1472+for i in `hostname`; local hostname_normal_color=$color_array[$[((#i))%7+1]]
1473+local -a hostname_color
1474+hostname_color=%(!.$hostname_root_color.$hostname_normal_color)
1475+
1476+local current_dir_color=$blue
1477+local username_command="%n"
1478+local hostname_command="%m"
1479+local current_dir="%~"
1480+
1481+local username_output="%(!..$username_normal_color$username_command$reset@)"
1482+local hostname_output="$hostname_color$hostname_command$reset"
1483+local current_dir_output="$current_dir_color$current_dir$reset"
1484+local jobs_bg="${red}fg: %j$reset"
1485+local last_command_output="%(?.%(!.$red.$green).$yellow)"
1486+
1487+ZSH_THEME_GIT_PROMPT_PREFIX=""
1488 ZSH_THEME_GIT_PROMPT_SUFFIX=""
1489-ZSH_THEME_GIT_PROMPT_DIRTY=")$RED*"
1490-ZSH_THEME_GIT_PROMPT_CLEAN=")"
1491+ZSH_THEME_GIT_PROMPT_DIRTY=""
1492diff --git a/themes/strug.zsh-theme b/themes/strug.zsh-theme
1493new file mode 100644
1494index 0000000000000000000000000000000000000000..89b56b008672b996a25f69eff25337eb5fc1693a
1495--- /dev/null
1496+++ b/themes/strug.zsh-theme
1497@@ -0,0 +1,25 @@
1498+# terminal coloring
1499+export CLICOLOR=1
1500+export LSCOLORS=dxFxCxDxBxegedabagacad
1501+
1502+local git_branch='$(git_prompt_info)%{$reset_color%}$(git_remote_status)'
1503+
1504+PROMPT="%{$fg[green]%}╭─%n@%m %{$reset_color%}%{$fg[yellow]%}in %~ %{$reset_color%}${git_branch}
1505+%{$fg[green]%}╰\$ %{$reset_color%}"
1506+
1507+ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%}on "
1508+ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}"
1509+
1510+ZSH_THEME_GIT_PROMPT_DIRTY="%{$reset_color%}%{$fg[red]%} ✘ %{$reset_color%}"
1511+ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} ✔ %{$reset_color%}"
1512+
1513+ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_DETAILED=true
1514+ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_PREFIX="%{$fg[yellow]%}("
1515+ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_SUFFIX="%{$fg[yellow]%})%{$reset_color%}"
1516+
1517+ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=" +"
1518+ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR=%{$fg[green]%}
1519+
1520+ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE=" -"
1521+ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR=%{$fg[red]%}
1522+
1523diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh
1524index b2b356e0cb957a0701b29732be1a2a43cd760e12..5afd83c1e18da0bbd015c1aff308925f749a395c 100644
1525--- a/tools/check_for_upgrade.sh
1526+++ b/tools/check_for_upgrade.sh
1527@@ -41,10 +41,9 @@ then
1528     then
1529       _upgrade_zsh
1530     else
1531-      echo "[Oh My Zsh] Would you like to check for updates?"
1532-      echo "Type Y to update oh-my-zsh: \c"
1533+      echo "[Oh My Zsh] Would you like to check for updates? [Y/n]: \c"
1534       read line
1535-      if [ "$line" = Y ] || [ "$line" = y ]; then
1536+      if [ "$line" = Y ] || [ "$line" = y ] || [ -z "$line" ]; then
1537         _upgrade_zsh
1538       else
1539         _update_zsh_update