00eb4658304b010afdfa87f74be673c8aced4961

Author
Andrew Janke <andrew@apjanke.net>
Committer
Andrew Janke <andrew@apjanke.net>
Date

Message

Merge branch 'master' into fold-terminalapp-plugin-into-termsupport

Diff

This diff is truncated to protect this page.

   1diff --git a/MIT-LICENSE.txt b/MIT-LICENSE.txt
   2index 6eb8aab34f66de325a336c327b9abb1b476e6ad3..dfbd90035cc448b0c75d935ef98d2144cf49fc84 100644
   3--- a/MIT-LICENSE.txt
   4+++ b/MIT-LICENSE.txt
   5@@ -1,6 +1,6 @@
   6 The MIT License
   7 
   8-Copyright (c) 2009-2014 Robby Russell and contributors (see https://github.com/robbyrussell/oh-my-zsh/contributors)
   9+Copyright (c) 2009-2015 Robby Russell and contributors (see https://github.com/robbyrussell/oh-my-zsh/contributors)
  10 
  11 Permission is hereby granted, free of charge, to any person obtaining a copy
  12 of this software and associated documentation files (the "Software"), to deal
  13diff --git a/README.markdown b/README.markdown
  14new file mode 100644
  15index 0000000000000000000000000000000000000000..d4d3fdbaf273203bf635f392b8df83a5e128d16f
  16--- /dev/null
  17+++ b/README.markdown
  18@@ -0,0 +1,201 @@
  19+![Oh My Zsh](https://s3.amazonaws.com/ohmyzsh/oh-my-zsh-logo.png)
  20+
  21+
  22+Oh My Zsh is an open source, community-driven framework for managing your [zsh](http://www.zsh.org/) configuration. That sounds boring. Let's try this again.
  23+
  24diff --git a/README.textile b/README.textile
  25deleted file mode 100644
  26index 09cff21353f485b606131ce5b499cca2863f6c9b..0000000000000000000000000000000000000000
  27--- a/README.textile
  28+++ /dev/null
  29@@ -1,111 +0,0 @@
  30-!https://s3.amazonaws.com/ohmyzsh/oh-my-zsh-logo.png!
  31-
  32-@oh-my-zsh@ is an open source, community-driven framework for managing your "Zsh":http://www.zsh.org/ configuration.
  33-
  34-It comes bundled with a ton of helpful functions, helpers, plugins, themes, and a few things that make you shout…
  35-
  36-bq. "OH MY ZSHELL!"
  37-
  38-h2. Setup
  39-
  40-@oh-my-zsh@ should work with any recent release of "Zsh":http://www.zsh.org/. The minimum recommended version is *4.3.9*.
  41-
  42-If not already installed, you can install "Zsh":http://www.zsh.org/ using the command-line.
  43-
  44-h3. The automatic installer… do you trust me?
  45-
  46-You can install this via the command-line with either @curl@ or @wget@.
  47-
  48-h4. via @curl@:
  49-
  50-@curl -L http://install.ohmyz.sh | sh@
  51-
  52-h4. via @wget@:
  53-
  54-@wget --no-check-certificate http://install.ohmyz.sh -O - | sh@
  55-
  56-h4. *Optionally*, change the install directory:
  57-
  58-The default location is @~/.oh-my-zsh@ (hidden in your home directory).
  59-
  60-You can change the install directory with the @ZSH@ environment variable, either by running @export ZSH=/your/path@ before installing, or by setting it before the end of the install pipeline like this:
  61-
  62-@curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | ZSH=~/.dotfiles/zsh sh@
  63-
  64-h3. The manual way
  65-
  66-1. Clone the repository:
  67-
  68-@git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh@
  69-
  70-2. *Optionally*, backup your existing @~/.zshrc@ file:
  71-
  72-@cp ~/.zshrc ~/.zshrc.orig@
  73-
  74-3. Create a new "Zsh":http://www.zsh.org/ config file by copying the "Zsh":http://www.zsh.org/ template we've provided:
  75-
  76-@cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc@
  77-
  78-4. Set "Zsh":http://www.zsh.org/ as your default shell:
  79-
  80-@chsh -s /bin/zsh@
  81-
  82-5. Start or restart "Zsh":http://www.zsh.org/ by opening a new command-line window.
  83-
  84-h3. Problems?
  85-
  86-You _might_ need to modify your @PATH@ in @~/.zshrc@ if you're not able to find some commands after switching to @oh-my-zsh@.
  87-
  88-If you installed manually or changed the install location, check the @ZSH@ environment variable in @~/.zshrc@.
  89-
  90-h2. Usage
  91-
  92-* enable the plugins you want in your @~/.zshrc@ (take a look at the @plugins/@ directory and the "wiki":https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins to see what's available)
  93-** example: @plugins=(git osx ruby)@
  94-* theme support: change the @ZSH_THEME@ environment variable in @~/.zshrc@
  95-** take a look at the @themes/@ directory and the "wiki":https://wiki.github.com/robbyrussell/oh-my-zsh/themes to see what comes bundled with @oh-my-zsh@
  96-* & much, much more… take a look at the @lib/@ directory to see what @oh-my-zsh@ has to offer…
  97-
  98-h2. Useful
  99-
 100-The "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty useful for tips.
 101-
 102-h3. Customization
 103-
 104-If you want to override any of the default behaviors, just add a new file (ending in @.zsh@) in the @custom/@ directory.
 105-
 106-If you have many functions that go well together, you can put them as a @*.plugin.zsh@ file in the @custom/plugins/@ directory and then enable this plugin (see '"Usage":https://github.com/robbyrussell/oh-my-zsh#usage' above).
 107-
 108-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/@.
 109-
 110-h3. Updates
 111-
 112-By default you will be prompted to check for upgrades. If you would like @oh-my-zsh@ to automatically upgrade itself without prompting you, set the following in your @~/.zshrc@:
 113-
 114-@DISABLE_UPDATE_PROMPT=true@
 115-
 116-To disable upgrades entirely, set the following in your @~/.zshrc@:
 117-
 118-@DISABLE_AUTO_UPDATE=true@
 119-
 120-To upgrade directly from the command-line, just run @upgrade_oh_my_zsh@.
 121-
 122-h3. Uninstalling
 123-
 124-If you want to uninstall @oh-my-zsh@, just run @uninstall_oh_my_zsh@ from the command-line and it'll remove itself and revert you to @bash@ (or your previous "Zsh":http://www.zsh.org/ configuration).
 125-
 126-h2. Help out!
 127-
 128-I'm far from being a "Zsh":http://www.zsh.org/ expert and suspect there are many ways to improve – if you have ideas on how to make the configuration easier to maintain (and faster), don't hesitate to fork and send pull requests!
 129diff --git a/lib/completion.zsh b/lib/completion.zsh
 130index ea6139fde2ad8d83952be42f4c33347423ebcc87..452c0dfe765539dd6cf0a83f85037c7ac5f571a9 100644
 131--- a/lib/completion.zsh
 132+++ b/lib/completion.zsh
 133@@ -15,7 +15,12 @@ if [ "x$CASE_SENSITIVE" = "xtrue" ]; then
 134   zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
 135   unset CASE_SENSITIVE
 136 else
 137-  zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
 138+  if [ "x$HYPHEN_INSENSITIVE" = "xtrue" ]; then
 139+    zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
 140+    unset HYPHEN_INSENSITIVE
 141+  else
 142+    zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*'
 143+  fi
 144 fi
 145 
 146 zstyle ':completion:*' list-colors ''
 147@@ -34,7 +39,6 @@ fi
 148 
 149 # disable named-directories autocompletion
 150 zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories
 151-cdpath=(.)
 152 
 153 # Use caching so that commands like apt and dpkg complete are useable
 154 zstyle ':completion::complete:*' use-cache 1
 155diff --git a/lib/directories.zsh b/lib/directories.zsh
 156index 1a9698544d8802ea0b06ea11a0aba009826f9399..3bffa9fd96cef66fbd669c6e5087dddd1bb54d0b 100644
 157--- a/lib/directories.zsh
 158+++ b/lib/directories.zsh
 159@@ -24,9 +24,9 @@ alias d='dirs -v | head -10'
 160 
 161 # List directory contents
 162 alias lsa='ls -lah'
 163-alias l='ls -la'
 164-alias ll='ls -l'
 165-alias la='ls -lA'
 166+alias l='ls -lah'
 167+alias ll='ls -lh'
 168+alias la='ls -lAh'
 169 
 170 # Push and pop directories on directory stack
 171 alias pu='pushd'
 172diff --git a/lib/functions.zsh b/lib/functions.zsh
 173index 2a962669cb92555dc4d2ab5100de418ae6368610..efb73a1bd91170f1c2622635875ceb900942ee43 100644
 174--- a/lib/functions.zsh
 175+++ b/lib/functions.zsh
 176@@ -15,6 +15,22 @@ function take() {
 177   cd $1
 178 }
 179 
 180+function open_command() {
 181+  local open_cmd
 182+
 183+  # define the open command
 184+  case "$OSTYPE" in
 185+    darwin*)  open_cmd="open" ;;
 186+    cygwin*)  open_cmd="cygstart" ;;
 187+    linux*)   open_cmd="xdg-open" ;;
 188+    *)        echo "Platform $OSTYPE not supported"
 189+              return 1
 190+              ;;
 191+  esac
 192+
 193+  nohup $open_cmd "$@" &>/dev/null
 194+}
 195+
 196 #
 197 # Get the value of an alias.
 198 #
 199diff --git a/lib/git.zsh b/lib/git.zsh
 200index 118841f06efc88a698463a47698371c64619b5c5..caa7e632913251f9694b3a3b7cb357e2879e02cf 100644
 201--- a/lib/git.zsh
 202+++ b/lib/git.zsh
 203@@ -36,24 +36,27 @@ git_remote_status() {
 204         ahead=$(command git rev-list ${hook_com[branch]}@{upstream}..HEAD 2>/dev/null | wc -l)
 205         behind=$(command git rev-list HEAD..${hook_com[branch]}@{upstream} 2>/dev/null | wc -l)
 206 
 207-        if [ $ahead -eq 0 ] && [ $behind -gt 0 ]
 208+        if [ $ahead -gt 0 ] && [ $behind -eq 0 ]
 209         then
 210-            echo "$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE"
 211-        elif [ $ahead -gt 0 ] && [ $behind -eq 0 ]
 212+            git_remote_status="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE"
 213+            git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))%{$reset_color%}"
 214+        elif [ $behind -gt 0 ] && [ $ahead -eq 0 ] 
 215         then
 216-            echo "$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE"
 217+            git_remote_status="$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE"
 218+            git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE$((behind))%{$reset_color%}"
 219         elif [ $ahead -gt 0 ] && [ $behind -gt 0 ]
 220         then
 221-            echo "$ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE"
 222+            git_remote_status="$ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE"
 223+            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%}"
 224         fi
 225-    fi
 226-}
 227 
 228-# Checks if there are commits ahead from remote
 229-function git_prompt_ahead() {
 230-  if $(echo "$(command git log @{upstream}..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then
 231-    echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
 232-  fi
 233+        if [ $ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_DETAILED ]
 234+        then
 235+            git_remote_status="$ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_PREFIX$remote$git_remote_status_detailed$ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_SUFFIX"
 236+        fi
 237+
 238+        echo $git_remote_status
 239+    fi
 240 }
 241 
 242 # Gets the number of commits ahead from remote
 243@@ -64,6 +67,29 @@ function git_commits_ahead() {
 244   fi
 245 }
 246 
 247+# Outputs if current branch is ahead of remote
 248+function git_prompt_ahead() {
 249+  if [[ -n "$(command git rev-list origin/$(current_branch)..HEAD 2> /dev/null)" ]]; then
 250+    echo "$ZSH_THEME_GIT_PROMPT_AHEAD"
 251+  fi
 252+}
 253+
 254+# Outputs if current branch is behind remote
 255+function git_prompt_behind() {
 256+  if [[ -n "$(command git rev-list HEAD..origin/$(current_branch) 2> /dev/null)" ]]; then
 257+    echo "$ZSH_THEME_GIT_PROMPT_BEHIND"
 258+  fi
 259+}
 260+
 261+# Outputs if current branch exists on remote or not
 262+function git_prompt_remote() {
 263+  if [[ -n "$(command git show-ref origin/$(current_branch) 2> /dev/null)" ]]; then
 264+    echo "$ZSH_THEME_GIT_PROMPT_REMOTE_EXISTS"
 265+  else
 266+    echo "$ZSH_THEME_GIT_PROMPT_REMOTE_MISSING"
 267+  fi
 268+}
 269+
 270 # Formats prompt string for current git commit short SHA
 271 function git_prompt_short_sha() {
 272   SHA=$(command git rev-parse --short HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER"
 273diff --git a/lib/grep.zsh b/lib/grep.zsh
 274index 348ebe62316d8e3865949dcf01fd8906bd6c467b..3fa103d19a5827f021742f442aaf3c1148d980a5 100644
 275--- a/lib/grep.zsh
 276+++ b/lib/grep.zsh
 277@@ -3,8 +3,12 @@ grep-flag-available() {
 278     echo | grep $1 "" >/dev/null 2>&1
 279 }
 280 
 281+GREP_OPTIONS=""
 282+
 283 # color grep results
 284-GREP_OPTIONS="--color=auto"
 285+if grep-flag-available --color=auto; then
 286+    GREP_OPTIONS+=" --color=auto"
 287+fi
 288 
 289 # ignore VCS folders (if the necessary grep flags are available)
 290 VCS_FOLDERS="{.bzr,.cvs,.git,.hg,.svn}"
 291diff --git a/lib/misc.zsh b/lib/misc.zsh
 292index 0b7cb26967437479cae98aae452985a9e9cb1c8e..6d1a64e8dbc540fcbe3a84df20082d2416a4e1de 100644
 293--- a/lib/misc.zsh
 294+++ b/lib/misc.zsh
 295@@ -1,6 +1,10 @@
 296-## smart urls
 297-autoload -U url-quote-magic
 298-zle -N self-insert url-quote-magic
 299+## Load smart urls if available
 300+for d in $fpath; do
 301+	if [[ -e "$d/url-quote-magic" ]]; then
 302+		autoload -U url-quote-magic
 303+		zle -N self-insert url-quote-magic
 304+	fi
 305+done
 306 
 307 ## jobs
 308 setopt long_list_jobs
 309@@ -20,3 +24,6 @@ alias afind='ack-grep -il'
 310 if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then
 311 	export LC_CTYPE=${LANG%%:*} # pick the first entry from LANG
 312 fi
 313+
 314+# recognize comments
 315+setopt interactivecomments
 316diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh
 317index ff61d53295d17ad67eb3c387322e541fd00902e9..5f61fe8ef2d4e3cd34fe441dde04779f709f9fa7 100644
 318--- a/lib/termsupport.zsh
 319+++ b/lib/termsupport.zsh
 320@@ -8,6 +8,8 @@
 321 # Limited support for Apple Terminal (Terminal can't set window and tab separately)
 322 function title {
 323   emulate -L zsh
 324+  setopt prompt_subst
 325+  
 326   [[ "$EMACS" == *term* ]] && return
 327 
 328   # if $2 is unset use $1 as default
 329@@ -24,6 +26,10 @@ function title {
 330 
 331 ZSH_THEME_TERM_TAB_TITLE_IDLE="%15<..<%~%<<" #15 char left truncated PWD
 332 ZSH_THEME_TERM_TITLE_IDLE="%n@%m: %~"
 333+# Avoid duplication of directory in terminals with independent dir display
 334+if [[ $TERM_PROGRAM == Apple_Terminal ]]; then
 335+  ZSH_THEME_TERM_TITLE_IDLE="%n@%m"
 336+fi
 337 
 338 # Runs before showing the prompt
 339 function omz_termsupport_precmd {
 340@@ -45,7 +51,7 @@ function omz_termsupport_preexec {
 341   setopt extended_glob
 342 
 343   # cmd name only, or if this is sudo or ssh, the next cmd
 344-  local CMD=${1[(wr)^(*=*|sudo|ssh|rake|-*)]:gs/%/%%}
 345+  local CMD=${1[(wr)^(*=*|sudo|ssh|mosh|rake|-*)]:gs/%/%%}
 346   local LINE="${2:gs/%/%%}"
 347 
 348   title '$CMD' '%100>...>$LINE%<<'
 349diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh
 350index bc7a8e4966426a5f0f43c34153b7c5dbfac8240b..4e5f77990dd567ca1495ed2af948473609ed1bfe 100644
 351--- a/oh-my-zsh.sh
 352+++ b/oh-my-zsh.sh
 353@@ -14,7 +14,7 @@ if [[ -z "$ZSH_CUSTOM" ]]; then
 354     ZSH_CUSTOM="$ZSH/custom"
 355 fi
 356 
 357-# Set ZSH_CACHE_DIR to the path where cache files sould be created
 358+# Set ZSH_CACHE_DIR to the path where cache files should be created
 359 # or else we will use the default cache/
 360 if [[ -z "$ZSH_CACHE_DIR" ]]; then
 361   ZSH_CACHE_DIR="$ZSH/cache/"
 362diff --git a/plugins/adb/_adb b/plugins/adb/_adb
 363index 4c998172dd98ebaeb2e8688cbf56f40f2473dd74..f30f3247f1ecbb884b260f83e6507e94fcab7203 100644
 364--- a/plugins/adb/_adb
 365+++ b/plugins/adb/_adb
 366@@ -16,13 +16,22 @@ _1st_arguments=(
 367 'help:show the help message'
 368 'install:push this package file to the device and install it'
 369 'jdwp:list PIDs of processes hosting a JDWP transport'
 370-'logcat:View device log'
 371+'kill-server:kill the server if it is running'
 372+'logcat:view device log'
 373 'pull:copy file/dir from device'
 374 'push:copy file/dir to device'
 375+'reboot:reboots the device, optionally into the bootloader or recovery program'
 376+'reboot-bootloader:reboots the device into the bootloader'
 377+'remount:remounts the partitions on the device read-write'
 378+'root:restarts the adbd daemon with root permissions'
 379+'sideload:push a ZIP to device and install it'
 380 'shell:run remote shell interactively'
 381 'sync:copy host->device only if changed (-l means list but dont copy)'
 382+'start-server:ensure that there is a server running'
 383+'tcpip:restart host adb in tcpip mode'
 384 'uninstall:remove this app package from the device'
 385 'version:show version num'
 386+'wait-for-device:block until device is online'
 387 )
 388 
 389 local expl
 390diff --git a/plugins/apache2-macports/README.md b/plugins/apache2-macports/README.md
 391new file mode 100644
 392index 0000000000000000000000000000000000000000..099fc8da31dbe0fb2850e3336c45357b14ec5dbd
 393--- /dev/null
 394+++ b/plugins/apache2-macports/README.md
 395@@ -0,0 +1,19 @@
 396+## APACHE2 MACPORTS PLUGIN
 397+
 398+
 399+---
 400+
 401+### FEATURES
 402+
 403+| Alias          | Function                                                                       | Description           |
 404+|:--------------:|:-------------------------------------------------------------------------------|----------------------:|
 405+| apache2restart | sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper restart | Restart apache daemon |
 406+| apache2start   | sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper start   | Start apache daemon   |
 407+| apache2stop    | sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper stop    | Stop apache daemon    |
 408+
 409+---
 410+
 411+### CONTRIBUTORS
 412+ - Alexander Rinass (alex@rinass.net)
 413+
 414+---
 415diff --git a/plugins/archlinux/README.md b/plugins/archlinux/README.md
 416new file mode 100644
 417index 0000000000000000000000000000000000000000..ad42d4cd282bfe7047d9e10b5c9bb834431f8234
 418--- /dev/null
 419+++ b/plugins/archlinux/README.md
 420@@ -0,0 +1,64 @@
 421+## ARCHLINUX PLUGIN
 422+
 423+
 424+---
 425+
 426+### FEATURES
 427+
 428+| Alias        | Function                                | Description                                                                                                         |
 429+|:------------:|-----------------------------------------|:--------------------------------------------------------------------------------------------------------------------|
 430+| pacin        | sudo pacman -S                          | Install specific package(s) from the repositories                                                                   |
 431+| pacins       | sudo pacman -U                          | Install specific package not from the repositories but from a file                                                  |
 432+| pacinsd      | sudo pacman -S --asdeps                 | Install given package(s) as dependencies of another package                                                         |
 433+| pacloc       | pacman -Qi                              | Display information about a given package in the local database                                                     |
 434+| paclocs      | pacman -Qs                              | Search for package(s) in the local database                                                                         |
 435+| paclsorphans | sudo pacman -Qdt'                       | List all orphaned packages                                                                                          |
 436+| pacmir       | sudo pacman -Syy                        | Force refresh of all package lists after updating /etc/pacman.d/mirrorlist                                          |
 437+| pacre        | sudo pacman -R                          | Remove the specified package(s), retaining its configuration(s) and required dependencies                           |
 438+| pacrem       | sudo pacman -Rns                        | Remove the specified package(s), its configuration(s) and unneeded dependencies                                     |
 439+| pacrep       | pacman -Si                              | Display information about a given package in the repositories                                                       |
 440+| pacreps      | pacman -Ss                              | Search for package(s) in the repositories                                                                           |
 441+| pacrmorphans | sudo pacman -Rs $(pacman -Qtdq)'        | Delete all orphaned packages                                                                                        |
 442+| pacupd       | sudo pacman -Sy && sudo abs && sudo aur | Update and refresh the local package, ABS and AUR databases against repositories                                    |
 443+| pacupd       | sudo pacman -Sy && sudo abs             | Update and refresh the local package and ABS databases against repositories                                         |
 444+| pacupd       | sudo pacman -Sy && sudo aur             | Update and refresh the local package and AUR databases against repositories                                         |
 445+| pacupd       | sudo pacman -Sy                         | Update and refresh the local package database against repositories                                                  |
 446+| pacupg       | sudo pacman -Syu                        | Synchronize with repositories before upgrading packages that are out of date on the local system.                   |
 447+| yaconf       | yaourt -C                               | Fix all configuration files with vimdiff                                                                            |
 448+| yain         | yaourt -S                               | Install specific package(s) from the repositories                                                                   |
 449+| yains        | yaourt -U                               | Install specific package not from the repositories but from a file                                                  |
 450+| yainsd       | yaourt -S --asdeps                      | Install given package(s) as dependencies of another package                                                         |
 451+| yaloc        | yaourt -Qi                              | Display information about a given package in the local database                                                     |
 452+| yalocs       | yaourt -Qs                              | Search for package(s) in the local database                                                                         |
 453+| yalst        | yaourt -Qe                              | List installed packages, even those installed from AUR (they're tagged as "local")                                  |
 454+| yamir        | yaourt -Syy                             | Force refresh of all package lists after updating /etc/pacman.d/mirrorlist                                          |
 455+| yaorph       | yaourt -Qtd                             | Remove orphans using yaourt                                                                                         |
 456+| yare         | yaourt -R                               | Remove the specified package(s), retaining its configuration(s) and required dependencies                           |
 457+| yarem        | yaourt -Rns                             | Remove the specified package(s), its configuration(s) and unneeded dependencies                                     |
 458+| yarep        | yaourt -Si                              | Display information about a given package in the repositories                                                       |
 459+| yareps       | yaourt -Ss                              | Search for package(s) in the repositories                                                                           |
 460+| yasu         | yaourt --sucre                          | Same as yaupg, but without confirmation                                                                             |
 461+| yaupd        | yaourt -Sy && sudo abs && sudo aur      | Update and refresh the local package, ABS and AUR databases against repositories                                    |
 462+| yaupd        | yaourt -Sy && sudo abs                  | Update and refresh the local package and ABS databases against repositories                                         |
 463+| yaupd        | yaourt -Sy && sudo aur                  | Update and refresh the local package and AUR databases against repositories                                         |
 464+| yaupd        | yaourt -Sy                              | Update and refresh the local package database against repositories                                                  |
 465+| yaupg        | yaourt -Syua                            | Synchronize with repositories before upgrading packages (AUR packages too) that are out of date on the local system |
 466+
 467+| Function       | Description                                                                                                       |
 468+|----------------|:------------------------------------------------------------------------------------------------------------------|
 469+| pacdisowned    | List all disowned files in your system                                                                            |
 470+| paclist        | List all installed packages with a short description - [Source](https://bbs.archlinux.org/viewtopic.php?id=93683) |
 471+| pacmanallkeys  | Get all keys for developers and trusted users                                                                     |
 472+| pacmansignkeys |                                                                                                                   |
 473+
 474+---
 475+
 476+### CONTRIBUTORS
 477+ - Benjamin Boudreau - dreurmail@gmail.com
 478+ - Celso Miranda - contacto@celsomiranda.net
 479+ - KhasMek - Boushh@gmail.com
 480+ - Martin Putniorz - mputniorz@gmail.com
 481+ - MatthR3D - matthr3d@gmail.com
 482+ - ornicar - thibault.duplessis@gmail.com
 483+
 484+---
 485diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh
 486index 059884c271b7ea0fcc1784c03e17b64e9b3aff38..b83c24560bf84c65629b90b7f0f5790ab966270f 100644
 487--- a/plugins/archlinux/archlinux.plugin.zsh
 488+++ b/plugins/archlinux/archlinux.plugin.zsh
 489@@ -2,7 +2,7 @@
 490 # Usage is also described at https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins
 491 
 492 # Look for yaourt, and add some useful functions if we have it.
 493-if [[ -x `which yaourt` ]]; then
 494+if [[ -x `command -v yaourt` ]]; then
 495   upgrade () {
 496     yaourt -Syu
 497   }
 498@@ -21,11 +21,11 @@ if [[ -x `which yaourt` ]]; then
 499   alias yalst='yaourt -Qe'         # List installed packages, even those installed from AUR (they're tagged as "local")
 500   alias yaorph='yaourt -Qtd'       # Remove orphans using yaourt
 501   # Additional yaourt alias examples
 502-  if [[ -x `which abs` && -x `which aur` ]]; then
 503+  if [[ -x `command -v abs` && -x `command -v aur` ]]; then
 504     alias yaupd='yaourt -Sy && sudo abs && sudo aur'  # Update and refresh the local package, ABS and AUR databases against repositories
 505-  elif [[ -x `which abs` ]]; then
 506+  elif [[ -x `command -v abs` ]]; then
 507     alias yaupd='yaourt -Sy && sudo abs'   # Update and refresh the local package and ABS databases against repositories
 508-  elif [[ -x `which aur` ]]; then
 509+  elif [[ -x `command -v aur` ]]; then
 510     alias yaupd='yaourt -Sy && sudo aur'   # Update and refresh the local package and AUR databases against repositories
 511   else
 512     alias yaupd='yaourt -Sy'               # Update and refresh the local package database against repositories
 513@@ -49,11 +49,11 @@ alias pacreps='pacman -Ss'             # Search for package(s) in the repositori
 514 alias pacloc='pacman -Qi'              # Display information about a given package in the local database
 515 alias paclocs='pacman -Qs'             # Search for package(s) in the local database
 516 # Additional pacman alias examples
 517-if [[ -x `which abs` && -x `which aur` ]]; then
 518+if [[ -x `command -v abs` && -x `command -v aur` ]]; then
 519   alias pacupd='sudo pacman -Sy && sudo abs && sudo aur'  # Update and refresh the local package, ABS and AUR databases against repositories
 520-elif [[ -x `which abs` ]]; then
 521+elif [[ -x `command -v abs` ]]; then
 522   alias pacupd='sudo pacman -Sy && sudo abs'              # Update and refresh the local package and ABS databases against repositories
 523-elif [[ -x `which aur` ]]; then
 524+elif [[ -x `command -v aur` ]]; then
 525   alias pacupd='sudo pacman -Sy && sudo aur'              # Update and refresh the local package and AUR databases against repositories
 526 else
 527   alias pacupd='sudo pacman -Sy'     # Update and refresh the local package database against repositories
 528@@ -63,7 +63,7 @@ alias pacmir='sudo pacman -Syy'                # Force refresh of all package li
 529 
 530 # https://bbs.archlinux.org/viewtopic.php?id=93683
 531 paclist() {
 532-  sudo pacman -Qei $(pacman -Qu|cut -d" " -f 1)|awk ' BEGIN {FS=":"}/^Name/{printf("\033[1;36m%s\033[1;37m", $2)}/^Description/{print $2}'
 533+  LC_ALL=C pacman -Qei $(pacman -Qu|cut -d" " -f 1)|awk ' BEGIN {FS=":"}/^Name/{printf("\033[1;36m%s\033[1;37m", $2)}/^Description/{print $2}'
 534 }
 535 
 536 alias paclsorphans='sudo pacman -Qdt'
 537diff --git a/plugins/atom/README.md b/plugins/atom/README.md
 538new file mode 100644
 539index 0000000000000000000000000000000000000000..75d77a0ac1c3732be4dbab1b4062e4f8e1d315fc
 540--- /dev/null
 541+++ b/plugins/atom/README.md
 542@@ -0,0 +1,17 @@
 543+## atom
 544+
 545+Plugin for Atom, a cross platform text and code editor, available for Linux, Mac OS X, and Windows.
 546+
 547+### Requirements
 548+
 549+ * [Atom](https://atom.io/)
 550+
 551+### Usage
 552+
 553+ * If `at` command is called without an argument, launch Atom
 554+
 555+ * If `at` is passed a directory, `cd` to it and open it in Atom
 556+
 557+ * If `at` is passed a file, open it in Atom
 558+
 559+ * if `att` command is called, it is equivalent to `at .`, opening the current folder in Atom
 560diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
 561index 0ae18dd561f9a052cb5a49a01b9ac7c2cd47203f..7246db9f0e10252a2c9bee1cff624e0b76ebc6c9 100644
 562--- a/plugins/aws/aws.plugin.zsh
 563+++ b/plugins/aws/aws.plugin.zsh
 564@@ -13,7 +13,8 @@ function agp {
 565 }
 566 function asp {
 567   export AWS_DEFAULT_PROFILE=$1
 568-  export RPROMPT="<aws:$AWS_DEFAULT_PROFILE>"
 569+  export AWS_PROFILE=$1
 570+  export RPROMPT="<aws:$AWS_DEFAULT_PROFILE>$RPROMPT"
 571 }
 572 function aws_profiles {
 573   reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_-]*\).*/\1/'))
 574@@ -22,7 +23,7 @@ function aws_profiles {
 575 compctl -K aws_profiles asp
 576 
 577 if _homebrew-installed && _awscli-homebrew-installed ; then
 578-  _aws_zsh_completer_path=$(brew --prefix)/opt/awscli/libexec/bin/aws_zsh_completer.sh
 579+  _aws_zsh_completer_path=$(brew --prefix awscli)/libexec/bin/aws_zsh_completer.sh
 580 else
 581   _aws_zsh_completer_path=$(which aws_zsh_completer.sh)
 582 fi
 583diff --git a/plugins/bgnotify/README.md b/plugins/bgnotify/README.md
 584new file mode 100644
 585index 0000000000000000000000000000000000000000..b154916d61f2d0b2b1d1f1cb63e93fb69066e6c9
 586--- /dev/null
 587+++ b/plugins/bgnotify/README.md
 588@@ -0,0 +1,54 @@
 589+# bgnotify zsh plugin
 590+
 591+cross-platform background notifications for long running commands! Supports OSX and Ubuntu linux.
 592+
 593+Standalone homepage: [t413/zsh-background-notify](https://github.com/t413/zsh-background-notify)
 594+
 595+----------------------------------
 596+
 597+## How to use!
 598+
 599+Just add bgnotify to your plugins list in your `.zshrc`
 600+
 601+- On OS X you'll need [terminal-notifer](https://github.com/alloy/terminal-notifier)
 602+  * `brew install terminal-notifier` (or `gem install terminal-notifier`)
 603+- On ubuntu you're already all set!
 604+- On windows you can use [notifu](http://www.paralint.com/projects/notifu/) or the Cygwin Ports libnotify package
 605+
 606+
 607+## Screenshots
 608+
 609+**Linux**
 610+
 611+![screenshot from 2014-11-07 15 58 36](https://cloud.githubusercontent.com/assets/326829/4962187/256b465c-66da-11e4-927d-cc2fc105e31f.png)
 612+
 613+**OS X**
 614+
 615+![screenshot 2014-11-08 14 15 12](https://cloud.githubusercontent.com/assets/326829/4965780/19fa3eac-6795-11e4-8ed6-0355711123a9.png)
 616+
 617+**Windows**
 618+
 619+![screenshot from 2014-11-07 15 55 00](https://cloud.githubusercontent.com/assets/326829/4962159/a2625ca0-66d9-11e4-9e91-c5834913190e.png)
 620+
 621+
 622+## Configuration
 623+
 624+One can configure a few things:
 625+
 626+- `bgnotify_threshold` sets the notification threshold time (default 6 seconds)
 627+- `function bgnotify_formatted` lets you change the notification
 628+
 629+Use these by adding a function definition before the your call to source. Example:
 630+
 631+~~~ sh
 632+bgnotify_threshold=4  ## set your own notification threshold
 633+
 634+function bgnotify_formatted {
 635+  ## $1=exit_status, $2=command, $3=elapsed_time
 636+  [ $1 -eq 0 ] && title="Holy Smokes Batman!" || title="Holy Graf Zeppelin!"
 637+  bgnotify "$title -- after $3 s" "$2";
 638+}
 639+
 640+plugins=(git bgnotify)  ## add to plugins list
 641+source $ZSH/oh-my-zsh.sh  ## existing source call
 642+~~~
 643diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh
 644new file mode 100755
 645index 0000000000000000000000000000000000000000..b70b42f984540b2d58e9a6720e57234ec5ae21d6
 646--- /dev/null
 647+++ b/plugins/bgnotify/bgnotify.plugin.zsh
 648@@ -0,0 +1,67 @@
 649+#!/usr/bin/env zsh
 650+
 651+## setup ##
 652+
 653+[[ -o interactive ]] || return #interactive only!
 654+zmodload zsh/datetime || { print "can't load zsh/datetime"; return } # faster than date()
 655+autoload -Uz add-zsh-hook || { print "can't add zsh hook!"; return }
 656+
 657+(( ${+bgnotify_threshold} )) || bgnotify_threshold=5 #default 10 seconds
 658+
 659+
 660+## definitions ##
 661+
 662+if ! (type bgnotify_formatted | grep -q 'function'); then
 663+  function bgnotify_formatted {
 664+    ## exit_status, command, elapsed_time
 665+    [ $1 -eq 0 ] && title="#win (took $3 s)" || title="#fail (took $3 s)"
 666+    bgnotify "$title" "$2"
 667+  }
 668+fi
 669+
 670+currentWindowId () {
 671+  if hash osascript 2>/dev/null; then #osx
 672+    osascript -e 'tell application (path to frontmost application as text) to id of front window' 2&> /dev/null || echo "0"
 673+  elif hash notify-send 2>/dev/null; then #ubuntu!
 674+    xprop -root | awk '/NET_ACTIVE_WINDOW/ { print $5; exit }'
 675+  else
 676+    echo $EPOCHSECONDS #fallback for windows
 677+  fi
 678+}
 679+
 680+bgnotify () {
 681+  if hash terminal-notifier 2>/dev/null; then #osx
 682+    terminal-notifier -message "$2" -title "$1"
 683+  elif hash growlnotify 2>/dev/null; then #osx growl
 684+    growlnotify -m "$1" "$2"
 685+  elif hash notify-send 2>/dev/null; then #ubuntu!
 686+    notify-send "$1" "$2"
 687+  elif hash notifu 2>/dev/null; then #cygwyn support!
 688+    notifu /m "$2" /p "$1"
 689+  fi
 690+}
 691+
 692+
 693+## Zsh hooks ##
 694+
 695+bgnotify_begin() {
 696+  bgnotify_timestamp=$EPOCHSECONDS
 697+  bgnotify_lastcmd=$1
 698+  bgnotify_windowid=$(currentWindowId)
 699+}
 700+
 701+bgnotify_end() {
 702+  didexit=$?
 703+  elapsed=$(( EPOCHSECONDS - bgnotify_timestamp ))
 704+  past_threshold=$(( elapsed >= bgnotify_threshold ))
 705+  if (( bgnotify_timestamp > 0 )) && (( past_threshold )); then
 706+    if [ $(currentWindowId) != "$bgnotify_windowid" ]; then
 707+      print -n "\a"
 708+      bgnotify_formatted "$didexit" "$bgnotify_lastcmd" "$elapsed"
 709+    fi
 710+  fi
 711+  bgnotify_timestamp=0 #reset it to 0!
 712+}
 713+
 714+add-zsh-hook preexec bgnotify_begin
 715+add-zsh-hook precmd bgnotify_end
 716diff --git a/plugins/boot2docker/README.md b/plugins/boot2docker/README.md
 717new file mode 100644
 718index 0000000000000000000000000000000000000000..9551e235109d0be2b4c182507496be150ae10e30
 719--- /dev/null
 720+++ b/plugins/boot2docker/README.md
 721@@ -0,0 +1,6 @@
 722+## Boot2docker autocomplete plugin
 723+
 724+- Adds autocomplete options for all boot2docker commands.
 725+
 726+
 727+Maintainer : Manfred Touron ([@moul](https://github.com/moul))
 728diff --git a/plugins/boot2docker/_boot2docker b/plugins/boot2docker/_boot2docker
 729new file mode 100644
 730index 0000000000000000000000000000000000000000..3116bd14c3e7aec0cad9ede724da70c4e17ee29c
 731--- /dev/null
 732+++ b/plugins/boot2docker/_boot2docker
 733@@ -0,0 +1,73 @@
 734+#compdef boot2docker
 735+
 736+# Boot2docker autocompletion for oh-my-zsh
 737+# Requires: Boot2docker installed
 738+# Author: Manfred Touron (@moul)
 739+
 740+local -a _1st_arguments
 741+_1st_arguments=(
 742+   "init":"Create a new Boot2Docker VM."
 743+   "up":"Start VM from any states."
 744+   "start":"Start VM from any states."
 745+   "boot":"Start VM from any states."
 746+   "ssh":"[ssh-command] Login to VM via SSH."
 747+   "save":"Suspend VM and save state to disk."
 748+   "suspend":"Suspend VM and save state to disk."
 749+   "down":"Gracefully shutdown the VM."
 750+   "stop":"Gracefully shutdown the VM."
 751+   "halt":"Gracefully shutdown the VM."
 752+   "restart":"Gracefully reboot the VM."
 753+   "poweroff":"Forcefully power off the VM (may corrupt disk image)."
 754+   "reset":"Forcefully power cycle the VM (may corrupt disk image)."
 755+   "delete":"Delete Boot2Docker VM and its disk image."
 756+   "destroy":"Delete Boot2Docker VM and its disk image."
 757+   "config":"Show selected profile file settings."
 758+   "cfg":"Show selected profile file settings."
 759+   "info":"Display detailed information of VM."
 760+   "ip":"Display the IP address of the VM's Host-only network."
 761+   "socket":"Display the DOCKER_HOST socket to connect to."
 762+   "shellinit":"Display the shell command to set up the Docker client."
 763+   "status":"Display current state of VM."
 764+   "download":"Download Boot2Docker ISO image."
 765+   "upgrade":"Upgrade the Boot2Docker ISO image (restart if running)."
 766+   "version":"Display version information."
 767+)
 768+
 769+_arguments \
 770+  '(--basevmdk)--basevmdk[Path to VMDK to use as base for persistent partition]' \
 771+  '(--cpus)'{-c,--cpus}'[number of CPUs for boot2docker.]' \
 772+  '(--clobber)--clobber[overwrite Docker client binary on boot2docker upgrade]' \
 773+  '(--dhcp)--dhcp[enable VirtualBox host-only network DHCP.]' \
 774+  '(--dhcpip)--dhcpip[VirtualBox host-only network DHCP server address.]' \
 775+  '(-s --disksize)'{-s,--disksize}'[boot2docker disk image size (in MB).]' \
 776+  '(--dockerport)--dockerport[host Docker port (forward to port 2376 in VM). (deprecated - use with care)]' \
 777+  '(--driver)--driver[hypervisor driver.]' \
 778+  '(--force-upgrade-download)--force-upgrade-download[always download on boot2docker upgrade, never skip.]' \
 779+  '(--hostip)--hostip[VirtualBox host-only network IP address.]' \
 780+  '(--iso)--iso[path to boot2docker ISO image.]' \
 781+  '(--iso-url)--iso-url[/api.github.com/repos/boot2docker/boot2docker/releases": source URL to provision the boot2docker ISO image.]' \
 782+  '(--lowerip)--lowerip[VirtualBox host-only network DHCP lower bound.]' \
 783+  '(--memory)'{-m,--memory}'[virtual machine memory size (in MB).]' \
 784+  '(--netmask)--netmask[VirtualBox host-only network mask.]' \
 785+  '(--no-dummy)--no-dummy[Example parameter for the dummy driver.]' \
 786+  '(--retries)--retries[number of port knocking retries during 'start']' \
 787+  '(--serial)--serial[try serial console to get IP address (experimental)]' \
 788+  '(--serialfile)--serialfile[path to the serial socket/pipe.]' \
 789+  '(--ssh)--ssh[path to SSH client utility.]' \
 790+  '(--ssh-keygen)--ssh-keygen[path to ssh-keygen utility.]' \
 791+  '(--sshkey)--sshkey[path to SSH key to use.]' \
 792+  '(--sshport)--sshport[host SSH port (forward to port 22 in VM).]' \
 793+  '(--upperip)--upperip[VirtualBox host-only network DHCP upper bound.]' \
 794+  '(--vbm)--vbm[path to VirtualBox management utility.]' \
 795diff --git a/plugins/brew/_brew b/plugins/brew/_brew
 796index d11aa245de88d64c81d6b7fc6d082b0498dbce93..4c99a383ae237077bf0a5f9241a6aa7fddba2ee7 100644
 797--- a/plugins/brew/_brew
 798+++ b/plugins/brew/_brew
 799@@ -35,6 +35,7 @@ _1st_arguments=(
 800   'info:information about a formula'
 801   'install:install a formula'
 802   'reinstall:install a formula anew; re-using its current options'
 803+  'leaves:show installed formulae that are not dependencies of another installed formula'
 804   'link:link a formula'
 805   'list:list files in a formula or not-installed formulae'
 806   'log:git commit log for a formula'
 807diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh
 808index 42fb80c9a4910cb403bb06d26010c85387aa7aee..5b5847328bb60cbb0ddc4991855b58fe4af05f96 100644
 809--- a/plugins/brew/brew.plugin.zsh
 810+++ b/plugins/brew/brew.plugin.zsh
 811@@ -1,2 +1,4 @@
 812 alias brews='brew list -1'
 813-alias bubu="brew update && brew upgrade && brew cleanup"
 814+alias bubo='brew update && brew outdated'
 815+alias bubc='brew upgrade && brew cleanup'
 816+alias bubu='bubo && bubc'
 817diff --git a/plugins/bundler/README.md b/plugins/bundler/README.md
 818index 56f0c71767c66d0ba5c3f0306a6450d8f438c278..edd95ccc23a37bf04bf46930c080fd4c5a40d985 100644
 819--- a/plugins/bundler/README.md
 820+++ b/plugins/bundler/README.md
 821@@ -39,7 +39,7 @@ This will exclude the `foreman` and `spin` gems (i.e. their executable) from bei
 822 
 823 ## Excluded gems
 824 
 825-These gems should not be called with `bundle exec`. Please see the Issues on GitHub for clarification.
 826+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.
 827 
 828 `berks`
 829 `foreman`
 830diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh
 831index ba3d3f623b3692e7d19180ca05b283a1e15678ae..dfff6956e8be91232dcdcfee1b239abf7316e60a 100644
 832--- a/plugins/bundler/bundler.plugin.zsh
 833+++ b/plugins/bundler/bundler.plugin.zsh
 834@@ -4,6 +4,7 @@ alias bp="bundle package"
 835 alias bo="bundle open"
 836 alias bu="bundle update"
 837 alias bi="bundle_install"
 838+alias bcn="bundle clean"
 839 
 840 bundled_commands=(
 841   annotate
 842diff --git a/plugins/cabal/cabal.plugin.zsh b/plugins/cabal/cabal.plugin.zsh
 843index 9f76add7a30a791add54a4b5af864b4d18172262..a9a05b01245e67dd554d0ff1af87092a7f4967bc 100644
 844--- a/plugins/cabal/cabal.plugin.zsh
 845+++ b/plugins/cabal/cabal.plugin.zsh
 846@@ -17,13 +17,16 @@ function _cabal_commands() {
 847       subcommand)
 848         subcommands=(
 849           "bench:Run the benchmark, if any (configure with UserHooks)"
 850-          "build:Make this package ready for installation"
 851+          "build:Compile all targets or specific target."
 852           "check:Check the package for common mistakes"
 853           "clean:Clean up after a build"
 854-          "copy:Copy teh files into the install locations"
 855+          "copy:Copy the files into the install locations"
 856           "configure:Prepare to build the package"
 857+          "exec:Run a command with the cabal environment"
 858           "fetch:Downloads packages for later installation"
 859-          "haddock:Generate HAddock HTML documentation"
 860+          "freeze:Freeze dependencies."
 861+          "get:Gets a package's source code"
 862+          "haddock:Generate Haddock HTML documentation"
 863           "help:Help about commands"
 864           "hscolour:Generate HsColour colourised code, in HTML format"
 865           "info:Display detailed information about a particular package"
 866@@ -31,7 +34,10 @@ function _cabal_commands() {
 867           "install:Installs a list of packages"
 868           "list:List packages matching a search string"
 869           "register:Register this package with the compiler"
 870+          "repl:Open an interpreter session for the given target"
 871           "report:Upload build reports to a remote server"
 872+          "run:Runs the compiled executable"
 873+          "sandbox:Create/modify/delete a sandbox"
 874           "sdist:Generate a source distribution file (.tar.gz)"
 875           "test:Run the test suite, if any (configure with UserHooks)"
 876           "unpack:Unpacks packages for user inspection"
 877@@ -45,3 +51,43 @@ function _cabal_commands() {
 878 }
 879 
 880 compdef _cabal_commands cabal
 881+
 882+function _cab_commands() {
 883+    local ret=1 state
 884+    _arguments ':subcommand:->subcommand' && ret=0
 885+
 886+    case $state in
 887+      subcommand)
 888+        subcommands=(
 889+          "sync:Fetch the latest package index"
 890+          "install:Install packages"
 891+          "uninstall:Uninstall packages"
 892+          "installed:List installed packages"
 893+          "configure:Configure a cabal package"
 894+          "build:Build a cabal package"
 895+          "clean:Clean up a build directory"
 896+          "outdated:Display outdated packages"
 897+          "info:Display information of a package"
 898+          "sdist:Make tar.gz for source distribution"
 899+          "upload:Uploading tar.gz to HackageDB"
 900+          "get:Untar a package in the current directory"
 901+          "deps:Show dependencies of this package"
 902+          "revdeps:Show reverse dependencies of this package"
 903+          "check:Check consistency of packages"
 904+          "genpaths:Generate Paths_<pkg>.hs"
 905+          "search:Search available packages by package name"
 906+          "add:Add a source directory"
 907+          "test:Run tests"
 908+          "bench:Run benchmarks"
 909+          "doc:Generate manuals"
 910+          "ghci:Run GHCi (with a sandbox)"
 911+          "init:Initialize a sandbox"
 912+          "help:Display the help message of the command"
 913+        )
 914+        _describe -t subcommands 'cab subcommands' subcommands && ret=0
 915+    esac
 916+
 917+    return ret
 918+}
 919+
 920+command -v cab >/dev/null 2>&1 && { compdef _cab_commands cab }
 921diff --git a/plugins/cakephp3/cakephp3.plugin.zsh b/plugins/cakephp3/cakephp3.plugin.zsh
 922new file mode 100644
 923index 0000000000000000000000000000000000000000..28d5af2ea5c1a3bfd418850ab0c0508776f80558
 924--- /dev/null
 925+++ b/plugins/cakephp3/cakephp3.plugin.zsh
 926@@ -0,0 +1,19 @@
 927+# CakePHP 3 basic command completion
 928+_cakephp3_get_command_list () {
 929+	cakephp3commands=($(bin/cake completion commands));printf "%s\n" "${cakephp3commands[@]}"
 930+}
 931+
 932+_cakephp3 () {
 933+  if [ -f bin/cake ]; then
 934+    compadd `_cakephp3_get_command_list`
 935+  fi
 936+}
 937+
 938+compdef _cakephp3 bin/cake
 939+compdef _cakephp3 cake
 940+
 941+#Alias
 942+alias c3='bin/cake'
 943+
 944+alias c3cache='bin/cake orm_cache clear'
 945+alias c3migrate='bin/cake migrations migrate'
 946diff --git a/plugins/cask/cask.plugin.zsh b/plugins/cask/cask.plugin.zsh
 947new file mode 100644
 948index 0000000000000000000000000000000000000000..c558629243d2274d8c380bc807f08d5f53690824
 949--- /dev/null
 950+++ b/plugins/cask/cask.plugin.zsh
 951@@ -0,0 +1,5 @@
 952+if which cask &> /dev/null; then
 953+  source $(dirname $(which cask))/../etc/cask_completion.zsh
 954+else
 955+  print "zsh cask plugin: cask not found"
 956+fi
 957diff --git a/plugins/chucknorris/.gitignore b/plugins/chucknorris/.gitignore
 958new file mode 100644
 959index 0000000000000000000000000000000000000000..267c504a61c5520e92c975758f5a61674e41020c
 960--- /dev/null
 961+++ b/plugins/chucknorris/.gitignore
 962@@ -0,0 +1 @@
 963+fortunes/chucknorris.dat
 964diff --git a/plugins/chucknorris/LICENSE b/plugins/chucknorris/LICENSE
 965new file mode 100644
 966index 0000000000000000000000000000000000000000..5f40edd1ef61de7e43ddbc61ef2d78b3e1ad0cf6
 967--- /dev/null
 968+++ b/plugins/chucknorris/LICENSE
 969@@ -0,0 +1,2 @@
 970+License: GPL v2
 971+Thanks to http://www.k-lug.org/~kessler/projects.html for the fortune file.
 972diff --git a/plugins/chucknorris/chucknorris.plugin.zsh b/plugins/chucknorris/chucknorris.plugin.zsh
 973new file mode 100644
 974index 0000000000000000000000000000000000000000..09636463350cf2b7a7e5b351d3a56c7992e9a574
 975--- /dev/null
 976+++ b/plugins/chucknorris/chucknorris.plugin.zsh
 977@@ -0,0 +1,6 @@
 978+if [ ! -f $ZSH/plugins/chucknorris/fortunes/chucknorris.dat ]; then
 979+    strfile $ZSH/plugins/chucknorris/fortunes/chucknorris $ZSH/plugins/chucknorris/fortunes/chucknorris.dat
 980+fi
 981+
 982+alias chuck="fortune -a $ZSH/plugins/chucknorris/fortunes"
 983+alias chuck_cow="chuck | cowthink"
 984diff --git a/plugins/chucknorris/fortunes/chucknorris b/plugins/chucknorris/fortunes/chucknorris
 985new file mode 100644
 986index 0000000000000000000000000000000000000000..b8edf9ac388069ead3d05b06d0d33a283d3e0942
 987--- /dev/null
 988+++ b/plugins/chucknorris/fortunes/chucknorris
 989@@ -0,0 +1,904 @@
 990+Chuck Norris' tears cure cancer. Too bad he has never cried. Ever. 
 991+%
 992+Chuck Norris does not sleep. He waits. 
 993+%
 994+Chuck Norris is currently suing NBC, claiming Law and Order are trademarked names for his left and right legs. 
 995+%
 996+The chief export of Chuck Norris is pain. 
 997+%
 998+If you can see Chuck Norris, he can see you. If you can't see Chuck Norris, you may be only seconds away from death. 
 999+%
1000+Chuck Norris has counted to infinity. Twice. 
1001+%
1002+Chuck Norris does not hunt because the word hunting implies the probability of failure. Chuck Norris goes killing. 
1003+%
1004+Chuck Norris' blood type is AK+. Ass-Kicking Positive. It is compatible only with heavy construction equipment, tanks, and fighter jets. 
1005+%
1006+Chuck Norris is 1/8th Cherokee. This has nothing to do with ancestry, the man ate a fucking Indian. 
1007+%
1008+In fine print on the last page of the Guinness Book of World Records it notes that all world records are held by Chuck Norris, and those listed in the book are simply the closest anyone else has ever gotten. 
1009+There is no chin behind Chuck Norris' beard. There is only another fist.
1010+%
1011+Chuck Norris does not teabag the ladies. He potato-sacks them. 
1012+Pluto is actually an orbiting group of British soldiers from the American Revolution who entered space after the Chuck gave them a roundhouse kick to the face. 
1013+%
1014+When Chuck Norris goes to donate blood, he declines the syringe, and instead requests a hand gun and a bucket. 
1015+%
1016+There are no steroids in baseball. Just players Chuck Norris has breathed on. 
1017+%
1018+Chuck Norris once challenged Lance Armstrong in a "Who has more testicles?" contest. Chuck Norris won by 5. 
1019+%
1020diff --git a/plugins/coffee/README.md b/plugins/coffee/README.md
1021new file mode 100644
1022index 0000000000000000000000000000000000000000..d0e7bbe74b59716d99bdd103c7f229d8b1119ebb
1023--- /dev/null
1024+++ b/plugins/coffee/README.md
1025@@ -0,0 +1,31 @@
1026+## Coffeescript Plugin
1027+
1028+This plugin provides aliases for quickly compiling and previewing your
1029+cofeescript code.
1030+
1031+When writing Coffeescript it's very common to want to preview the output of a
1032+certain snippet of code, either because you want to test the output or because
1033+you'd like to execute it in a browser console which doesn't accept Coffeescript.
1034+
1035+Preview the compiled result of your coffeescript with `cf "code"` as per the
1036+following:
1037+
1038+```zsh
1039+$ cf 'if a then be else c'
1040+if (a) {
1041+  b;
1042+} else {
1043+  c;
1044+}
1045+```
1046+
1047+Also provides the following aliases:
1048+
1049+* **cfc:** Copies the compiled JS to your clipboard. Very useful when you want
1050+           to run the code in a JS console.
1051+
1052+* **cfp:** Compiles from your currently copied clipboard. Useful when you want 
1053+           to compile large/multi-line snippets
1054+
1055+* **cfpc:** Paste coffeescript from clipboard, compile to JS, then copy the
1056+            the result back to clipboard.
1057diff --git a/plugins/coffee/coffee.plugin.zsh b/plugins/coffee/coffee.plugin.zsh
1058new file mode 100644
1059index 0000000000000000000000000000000000000000..1a7bedd87fe9426f18c00e9f99bbc269a194406d
1060--- /dev/null
1061+++ b/plugins/coffee/coffee.plugin.zsh
1062@@ -0,0 +1,16 @@
1063+#!/bin/zsh
1064+
1065+# compile a string of coffeescript and print to output
1066+cf () {
1067+  coffee -peb $1
1068+}
1069+# compile & copy to clipboard
1070+cfc () {
1071+  cf $1 | pbcopy
1072+}
1073+
1074+# compile from pasteboard & print
1075+alias cfp='coffeeMe "$(pbpaste)"'
1076+
1077+# compile from pasteboard and copy to clipboard
1078+alias cfpc='cfp | pbcopy'
1079diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh
1080index e3830adcf9566f5bc6c944dd3d022a6a35707cc5..fc19d73c3e47026ca15de74c6e1e95da1b126a54 100644
1081--- a/plugins/common-aliases/common-aliases.plugin.zsh
1082+++ b/plugins/common-aliases/common-aliases.plugin.zsh
1083@@ -13,7 +13,7 @@ alias lS='ls -1FSsh'
1084 alias lart='ls -1Fcart'
1085 alias lrt='ls -1Fcrt'
1086 
1087-alias zshrc='vim ~/.zshrc' # Quick access to the ~/.zshrc file
1088+alias zshrc='$EDITOR ~/.zshrc' # Quick access to the ~/.zshrc file
1089 
1090 alias grep='grep --color'
1091 alias sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS} '
1092diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh
1093index 7f70e3d7267ea9ff6a37b70846bfaf04b41df193..86f5be3d03c7d99b3a151b62102d5c447d9c4c1f 100644
1094--- a/plugins/composer/composer.plugin.zsh
1095+++ b/plugins/composer/composer.plugin.zsh
1096@@ -7,7 +7,7 @@
1097 
1098 # Composer basic command completion
1099 _composer_get_command_list () {
1100-    $_comp_command1 --no-ansi | sed "1,/Available commands/d" | awk '/^\s*[a-z]+/ { print $1 }'
1101+    $_comp_command1 --no-ansi | sed "1,/Available commands/d" | awk '/^[ \t]*[a-z]+/ { print $1 }'
1102 }
1103 
1104 _composer_get_required_list () {
1105diff --git a/plugins/debian/debian.plugin.zsh b/plugins/debian/debian.plugin.zsh
1106index 6e45e05216359a9a413a61d989ef919b00e4e9a3..31a772d604be52e7737410fb3b9aa943ef41d5be 100644
1107--- a/plugins/debian/debian.plugin.zsh
1108+++ b/plugins/debian/debian.plugin.zsh
1109@@ -9,8 +9,10 @@
1110 # You can just set apt_pref='apt-get' to override it.
1111 if [[ -e $( which -p aptitude 2>&1 ) ]]; then
1112     apt_pref='aptitude'
1113+    apt_upgr='safe-upgrade'
1114 else
1115     apt_pref='apt-get'
1116+    apt_upgr='upgrade'
1117 fi
1118 
1119 # Use sudo by default if it's installed
1120@@ -45,10 +47,10 @@ if [[ $use_sudo -eq 1 ]]; then
1121     alias abd='sudo $apt_pref build-dep'
1122     alias ac='sudo $apt_pref clean'
1123     alias ad='sudo $apt_pref update'
1124-    alias adg='sudo $apt_pref update && sudo $apt_pref upgrade'
1125+    alias adg='sudo $apt_pref update && sudo $apt_pref $apt_upgr'
1126     alias adu='sudo $apt_pref update && sudo $apt_pref dist-upgrade'
1127     alias afu='sudo apt-file update'
1128-    alias ag='sudo $apt_pref upgrade'
1129+    alias ag='sudo $apt_pref $apt_upgr'
1130     alias ai='sudo $apt_pref install'
1131     # Install all packages given on the command line while using only the first word of each line:
1132     # acs ... | ail
1133@@ -80,10 +82,10 @@ else
1134     }
1135     alias ac='su -ls \'$apt_pref clean\' root'
1136     alias ad='su -lc \'$apt_pref update\' root'
1137-    alias adg='su -lc \'$apt_pref update && aptitude safe-upgrade\' root'
1138+    alias adg='su -lc \'$apt_pref update && aptitude $apt_upgr\' root'
1139     alias adu='su -lc \'$apt_pref update && aptitude dist-upgrade\' root'
1140     alias afu='su -lc "apt-file update"'
1141-    alias ag='su -lc \'$apt_pref safe-upgrade\' root'
1142+    alias ag='su -lc \'$apt_pref $apt_upgr\' root'
1143     ai() {
1144         cmd="su -lc 'aptitude -P install $@' root"
1145         print "$cmd"
1146@@ -136,7 +138,7 @@ apt_pref_compdef abd "build-dep"
1147 apt_pref_compdef ac  "clean"
1148 apt_pref_compdef ad  "update"
1149 apt_pref_compdef afu "update"
1150-apt_pref_compdef ag  "upgrade"
1151+apt_pref_compdef ag  "$apt_upgr"
1152 apt_pref_compdef ai  "install"
1153 apt_pref_compdef ail "install"
1154 apt_pref_compdef ap  "purge"
1155diff --git a/plugins/dirhistory/dirhistory.plugin.zsh b/plugins/dirhistory/dirhistory.plugin.zsh
1156index d101cfcae6a435ac0d78398f23cb1aac809a0efc..0209981e31f463a30cc6d65f0b58c5d19c280c34 100644
1157--- a/plugins/dirhistory/dirhistory.plugin.zsh
1158+++ b/plugins/dirhistory/dirhistory.plugin.zsh
1159@@ -49,7 +49,8 @@ function push_future() {
1160 }
1161 
1162 # Called by zsh when directory changes
1163-function chpwd() {
1164+chpwd_functions+=(chpwd_dirhistory)
1165+function chpwd_dirhistory() {
1166   push_past $PWD
1167   # If DIRHISTORY_CD is not set...
1168   if [[ -z "${DIRHISTORY_CD+x}" ]]; then
1169diff --git a/plugins/dirpersist/dirpersist.plugin.zsh b/plugins/dirpersist/dirpersist.plugin.zsh
1170index 88d1129d4ac9a21a0a08f1a61f6531b84f320c34..616e2c3c658710d47073cfdd88aa43aea3782675 100644
1171--- a/plugins/dirpersist/dirpersist.plugin.zsh
1172+++ b/plugins/dirpersist/dirpersist.plugin.zsh
1173@@ -11,7 +11,8 @@ if [[ -f ${dirstack_file} ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then
1174   [[ -d $dirstack[1] ]] && cd $dirstack[1] && cd $OLDPWD
1175 fi
1176 
1177-chpwd() {
1178+chpwd_functions+=(chpwd_dirpersist)
1179+chpwd_dirpersist() {
1180   if (( $DIRSTACKSIZE <= 0 )) || [[ -z $dirstack_file ]]; then return; fi
1181   local -ax my_stack
1182   my_stack=( ${PWD} ${dirstack} )
1183diff --git a/plugins/django/django.plugin.zsh b/plugins/django/django.plugin.zsh
1184index 2e9ce1c52e12dd4f408037a141024b5e8a55d27b..35865a692d13e06d7b2cc3ceee627cda853e7e6b 100644
1185--- a/plugins/django/django.plugin.zsh
1186+++ b/plugins/django/django.plugin.zsh
1187@@ -2,59 +2,114 @@
1188 
1189 typeset -ga nul_args
1190 nul_args=(
1191+  '--verbosity=-[verbosity level; 0=minimal output, 1=normal output, 2=all output.]:Verbosity:((0\:minimal 1\:normal 2\:all))'
1192   '--settings=-[the Python path to a settings module.]:file:_files'
1193-  '--pythonpath=-[a directory to add to the Python path.]::directory:_directories'
1194+  '--pythonpath=-[a directory to add to the Python path.]:directory:_directories'
1195   '--traceback[print traceback on exception.]'
1196+  "--no-color[Don't colorize the command output.]"
1197   "--version[show program's version number and exit.]"
1198   {-h,--help}'[show this help message and exit.]'
1199 )
1200 
1201-_managepy-adminindex(){
1202+typeset -ga start_args
1203+start_args=(
1204+  '--template=-[The path or URL to load the template from.]:directory:_directories'
1205+  '--extension=-[The file extension(s) to render (default: "py").]'
1206+  '--name=-[The file name(s) to render.]:file:_files'
1207+)
1208+
1209+typeset -ga db_args
1210+db_args=(
1211+  '--database=-[Nominates a database. Defaults to the "default" database.]'
1212+)
1213+
1214+typeset -ga noinput_args
1215+noinput_args=(
1216+  '--noinput[tells Django to NOT prompt the user for input of any kind.]'
1217+)
1218+
1219+typeset -ga no_init_data_args
1220+no_init_data_args=(
1221+  '--no-initial-data[Tells Django not to load any initial data after database synchronization.]'
1222+)
1223+
1224+typeset -ga tag_args
1225+tag_args=(
1226+  '--tag=-[Run only checks labeled with given tag.]'
1227+  '--list-tags[List available tags.]'
1228+)
1229+
1230+_managepy-check(){
1231   _arguments -s : \
1232-    $nul_args \
1233-    '*::directory:_directories' && ret=0
1234+    $tag_args \
1235+    $nul_args && ret=0
1236+}
1237+
1238+_managepy-changepassword(){
1239+  _arguments -s : \
1240+    $db_args \
1241+    $nul_args && ret=0
1242 }
1243 
1244 _managepy-createcachetable(){
1245   _arguments -s : \
1246+    $db_args \
1247+    $nul_args && ret=0
1248+}
1249+
1250+_managepy-createsuperuser(){
1251+  _arguments -s : \
1252+    '--username=-[Specifies the login for the superuser.]' \
1253+    '--email=-[Specifies the email for the superuser.]' \
1254+    $noinput_args \
1255+    $db_args \
1256     $nul_args && ret=0
1257 }
1258 
1259 _managepy-collectstatic(){
1260   _arguments -s : \
1261-    '--link=-[Create a symbolic link to each file instead of copying.]:' \
1262-    '--noinput=-[Do NOT prompt the user for input of any kind.]:' \
1263-    '--no-post-process=-[Do NOT post process collected files.]:' \
1264-    '--ignore=-[Ignore files or directories matching this glob-style pattern. Use multiple times to ignore more.]:' \
1265-    '--dry-run=-[Do everything except modify the filesystem.]:' \
1266-    '--clear=-[Clear the existing files using the storage before trying to copy or link the original file.]:' \
1267-    '--link=-[Create a symbolic link to each file instead of copying.]:' \
1268-    '--no-default-ignore=-[Do not ignore the common private glob-style patterns "CVS", ".*" and "*~".]:' \
1269+    '--link[Create a symbolic link to each file instead of copying.]' \
1270+    '--no-post-process[Do NOT post process collected files.]' \
1271+    '--ignore=-[Ignore files or directories matching this glob-style pattern. Use multiple times to ignore more.]' \
1272+    '--dry-run[Do everything except modify the filesystem.]' \
1273+    '--clear[Clear the existing files using the storage before trying to copy or link the original file.]' \
1274+    '--link[Create a symbolic link to each file instead of copying.]' \
1275+    '--no-default-ignore[Do not ignore the common private glob-style patterns "CVS", ".*" and "*~".]' \
1276+    $noinput_args \
1277     $nul_args && ret=0
1278 }
1279 
1280 _managepy-dbshell(){
1281   _arguments -s : \
1282+    $db_args \
1283     $nul_args && ret=0
1284 }
1285 
1286 _managepy-diffsettings(){
1287diff --git a/plugins/docker-compose/README.md b/plugins/docker-compose/README.md
1288new file mode 100644
1289index 0000000000000000000000000000000000000000..567b821487af846fa41948fea666f7de6280954f
1290--- /dev/null
1291+++ b/plugins/docker-compose/README.md
1292@@ -0,0 +1,5 @@
1293+# Docker-compose plugin for oh my zsh
1294+
1295+A copy of the completion script from the [docker-compose](1) git repo.
1296+
1297+[1]:[https://github.com/docker/compose/blob/master/contrib/completion/zsh/_docker-compose]
1298diff --git a/plugins/docker-compose/_docker-compose b/plugins/docker-compose/_docker-compose
1299new file mode 100644
1300index 0000000000000000000000000000000000000000..19c06675ad5057dd09b3398e476744ac8fdd8b10
1301--- /dev/null
1302+++ b/plugins/docker-compose/_docker-compose
1303@@ -0,0 +1,308 @@
1304+#compdef docker-compose
1305+
1306+# Description
1307+# -----------
1308+#  zsh completion for docker-compose
1309+#  https://github.com/sdurrheimer/docker-compose-zsh-completion
1310+# -------------------------------------------------------------------------
1311+# Version
1312+# -------
1313+#  0.1.0
1314+# -------------------------------------------------------------------------
1315+# Authors
1316+# -------
1317+#  * Steve Durrheimer <s.durrheimer@gmail.com>
1318+# -------------------------------------------------------------------------
1319+# Inspiration
1320+# -----------
1321+#  * @albers docker-compose bash completion script
1322+#  * @felixr docker zsh completion script : https://github.com/felixr/docker-zsh-completion
1323+# -------------------------------------------------------------------------
1324+
1325+# For compatibility reasons, Compose and therefore its completion supports several
1326+# stack compositon files as listed here, in descending priority.
1327+# Support for these filenames might be dropped in some future version.
1328+__docker-compose_compose_file() {
1329+    local file
1330+    for file in docker-compose.y{,a}ml fig.y{,a}ml ; do
1331+        [ -e $file ] && {
1332+            echo $file
1333+            return
1334+        }
1335+    done
1336+    echo docker-compose.yml
1337+}
1338+
1339+# Extracts all service names from docker-compose.yml.
1340+___docker-compose_all_services_in_compose_file() {
1341+    local already_selected
1342+    local -a services
1343+    already_selected=$(echo ${words[@]} | tr " " "|")
1344+    awk -F: '/^[a-zA-Z0-9]/{print $1}' "${compose_file:-$(__docker-compose_compose_file)}" 2>/dev/null | grep -Ev "$already_selected"
1345+}
1346+
1347+# All services, even those without an existing container
1348+__docker-compose_services_all() {
1349+    services=$(___docker-compose_all_services_in_compose_file)
1350+    _alternative "args:services:($services)"
1351+}
1352+
1353+# All services that have an entry with the given key in their docker-compose.yml section
1354+___docker-compose_services_with_key() {
1355+    local already_selected
1356+    local -a buildable
1357+    already_selected=$(echo ${words[@]} | tr " " "|")
1358+    # flatten sections to one line, then filter lines containing the key and return section name.
1359+    awk '/^[a-zA-Z0-9]/{printf "\n"};{printf $0;next;}' "${compose_file:-$(__docker-compose_compose_file)}" 2>/dev/null | awk -F: -v key=": +$1:" '$0 ~ key {print $1}' 2>/dev/null | grep -Ev "$already_selected"
1360+}
1361+
1362+# All services that are defined by a Dockerfile reference
1363+__docker-compose_services_from_build() {
1364+    buildable=$(___docker-compose_services_with_key build)
1365+    _alternative "args:buildable services:($buildable)"
1366+}
1367+
1368+# All services that are defined by an image
1369+__docker-compose_services_from_image() {
1370+    pullable=$(___docker-compose_services_with_key image)
1371+    _alternative "args:pullable services:($pullable)"
1372+}
1373+
1374+__docker-compose_get_services() {
1375+    local kind expl
1376+    declare -a running stopped lines args services
1377+
1378+    docker_status=$(docker ps > /dev/null 2>&1)
1379+    if [ $? -ne 0 ]; then
1380+        _message "Error! Docker is not running."
1381+        return 1
1382+    fi
1383+
1384+    kind=$1
1385+    shift
1386+    [[ $kind = (stopped|all) ]] && args=($args -a)
1387+
1388+    lines=(${(f)"$(_call_program commands docker ps ${args})"})
1389+    services=(${(f)"$(_call_program commands docker-compose 2>/dev/null ${compose_file:+-f $compose_file} ${compose_project:+-p $compose_project} ps -q)"})
1390+
1391+    # Parse header line to find columns
1392+    local i=1 j=1 k header=${lines[1]}
1393+    declare -A begin end
1394+    while (( $j < ${#header} - 1 )) {
1395+        i=$(( $j + ${${header[$j,-1]}[(i)[^ ]]} - 1))
1396+        j=$(( $i + ${${header[$i,-1]}[(i)  ]} - 1))
1397+        k=$(( $j + ${${header[$j,-1]}[(i)[^ ]]} - 2))
1398+        begin[${header[$i,$(($j-1))]}]=$i
1399+        end[${header[$i,$(($j-1))]}]=$k
1400+    }
1401+    lines=(${lines[2,-1]})
1402+
1403diff --git a/plugins/docker/_docker b/plugins/docker/_docker
1404index 880b6faa6fec9de9241f376209beca5b3e76d6cd..25f55beca384ecdd3d4b9c970a322676e9e4599c 100644
1405--- a/plugins/docker/_docker
1406+++ b/plugins/docker/_docker
1407@@ -11,8 +11,17 @@
1408 # Output a selectable list of all running docker containers
1409 __docker_containers() {
1410     declare -a cont_cmd
1411-    cont_cmd=($(docker ps | awk 'NR>1{print $1":[CON("$1")"$2"("$3")]"}'))
1412-    _describe 'containers' cont_cmd
1413+    cont_cmd=($(docker ps | awk 'NR>1{print $NF":[CON("$1")"$2"("$3")]"}'))
1414+    if [[  'X$cont_cmd' != 'X' ]]
1415+        _describe 'containers' cont_cmd
1416+}
1417+
1418+# Output a selectable list of all containers, even not running
1419+__docker_all_containers() {
1420+    declare -a cont_cmd
1421+    cont_cmd=($(docker ps -a | awk 'NR>1{print $NF":[CON("$1")"$2"("$3")]"}'))
1422+    if [[  'X$cont_cmd' != 'X' ]]
1423+        _describe 'containers' cont_cmd
1424 }
1425 
1426 # output a selectable list of all docker images
1427@@ -27,7 +36,7 @@ __docker_images() {
1428 # ---------------------------
1429 __attach() {
1430     _arguments \
1431-        '--no-stdin[Do not attach stdin]' \
1432+        '--no-stdin[Do not attach STDIN]' \
1433         '--sig-proxy[Proxify all received signal to the process (even in non-tty mode)]'
1434     __docker_containers
1435 }
1436@@ -43,21 +52,64 @@ __build() {
1437 
1438 __commit() {
1439     _arguments \
1440-        '(-a,--author=)'{-a,--author=}'[Author (eg. "John Hannibal Smith <hannibal@a-team.com>"]' \
1441+        '(-a,--author=)'{-a,--author=}'[Author (e.g. "John Hannibal Smith <hannibal@a-team.com>")]' \
1442+        '(-c,--change=)'{-c,--change=}'[Apply Dockerfile instruction to the created image]' \
1443         '(-m,--message=)'{-m,--message=}'[Commit message]' \
1444-        '--run=[Config automatically applied when the image is run.]'
1445-    __docker_containers
1446+        '(-p,--pause=)'{-p,--pause=}'[Pause container during commit]' \
1447 }
1448 
1449 __cp() {
1450     __docker_containers
1451 }
1452 
1453+__create() {
1454+    _arguments \
1455+        '(-P,--publish-all=)'{-P,--publish-all=}'[Publish all exposed ports to the host interfaces]' \
1456+        '(-a,--attach=)'{-a,--attach=}'[Attach to STDIN, STDOUT or STDERR]' \
1457+        '--add-host=[Add a custom host-to-IP mapping]' \
1458+        '--cap-add=[Add Linux capabilities]' \
1459+        '--cap-drop=[Drop Linux capabilities]' \
1460+        '--cpuset-cpus=[CPUs in which to allow execution (0-3, 0,1)]' \
1461+        '(-c,--cpu-shares=)'{-c,--cpu-shares=}'[CPU shares (relative weight)]' \
1462+        '--cidfile=[Write the container ID to the file]' \
1463+        '--device=[Add a host device to the container]' \
1464+        '--dns=[Set custom dns servers]' \
1465+        '--dns-search=[Set custom DNS search domains]' \
1466+        '(-e,--env=)'{-e,--env=}'[Set environment variables]' \
1467+        '--env-file=[Read in a file of environment variables]' \
1468+        '--entrypoint=[Overwrite the default entrypoint of the image]' \
1469+        '--expose=[Expose a port from the container without publishing it to your host]' \
1470+        '(-h,--hostname=)'{-h,--hostname=}'[Container host name]' \
1471+        '(-i,--interactive=)'{-i,--interactive=}'[Keep STDIN open even if not attached]' \
1472+        '--ipc=[IPC namespace to use]' \
1473+        '(-l,--label=)'{-l,--label=}'[Set meta data on a container]' \
1474+        '--link=[Add link to another container (name:alias)]' \
1475+        '--log-driver=[Logging driver for the container]' \
1476+        '--lxc-conf=[Add custom LXC options]' \
1477+        '--mac-address=[Container MAC address (e.g. 92:d0:c6:0a:29:33)]' \
1478+        '(-m,--memory=)'{-m,--memory=}'[Memory limit (format: <number><optional unit>, where unit = b, k, m or g)]' \
1479+        '--net=[Set the Network mode for the container]' \
1480+        '--name=[Assign a name to the container]' \
1481+        '--pid=[PID namespace to use]' \
1482+        '(-p,--publish=)'{-p,--publish=}'[Publish a container''s port to the host (format: ip:hostPort:containerPort/protocol)]' \
1483+        '--privileged=[Give extended privileges to this container]' \
1484+        '--restart=[Restart policy to apply when a container exits]' \
1485+        '--security-opt=[Security Options]' \
1486+        '--sig-proxy=[Proxify all received signal to the process (even in non-tty mode)]' \
1487+        '(-t,--tty=)'{-t,--tty=}'[Allocate a pseudo-tty]' \
1488+        '(-u,--user=)'{-u,--user=}'[Username or UID]' \
1489+        '--ulimit=[Ulimit options]' \
1490+        '(-v,--volume=)'{-v,--volume=}'[Bind mount a volume (e.g. -v /host:/container or -v /container)]' \
1491+        '--volumes-from=[Mount volumes from the specified container(s)]' \
1492+        '(-w,--workdir=)'{-w,--workdir=}'[Working directory inside the container]'
1493+    __docker_images
1494+}
1495+
1496 __diff() {
1497     __docker_containers
1498 }
1499 
1500-__events() {
1501+__events() {    
1502     _arguments \
1503         '--since=[Show previously created events and then stream.]'
1504 }
1505@@ -91,17 +143,14 @@ __info() {
1506     # no arguments
1507diff --git a/plugins/ember-cli/README.md b/plugins/ember-cli/README.md
1508new file mode 100644
1509index 0000000000000000000000000000000000000000..d1dedf8843786d5800d1c53f1efd5f193e47cdbb
1510--- /dev/null
1511+++ b/plugins/ember-cli/README.md
1512@@ -0,0 +1,22 @@
1513+# Ember-cli
1514+
1515+**Maintainer:** [BilalBudhani](http://www.github.com/BilalBudhani)
1516+
1517+Ember-cli (http://www.ember-cli.com/)
1518+
1519+### List of Aliases
1520+
1521+alias es='ember serve'
1522+alias ea='ember addon'
1523+alias eb='ember build'
1524+alias ed='ember destroy'
1525+alias eg='ember generate'
1526+alias eh='ember help'
1527+alias ein='ember init'
1528+alias eia='ember install:addon'
1529+alias eib='ember install:bower'
1530+alias ein='ember install:npm'
1531+alias ei='ember install'
1532+alias et='ember test'
1533+alias eu='ember update'
1534+alias ev='ember version'
1535diff --git a/plugins/ember-cli/ember-cli.plugin.zsh b/plugins/ember-cli/ember-cli.plugin.zsh
1536new file mode 100644
1537index 0000000000000000000000000000000000000000..044a2c0438896a51e05d8dc4015e72db555442f0
1538--- /dev/null
1539+++ b/plugins/ember-cli/ember-cli.plugin.zsh
1540@@ -0,0 +1,19 @@
1541+# Ember ClI 
1542+# visit http://www.ember-cli.com/ to view user guid 
1543+
1544+alias es='ember serve'
1545+alias ea='ember addon'
1546+alias eb='ember build'
1547+alias ed='ember destroy'
1548+alias eg='ember generate'
1549+alias eh='ember help'
1550+alias ein='ember init'
1551+alias eia='ember install:addon'
1552+alias eib='ember install:bower'
1553+alias ein='ember install:npm'
1554+alias ei='ember install'
1555+alias et='ember test'
1556+alias eu='ember update'
1557+
1558+# version
1559+alias ev='ember version'
1560diff --git a/plugins/emoji/README.md b/plugins/emoji/README.md
1561new file mode 100644
1562index 0000000000000000000000000000000000000000..889e567e6ce8e3689fa57a517fd74ab8bc8732e6
1563--- /dev/null
1564+++ b/plugins/emoji/README.md
1565@@ -0,0 +1,135 @@
1566+# emoji plugin
1567+
1568+Support for conveniently working with Unicode emoji in Zsh.
1569+
1570+## Features
1571+
1572diff --git a/plugins/emoji/emoji-char-definitions.zsh b/plugins/emoji/emoji-char-definitions.zsh
1573new file mode 100644
1574index 0000000000000000000000000000000000000000..7d110603ceb4d7b579acaf8f12f4cea3e2b05833
1575--- /dev/null
1576+++ b/plugins/emoji/emoji-char-definitions.zsh
1577@@ -0,0 +1,1294 @@
1578+
1579+# emoji-char-definitions.zsh - Emoji character definitions for oh-my-zsh emoji plugin
1580+#
1581+# This file is auto-generated by update_emoji.pl. Do not edit it manually.
1582+#
1583+# This contains the definition for:
1584+#   $emoji         - which maps character names to Unicode characters
1585+#   $emoji_flags   - maps country names to Unicode flag characters using region indicators 
1586+
1587+typeset -gAH emoji
1588+typeset -gAH emoji_flags
1589+
1590+emoji[copyright_sign]=$'\U00A9'
1591+emoji[registered_sign]=$'\U00AE'
1592+emoji[double_exclamation_mark]=$'\U203C'
1593+emoji[exclamation_question_mark]=$'\U2049'
1594+emoji[trade_mark_sign]=$'\U2122'
1595+emoji[information_source]=$'\U2139'
1596+emoji[left_right_arrow]=$'\U2194'
1597+emoji[up_down_arrow]=$'\U2195'
1598+emoji[north_west_arrow]=$'\U2196'
1599+emoji[north_east_arrow]=$'\U2197'
1600+emoji[south_east_arrow]=$'\U2198'
1601+emoji[south_west_arrow]=$'\U2199'
1602+emoji[leftwards_arrow_with_hook]=$'\U21A9'
1603+emoji[rightwards_arrow_with_hook]=$'\U21AA'
1604+emoji[watch]=$'\U231A'
1605+emoji[hourglass]=$'\U231B'
1606+emoji[keyboard]=$'\U2328'
1607+emoji[eject_symbol]=$'\U23CF'
1608+emoji[black_right_pointing_double_triangle]=$'\U23E9'
1609+emoji[black_left_pointing_double_triangle]=$'\U23EA'
1610+emoji[black_up_pointing_double_triangle]=$'\U23EB'
1611+emoji[black_down_pointing_double_triangle]=$'\U23EC'
1612+emoji[black_right_pointing_double_triangle_with_vertical_bar]=$'\U23ED'
1613+emoji[black_left_pointing_double_triangle_with_vertical_bar]=$'\U23EE'
1614+emoji[black_right_pointing_triangle_with_double_vertical_bar]=$'\U23EF'
1615+emoji[alarm_clock]=$'\U23F0'
1616+emoji[stopwatch]=$'\U23F1'
1617+emoji[timer_clock]=$'\U23F2'
1618+emoji[hourglass_with_flowing_sand]=$'\U23F3'
1619+emoji[double_vertical_bar]=$'\U23F8'
1620+emoji[black_square_for_stop]=$'\U23F9'
1621+emoji[black_circle_for_record]=$'\U23FA'
1622+emoji[circled_latin_capital_letter_m]=$'\U24C2'
1623+emoji[black_small_square]=$'\U25AA'
1624+emoji[white_small_square]=$'\U25AB'
1625+emoji[black_right_pointing_triangle]=$'\U25B6'
1626+emoji[black_left_pointing_triangle]=$'\U25C0'
1627+emoji[white_medium_square]=$'\U25FB'
1628+emoji[black_medium_square]=$'\U25FC'
1629+emoji[white_medium_small_square]=$'\U25FD'
1630+emoji[black_medium_small_square]=$'\U25FE'
1631+emoji[black_sun_with_rays]=$'\U2600'
1632+emoji[cloud]=$'\U2601'
1633+emoji[umbrella]=$'\U2602'
1634+emoji[snowman]=$'\U2603'
1635+emoji[comet]=$'\U2604'
1636+emoji[black_telephone]=$'\U260E'
1637+emoji[ballot_box_with_check]=$'\U2611'
1638+emoji[umbrella_with_rain_drops]=$'\U2614'
1639+emoji[hot_beverage]=$'\U2615'
1640+emoji[shamrock]=$'\U2618'
1641+emoji[white_up_pointing_index]=$'\U261D'
1642+emoji[skull_and_crossbones]=$'\U2620'
1643+emoji[radioactive_sign]=$'\U2622'
1644+emoji[biohazard_sign]=$'\U2623'
1645+emoji[orthodox_cross]=$'\U2626'
1646+emoji[star_and_crescent]=$'\U262A'
1647+emoji[peace_symbol]=$'\U262E'
1648+emoji[yin_yang]=$'\U262F'
1649+emoji[wheel_of_dharma]=$'\U2638'
1650+emoji[white_frowning_face]=$'\U2639'
1651+emoji[white_smiling_face]=$'\U263A'
1652+emoji[aries]=$'\U2648'
1653+emoji[taurus]=$'\U2649'
1654+emoji[gemini]=$'\U264A'
1655+emoji[cancer]=$'\U264B'
1656+emoji[leo]=$'\U264C'
1657+emoji[virgo]=$'\U264D'
1658+emoji[libra]=$'\U264E'
1659+emoji[scorpius]=$'\U264F'
1660+emoji[sagittarius]=$'\U2650'
1661+emoji[capricorn]=$'\U2651'
1662+emoji[aquarius]=$'\U2652'
1663+emoji[pisces]=$'\U2653'
1664+emoji[black_spade_suit]=$'\U2660'
1665+emoji[black_club_suit]=$'\U2663'
1666+emoji[black_heart_suit]=$'\U2665'
1667+emoji[black_diamond_suit]=$'\U2666'
1668+emoji[hot_springs]=$'\U2668'
1669+emoji[black_universal_recycling_symbol]=$'\U267B'
1670+emoji[wheelchair_symbol]=$'\U267F'
1671+emoji[hammer_and_pick]=$'\U2692'
1672+emoji[anchor]=$'\U2693'
1673+emoji[crossed_swords]=$'\U2694'
1674+emoji[scales]=$'\U2696'
1675+emoji[alembic]=$'\U2697'
1676+emoji[gear]=$'\U2699'
1677diff --git a/plugins/emoji/emoji-data.txt b/plugins/emoji/emoji-data.txt
1678new file mode 100644
1679index 0000000000000000000000000000000000000000..7b4c015f7afb8ccd82f9b027da43df8c7a8e1ba7
1680--- /dev/null
1681+++ b/plugins/emoji/emoji-data.txt
1682@@ -0,0 +1,1308 @@
1683+# DRAFT emoji-data.txt
1684+# For details about the format and other information, see /../../../reports/tr51/index.html#Data_Files.
1685+#
1686+# Format: Code ; Default_Emoji_Style ; Emoji_Level ; Emoji_Modifier_Status ; Emoji_Sources # Comment
1687+#
1688+#   Field 1 — Default_Emoji_Style:
1689+#             text:      default text presentation
1690+#             emoji:     default emoji presentation
1691+#   Field 2 — Emoji_Level:
1692+#             L1:        level 1 emoji
1693+#             L2:        level 2 emoji
1694+#             NA:        not applicable
1695+#   Field 3 — Emoji_Modifier_Status:
1696+#             modifier:  an emoji modifier
1697+#             primary:   a primary emoji modifier base
1698+#             secondary: a secondary emoji modifier base
1699+#             none:      not applicable
1700+#   Field 4 — Emoji_Sources:
1701+#             one or more values from {z, a, j, w, x}
1702+#             see the key in http://www.unicode.org/draft/reports/tr51/tr51.html#Major_Sources
1703+#             NA:        not applicable
1704+#   Comment — currently contains the version where the character was first encoded,
1705+#             followed by:
1706+#             - a character name in uppercase (for a single character),
1707+#             - a keycap name,
1708+#             - an associated flag, where is associated with value unicode region code
1709+#
1710+00A9 ;	text ;	L1 ;	none ;	j	# V1.1 (©) COPYRIGHT SIGN
1711+00AE ;	text ;	L1 ;	none ;	j	# V1.1 (®) REGISTERED SIGN
1712+203C ;	text ;	L1 ;	none ;	a j	# V1.1 (‼) DOUBLE EXCLAMATION MARK
1713+2049 ;	text ;	L1 ;	none ;	a j	# V3.0 (⁉) EXCLAMATION QUESTION MARK
1714+2122 ;	text ;	L1 ;	none ;	j	# V1.1 (™) TRADE MARK SIGN
1715+2139 ;	text ;	L1 ;	none ;	j	# V3.0 (ℹ) INFORMATION SOURCE
1716+2194 ;	text ;	L1 ;	none ;	z j	# V1.1 (↔) LEFT RIGHT ARROW
1717+2195 ;	text ;	L1 ;	none ;	z j	# V1.1 (↕) UP DOWN ARROW
1718+2196 ;	text ;	L1 ;	none ;	j	# V1.1 (↖) NORTH WEST ARROW
1719+2197 ;	text ;	L1 ;	none ;	j	# V1.1 (↗) NORTH EAST ARROW
1720+2198 ;	text ;	L1 ;	none ;	j	# V1.1 (↘) SOUTH EAST ARROW
1721+2199 ;	text ;	L1 ;	none ;	j	# V1.1 (↙) SOUTH WEST ARROW
1722+21A9 ;	text ;	L1 ;	none ;	j	# V1.1 (↩) LEFTWARDS ARROW WITH HOOK
1723+21AA ;	text ;	L1 ;	none ;	j	# V1.1 (↪) RIGHTWARDS ARROW WITH HOOK
1724+231A ;	emoji ;	L1 ;	none ;	j	# V1.1 (⌚) WATCH
1725+231B ;	emoji ;	L1 ;	none ;	j	# V1.1 (⌛) HOURGLASS
1726+2328 ;	text ;	L2 ;	none ;	x	# V1.1 (⌨) KEYBOARD
1727+23CF ;	text ;	L2 ;	none ;	x	# V4.0 (⏏) EJECT SYMBOL
1728+23E9 ;	emoji ;	L1 ;	none ;	j w	# V6.0 (⏩) BLACK RIGHT-POINTING DOUBLE TRIANGLE
1729+23EA ;	emoji ;	L1 ;	none ;	j w	# V6.0 (⏪) BLACK LEFT-POINTING DOUBLE TRIANGLE
1730+23EB ;	emoji ;	L1 ;	none ;	j	# V6.0 (⏫) BLACK UP-POINTING DOUBLE TRIANGLE
1731+23EC ;	emoji ;	L1 ;	none ;	j	# V6.0 (⏬) BLACK DOWN-POINTING DOUBLE TRIANGLE
1732+23ED ;	text ;	L2 ;	none ;	w	# V6.0 (⏭) BLACK RIGHT-POINTING DOUBLE TRIANGLE WITH VERTICAL BAR
1733+23EE ;	text ;	L2 ;	none ;	w	# V6.0 (⏮) BLACK LEFT-POINTING DOUBLE TRIANGLE WITH VERTICAL BAR
1734+23EF ;	text ;	L2 ;	none ;	x	# V6.0 (⏯) BLACK RIGHT-POINTING TRIANGLE WITH DOUBLE VERTICAL BAR
1735+23F0 ;	emoji ;	L1 ;	none ;	j	# V6.0 (⏰) ALARM CLOCK
1736+23F1 ;	text ;	L2 ;	none ;	x	# V6.0 (⏱) STOPWATCH
1737+23F2 ;	text ;	L2 ;	none ;	x	# V6.0 (⏲) TIMER CLOCK
1738+23F3 ;	emoji ;	L1 ;	none ;	j w	# V6.0 (⏳) HOURGLASS WITH FLOWING SAND
1739+23F8 ;	text ;	L2 ;	none ;	w	# V7.0 (⏸) DOUBLE VERTICAL BAR
1740+23F9 ;	text ;	L2 ;	none ;	w	# V7.0 (⏹) BLACK SQUARE FOR STOP
1741+23FA ;	text ;	L2 ;	none ;	w	# V7.0 (⏺) BLACK CIRCLE FOR RECORD
1742+24C2 ;	text ;	L1 ;	none ;	j	# V1.1 (Ⓜ) CIRCLED LATIN CAPITAL LETTER M
1743+25AA ;	text ;	L1 ;	none ;	j w	# V1.1 (▪) BLACK SMALL SQUARE
1744+25AB ;	text ;	L1 ;	none ;	j	# V1.1 (▫) WHITE SMALL SQUARE
1745+25B6 ;	text ;	L1 ;	none ;	a j w	# V1.1 (▶) BLACK RIGHT-POINTING TRIANGLE
1746+25C0 ;	text ;	L1 ;	none ;	a j w	# V1.1 (◀) BLACK LEFT-POINTING TRIANGLE
1747+25FB ;	text ;	L1 ;	none ;	j	# V3.2 (◻) WHITE MEDIUM SQUARE
1748+25FC ;	text ;	L1 ;	none ;	j w	# V3.2 (◼) BLACK MEDIUM SQUARE
1749+25FD ;	emoji ;	L1 ;	none ;	j	# V3.2 (◽) WHITE MEDIUM SMALL SQUARE
1750+25FE ;	emoji ;	L1 ;	none ;	j w	# V3.2 (◾) BLACK MEDIUM SMALL SQUARE
1751+2600 ;	text ;	L1 ;	none ;	a j	# V1.1 (☀) BLACK SUN WITH RAYS
1752+2601 ;	text ;	L1 ;	none ;	a j w	# V1.1 (☁) CLOUD
1753+2602 ;	text ;	L2 ;	none ;	a	# V1.1 (☂) UMBRELLA
1754+2603 ;	text ;	L2 ;	none ;	a	# V1.1 (☃) SNOWMAN
1755+2604 ;	text ;	L2 ;	none ;	x	# V1.1 (☄) COMET
1756+260E ;	text ;	L1 ;	none ;	z a j	# V1.1 (☎) BLACK TELEPHONE
1757+2611 ;	text ;	L1 ;	none ;	j w	# V1.1 (☑) BALLOT BOX WITH CHECK
1758+2614 ;	emoji ;	L1 ;	none ;	a j	# V4.0 (☔) UMBRELLA WITH RAIN DROPS
1759+2615 ;	emoji ;	L1 ;	none ;	j	# V4.0 (☕) HOT BEVERAGE
1760+2618 ;	text ;	L2 ;	none ;	x	# V4.1 (☘) SHAMROCK
1761+261D ;	text ;	L1 ;	secondary ;	j w	# V1.1 (☝) WHITE UP POINTING INDEX
1762+2620 ;	text ;	L2 ;	none ;	x	# V1.1 (☠) SKULL AND CROSSBONES
1763+2622 ;	text ;	L2 ;	none ;	x	# V1.1 (☢) RADIOACTIVE SIGN
1764+2623 ;	text ;	L2 ;	none ;	x	# V1.1 (☣) BIOHAZARD SIGN
1765+2626 ;	text ;	L2 ;	none ;	x	# V1.1 (☦) ORTHODOX CROSS
1766+262A ;	text ;	L2 ;	none ;	w	# V1.1 (☪) STAR AND CRESCENT
1767+262E ;	text ;	L2 ;	none ;	x	# V1.1 (☮) PEACE SYMBOL
1768+262F ;	text ;	L2 ;	none ;	w	# V1.1 (☯) YIN YANG
1769+2638 ;	text ;	L2 ;	none ;	w	# V1.1 (☸) WHEEL OF DHARMA
1770+2639 ;	text ;	L2 ;	secondary ;	w	# V1.1 (☹) WHITE FROWNING FACE
1771+263A ;	text ;	L1 ;	secondary ;	j w	# V1.1 (☺) WHITE SMILING FACE
1772+2648 ;	emoji ;	L1 ;	none ;	j w	# V1.1 (♈) ARIES
1773+2649 ;	emoji ;	L1 ;	none ;	j w	# V1.1 (♉) TAURUS
1774+264A ;	emoji ;	L1 ;	none ;	j w	# V1.1 (♊) GEMINI
1775+264B ;	emoji ;	L1 ;	none ;	j w	# V1.1 (♋) CANCER
1776+264C ;	emoji ;	L1 ;	none ;	j w	# V1.1 (♌) LEO
1777+264D ;	emoji ;	L1 ;	none ;	j w	# V1.1 (♍) VIRGO
1778+264E ;	emoji ;	L1 ;	none ;	j w	# V1.1 (♎) LIBRA
1779+264F ;	emoji ;	L1 ;	none ;	j w	# V1.1 (♏) SCORPIUS
1780+2650 ;	emoji ;	L1 ;	none ;	j w	# V1.1 (♐) SAGITTARIUS
1781+2651 ;	emoji ;	L1 ;	none ;	j w	# V1.1 (♑) CAPRICORN
1782diff --git a/plugins/emoji/emoji.plugin.zsh b/plugins/emoji/emoji.plugin.zsh
1783new file mode 100644
1784index 0000000000000000000000000000000000000000..a98d0b714c4794bc9a7744108b2a66066bcc3fe2
1785--- /dev/null
1786+++ b/plugins/emoji/emoji.plugin.zsh
1787@@ -0,0 +1,289 @@
1788+# emoji plugin
1789+#
1790+# Makes emoji support available within ZSH
1791+#
1792+# See the README for documentation.
1793+
1794+_omz_emoji_plugin_dir="${0:h}"
1795+
1796+() {
1797+
1798+local LC_ALL=en_US.UTF-8
1799+
1800+typeset -gAH emoji_groups
1801+typeset -gAH emoji_con
1802+typeset -gAH emoji2
1803+typeset -gAH emoji_skintone
1804+
1805+source "$_omz_emoji_plugin_dir/emoji-char-definitions.zsh"
1806+unset _omz_emoji_plugin_dir
1807+
1808+# These additional emoji are not in the definition file, but are useful in conjunction with it
1809+
1810+# This is a combinin character that can be placed after any other character to surround
1811+# it in a "keycap" symbol.
1812+# The digits 0-9 are already in the emoji table as keycap_digit_<N>, keycap_ten, etc. 
1813+# It's unclear whether this should be in the $emoji array, because those characters are all ones
1814+# which can be displayed on their own.
1815+#emoji[combining_enclosing_keycap]="\U20E3"
1816+
1817+emoji[regional_indicator_symbol_letter_d_regional_indicator_symbol_letter_e]=$'\xF0\x9F\x87\xA9\xF0\x9F\x87\xAA'
1818+emoji[regional_indicator_symbol_letter_g_regional_indicator_symbol_letter_b]=$'\xF0\x9F\x87\xAC\xF0\x9F\x87\xA7'
1819+emoji[regional_indicator_symbol_letter_c_regional_indicator_symbol_letter_n]=$'\xF0\x9F\x87\xA8\xF0\x9F\x87\xB3'
1820+emoji[regional_indicator_symbol_letter_j_regional_indicator_symbol_letter_p]=$'\xF0\x9F\x87\xAF\xF0\x9F\x87\xB5'
1821+emoji[regional_indicator_symbol_letter_k_regional_indicator_symbol_letter_r]=$'\xF0\x9F\x87\xB0\xF0\x9F\x87\xB7'
1822+emoji[regional_indicator_symbol_letter_f_regional_indicator_symbol_letter_r]=$'\xF0\x9F\x87\xAB\xF0\x9F\x87\xB7'
1823+emoji[regional_indicator_symbol_letter_e_regional_indicator_symbol_letter_s]=$'\xF0\x9F\x87\xAA\xF0\x9F\x87\xB8'
1824+emoji[regional_indicator_symbol_letter_i_regional_indicator_symbol_letter_t]=$'\xF0\x9F\x87\xAE\xF0\x9F\x87\xB9'
1825+emoji[regional_indicator_symbol_letter_u_regional_indicator_symbol_letter_s]=$'\xF0\x9F\x87\xBA\xF0\x9F\x87\xB8'
1826+emoji[regional_indicator_symbol_letter_r_regional_indicator_symbol_letter_u]=$'\xF0\x9F\x87\xB7\xF0\x9F\x87\xBA'
1827+
1828+# Nonstandard alias names
1829+emoji[vulcan_salute]=$'\U1F596'
1830+
1831+
1832+# Emoji combining and auxiliary characters
1833+
1834+# "Variation Selectors" for controlling text vs emoji style presentation
1835+# These apply to the immediately preceding character
1836+emoji2[text_style]=$'\UFE0E'
1837+emoji2[emoji_style]=$'\UFE0F'
1838+# Joiner that indicates a single combined-form glyph (ligature) should be used
1839+emoji2[zero_width_joiner]=$'\U200D'
1840+# Skin tone modifiers
1841+emoji2[emoji_modifier_fitzpatrick_type_1_2]=$'\U1F3FB'
1842+emoji2[emoji_modifier_fitzpatrick_type_3]=$'\U1F3FC'
1843+emoji2[emoji_modifier_fitzpatrick_type_4]=$'\U1F3FD'
1844+emoji2[emoji_modifier_fitzpatrick_type_5]=$'\U1F3FE'
1845+emoji2[emoji_modifier_fitzpatrick_type_6]=$'\U1F3FF'
1846+# Various other combining characters. (Incomplete list; I selected ones that sound useful)
1847+emoji2[combining_enclosing_circle]=$'\U20DD'
1848+emoji2[combining_enclosing_square]=$'\U20DE'
1849+emoji2[combining_enclosing_diamond]=$'\U20DF'
1850+emoji2[combining_enclosing_circle_backslash]=$'\U20E0'
1851+emoji2[combining_enclosing_screen]=$'\U20E2'
1852+emoji2[combining_enclosing_keycap]=$'\U20E3'
1853+emoji2[combining_enclosing_upward_pointing_triangle]=$'\U20E4'
1854+
1855+# Easier access to skin tone modifiers
1856+emoji_skintone[1_2]=$'\U1F3FB'
1857+emoji_skintone[3]=$'\U1F3FC'
1858+emoji_skintone[4]=$'\U1F3FD'
1859+emoji_skintone[5]=$'\U1F3FE'
1860+emoji_skintone[6]=$'\U1F3FF'
1861+
1862+# Emoji groups
1863+# These are stored in a single associative array, $emoji_groups, to avoid cluttering up the global
1864+# namespace, and to allow adding additional group definitions at run time.
1865+# The keys are the group names, and the values are whitespace-separated lists of emoji character names.
1866+#
1867+# These extra local arrays are used to allow more convenient formatting of the source code.
1868+
1869+emoji_groups[fruits]="
1870+  tomato
1871+  aubergine
1872+  grapes
1873+  melon
1874+  watermelon
1875+  tangerine
1876+  banana
1877+  pineapple
1878+  red_apple
1879+  green_apple
1880+  peach
1881+  cherries
1882+  strawberry
1883+  lemon
1884+  pear
1885+"
1886+
1887diff --git a/plugins/emoji/update_emoji.pl b/plugins/emoji/update_emoji.pl
1888new file mode 100644
1889index 0000000000000000000000000000000000000000..d90c6e31622e362038880a64d26c41dc6f860580
1890--- /dev/null
1891+++ b/plugins/emoji/update_emoji.pl
1892@@ -0,0 +1,113 @@
1893+#!/usr/bin/perl -w
1894+#
1895+# update_emoji.pl
1896+#
1897+# This script generates the emoji.plugin.zsh emoji definitions from the Unicode
1898+# character data for the emoji characters.
1899+#
1900+# The data file can be found at http://unicode.org/Public/emoji/latest/emoji-data.txt
1901+# as referenced in Unicode TR51 (http://www.unicode.org/reports/tr51/index.html).
1902+#
1903+# This is known to work with the data file from version 1.0. It may not work with later
1904+# versions if the format changes. In particular, this reads line comments to get the
1905+# emoji character name and unicode version.
1906+#
1907+# Country names have punctuation and other non-letter characters removed from their name,
1908+# to avoid possible complications with having to escape the strings when using them as 
1909+# array subscripts. The definition file seems to use some combining characters like accents
1910+# that get stripped during this process.
1911+
1912+use strict;
1913+use warnings;
1914+use 5.010;
1915+use autodie;
1916+
1917+use Path::Class;
1918+use File::Copy;
1919+
1920+# Parse definitions out of the data file and convert
1921+sub process_emoji_data_file {
1922+	my ( $infile, $outfilename ) = @_;
1923+	my $file = file($infile);
1924+	my $outfile = file($outfilename);
1925+	my $outfilebase = $outfile->basename();
1926+	my $tempfilename = "$outfilename.tmp";
1927+	my $tempfile = file($tempfilename);
1928+	my $outfh = $tempfile->openw();
1929+	$outfh->print("
1930+# $outfilebase - Emoji character definitions for oh-my-zsh emoji plugin
1931+#
1932+# This file is auto-generated by update_emoji.pl. Do not edit it manually.
1933+#
1934+# This contains the definition for:
1935+#   \$emoji         - which maps character names to Unicode characters
1936+#   \$emoji_flags   - maps country names to Unicode flag characters using region indicators 
1937+
1938+# Main emoji
1939+typeset -gAH emoji
1940+# National flags
1941+typeset -gAH emoji_flags
1942+# Combining modifiers
1943+typeset -gAH emoji_mod
1944+
1945+");
1946+
1947+	my $fh = $file->openr();
1948+	my $line_num = 0;
1949+	while ( my $line = $fh->getline() ) {
1950+		$line_num++;
1951+		$_ = $line;
1952+		# Skip all-comment lines (from the header) and blank lines
1953+		# (But don't strip comments on normal lines; we need to parse those for
1954+		# the emoji names.)
1955+		next if /^\s*#/ or /^\s*$/;
1956+
1957+		if (/^(\S.*?\S)\s*;\s*(\w+)\s*;\s*(\w+)\s*;\s*(\w+)\s*;\s*(\w.*?)\s*#\s*V(\S+)\s\(.*?\)\s*(\w.*\S)\s*$/) {
1958+			my ($code, $style, $level, $modifier_status, $sources, $version, $keycap_name) 
1959+				= ($1, $2, $3, $4, $5, $6, $7);
1960+			#print "code=$code style=$style level=$level modifier_status=$modifier_status sources=$sources version=$version name=$keycap_name\n";
1961+			my @code_points = split /\s+/, $code;
1962+			my @sources = split /\s+/, $sources;
1963+
1964+			my $flag_country = "";
1965+			if ( $keycap_name =~ /^flag for (\S.*?)\s*$/) {
1966+				$flag_country = $1;
1967+			}
1968+
1969+			my $zsh_code = join '', map { "\\U$_" } @code_points;
1970+			# Convert keycap names to valid associative array names that do not require any
1971+			# quoting. Works fine for most stuff, but is clumsy for flags.
1972+			my $omz_name = lc($keycap_name);
1973+			$omz_name =~ s/[^A-Za-z0-9]/_/g;
1974+			my $zsh_flag_country = $flag_country;
1975+			$zsh_flag_country =~ s/[^\p{Letter}]/_/g;
1976+			if ($flag_country) {
1977+				$outfh->print("emoji_flags[$zsh_flag_country]=\$'$zsh_code'\n");
1978+			} else {
1979+				$outfh->print("emoji[$omz_name]=\$'$zsh_code'\n");				
1980+			}
1981+			# Modifiers are included in both the main set and their separate map,
1982+			# because they have a standalone representation as a color swatch.
1983+			if ( $modifier_status == "modifier" ) {
1984+				$outfh->print("emoji_mod[$omz_name]=\$'$zsh_code'\n");
1985+			}
1986+		} else {
1987+			die "Failed parsing line $line_num: '$_'";
1988+		}
1989+	}
1990+	$fh->close();
1991+	$outfh->print("\n");