summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/adb/_adb12
-rw-r--r--plugins/apache2-macports/README.md19
-rw-r--r--plugins/archlinux/README.md64
-rw-r--r--plugins/archlinux/archlinux.plugin.zsh16
-rw-r--r--plugins/atom/atom.plugin.zsh14
-rw-r--r--plugins/autoenv/autoenv.plugin.zsh28
-rw-r--r--plugins/autojump/autojump.plugin.zsh4
-rw-r--r--plugins/aws/aws.plugin.zsh10
-rwxr-xr-xplugins/bgnotify/bgnotify.plugin.zsh40
-rw-r--r--plugins/boot2docker/README.md6
-rw-r--r--plugins/boot2docker/_boot2docker73
-rw-r--r--plugins/branch/README.md33
-rw-r--r--plugins/branch/branch.plugin.zsh26
-rw-r--r--plugins/brew/_brew57
-rw-r--r--plugins/brew/brew.plugin.zsh4
-rw-r--r--plugins/bundler/README.md3
-rw-r--r--plugins/bundler/bundler.plugin.zsh2
-rw-r--r--plugins/cakephp3/cakephp3.plugin.zsh19
-rw-r--r--plugins/capistrano/_capistrano53
-rw-r--r--plugins/capistrano/capistrano.plugin.zsh11
-rw-r--r--plugins/chruby/chruby.plugin.zsh12
-rw-r--r--plugins/chucknorris/chucknorris.plugin.zsh28
-rw-r--r--plugins/chucknorris/fortunes/chucknorris11
-rw-r--r--plugins/codeclimate/_codeclimate82
-rw-r--r--plugins/coffee/README.md31
-rw-r--r--plugins/coffee/coffee.plugin.zsh16
-rw-r--r--plugins/colored-man-pages/colored-man-pages.plugin.zsh32
-rw-r--r--plugins/colored-man/colored-man.plugin.zsh32
-rw-r--r--plugins/command-not-found/command-not-found.plugin.zsh8
-rw-r--r--plugins/common-aliases/common-aliases.plugin.zsh4
-rw-r--r--plugins/composer/composer.plugin.zsh4
-rw-r--r--plugins/copydir/copydir.plugin.zsh6
-rw-r--r--plugins/copyfile/copyfile.plugin.zsh8
-rw-r--r--plugins/debian/debian.plugin.zsh12
-rw-r--r--plugins/dircycle/dircycle.plugin.zsh16
-rw-r--r--plugins/dirhistory/dirhistory.plugin.zsh3
-rw-r--r--plugins/dirpersist/dirpersist.plugin.zsh3
-rwxr-xr-xplugins/dnf/README.md25
-rw-r--r--plugins/dnf/dnf.plugin.zsh15
-rw-r--r--plugins/docker-compose/README.md5
-rw-r--r--plugins/docker-compose/_docker-compose308
-rw-r--r--plugins/docker/_docker99
-rw-r--r--plugins/ember-cli/README.md33
-rw-r--r--plugins/ember-cli/ember-cli.plugin.zsh7
-rw-r--r--plugins/emoji/README.md135
-rw-r--r--plugins/emoji/emoji-char-definitions.zsh1303
-rw-r--r--plugins/emoji/emoji-data.txt1308
-rw-r--r--plugins/emoji/emoji.plugin.zsh288
-rw-r--r--plugins/emoji/update_emoji.pl113
-rw-r--r--plugins/emotty/emotty.plugin.zsh43
-rw-r--r--plugins/emotty/emotty_emoji_set.zsh24
-rw-r--r--plugins/emotty/emotty_floral_set.zsh18
-rw-r--r--plugins/emotty/emotty_love_set.zsh34
-rw-r--r--plugins/emotty/emotty_nature_set.zsh58
-rw-r--r--plugins/emotty/emotty_stellar_set.zsh25
-rw-r--r--plugins/emotty/emotty_zodiac_set.zsh29
-rw-r--r--plugins/encode64/encode64.plugin.zsh17
-rw-r--r--plugins/extract/_extract2
-rw-r--r--plugins/extract/extract.plugin.zsh10
-rw-r--r--plugins/fancy-ctrl-z/README.md14
-rw-r--r--plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh12
-rw-r--r--plugins/fasd/fasd.plugin.zsh6
-rw-r--r--plugins/fbterm/fbterm.plugin.zsh7
-rw-r--r--plugins/fedora/README.md3
-rw-r--r--plugins/fedora/fedora.plugin.zsh16
-rw-r--r--plugins/forklift/README.md15
-rw-r--r--plugins/frontend-search/README.md112
-rw-r--r--plugins/frontend-search/_frontend-search.sh8
-rw-r--r--plugins/frontend-search/frontend-search.plugin.zsh225
-rw-r--r--plugins/git-extras/README.md11
-rw-r--r--plugins/git-extras/git-extras.plugin.zsh242
-rw-r--r--plugins/git-flow/git-flow.plugin.zsh4
-rw-r--r--plugins/git-hubflow/git-hubflow.plugin.zsh7
-rw-r--r--plugins/git-prompt/git-prompt.plugin.zsh89
-rw-r--r--plugins/git-prompt/gitstatus.py146
-rw-r--r--plugins/git/README.md10
-rw-r--r--plugins/git/_git-branch83
-rw-r--r--plugins/git/_git-remote74
-rw-r--r--plugins/git/git.plugin.zsh340
-rw-r--r--plugins/gitfast/_git10
-rw-r--r--plugins/gitfast/git-completion.bash47
-rw-r--r--plugins/gitfast/git-prompt.sh36
-rw-r--r--plugins/github/README.md46
-rw-r--r--plugins/github/_github40
-rw-r--r--plugins/github/_hub163
-rw-r--r--plugins/github/github.plugin.zsh101
-rw-r--r--plugins/gitignore/gitignore.plugin.zsh2
-rw-r--r--plugins/gnu-utils/gnu-utils.plugin.zsh5
-rw-r--r--plugins/golang/golang.plugin.zsh41
-rw-r--r--plugins/golang/templates/package.txt29
-rw-r--r--plugins/golang/templates/search.txt0
-rw-r--r--plugins/gradle/gradle.plugin.zsh52
-rw-r--r--plugins/gulp/gulp.plugin.zsh29
-rw-r--r--plugins/heroku/_heroku1
-rw-r--r--plugins/history-substring-search/README.markdown7
-rw-r--r--plugins/history-substring-search/README.md149
-rw-r--r--plugins/history-substring-search/history-substring-search.plugin.zsh18
-rw-r--r--plugins/history-substring-search/history-substring-search.zsh324
-rwxr-xr-xplugins/history-substring-search/update-from-upstream.zsh129
-rw-r--r--plugins/history/README.md15
-rw-r--r--plugins/httpie/README.md6
-rw-r--r--plugins/jira/README.md64
-rw-r--r--plugins/jira/_jira22
-rw-r--r--plugins/jira/jira.plugin.zsh140
-rw-r--r--plugins/jump/jump.plugin.zsh2
-rw-r--r--plugins/kitchen/_kitchen41
-rw-r--r--plugins/laravel5/laravel5.plugin.zsh4
-rw-r--r--plugins/last-working-dir/last-working-dir.plugin.zsh5
-rw-r--r--plugins/lighthouse/lighthouse.plugin.zsh2
-rw-r--r--plugins/man/man.zsh27
-rw-r--r--plugins/mercurial/README.md60
-rw-r--r--plugins/mercurial/mercurial.plugin.zsh3
-rw-r--r--plugins/mix-fast/README.md28
-rw-r--r--plugins/mix-fast/mix-fast.plugin.zsh29
-rw-r--r--plugins/mix/_mix41
-rw-r--r--plugins/mvn/mvn.plugin.zsh40
-rwxr-xr-xplugins/n98-magerun/n98-magerun.plugin.zsh34
-rw-r--r--plugins/nmap/README.md19
-rw-r--r--plugins/nmap/nmap.plugin.zsh6
-rw-r--r--plugins/node/node.plugin.zsh10
-rw-r--r--plugins/npm/npm.plugin.zsh10
-rw-r--r--plugins/osx/osx.plugin.zsh113
-rw-r--r--plugins/paver/paver.plugin.zsh16
-rw-r--r--plugins/pod/_pod1033
-rw-r--r--plugins/pyenv/pyenv.plugin.zsh6
-rw-r--r--plugins/pylint/pylint.plugin.zsh4
-rw-r--r--plugins/rails/rails.plugin.zsh9
-rw-r--r--plugins/rails3/rails3.plugin.zsh4
-rw-r--r--plugins/rails4/rails4.plugin.zsh4
-rw-r--r--plugins/rake-fast/rake-fast.plugin.zsh12
-rw-r--r--plugins/rand-quote/rand-quote.plugin.zsh2
-rw-r--r--plugins/rbenv/rbenv.plugin.zsh9
-rw-r--r--plugins/rvm/rvm.plugin.zsh10
-rw-r--r--plugins/scw/README.md7
-rw-r--r--plugins/scw/_scw333
-rw-r--r--plugins/spring/README.md25
-rw-r--r--plugins/spring/_spring29
-rw-r--r--plugins/stack/stack.plugin.zsh37
-rw-r--r--plugins/sublime/README.md4
-rw-r--r--plugins/sublime/sublime.plugin.zsh23
-rw-r--r--plugins/sudo/sudo.plugin.zsh6
-rw-r--r--plugins/svn/svn.plugin.zsh10
-rw-r--r--plugins/symfony2/symfony2.plugin.zsh2
-rw-r--r--plugins/systemadmin/systemadmin.plugin.zsh8
-rw-r--r--plugins/systemd/systemd.plugin.zsh9
-rw-r--r--plugins/taskwarrior/README.md13
-rw-r--r--plugins/taskwarrior/_task312
-rw-r--r--plugins/taskwarrior/taskwarrior.plugin.zsh14
-rw-r--r--plugins/terminalapp/terminalapp.plugin.zsh45
-rw-r--r--plugins/terraform/README.md11
-rw-r--r--plugins/terraform/_terraform177
-rw-r--r--plugins/textmate/textmate.plugin.zsh8
-rw-r--r--plugins/thefuck/README.md9
-rw-r--r--plugins/thefuck/thefuck.plugin.zsh17
-rw-r--r--plugins/tmux-cssh/_tmux-cssh25
-rw-r--r--plugins/tugboat/_tugboat106
-rw-r--r--plugins/ubuntu/ubuntu.plugin.zsh7
-rw-r--r--plugins/vagrant/_vagrant36
-rw-r--r--plugins/vault/README.md18
-rw-r--r--plugins/vault/_vault400
-rw-r--r--plugins/vi-mode/README.md75
-rw-r--r--plugins/vi-mode/vi-mode.plugin.zsh16
-rw-r--r--plugins/vim-interaction/vim-interaction.plugin.zsh22
-rw-r--r--plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh48
-rw-r--r--plugins/vundle/vundle.plugin.zsh16
-rwxr-xr-xplugins/wd/wd.sh28
-rw-r--r--plugins/web-search/web-search.plugin.zsh18
-rw-r--r--plugins/wp-cli/README.md4
-rw-r--r--plugins/wp-cli/wp-cli.plugin.zsh4
-rw-r--r--plugins/xcode/README.md84
-rw-r--r--plugins/xcode/_xcselv19
-rw-r--r--plugins/xcode/xcode.plugin.zsh195
-rw-r--r--plugins/z/README43
-rw-r--r--plugins/z/z.135
-rw-r--r--plugins/z/z.plugin.zsh7
-rw-r--r--plugins/z/z.sh425
-rw-r--r--plugins/zeus/README.md15
-rw-r--r--plugins/zeus/zeus.plugin.zsh4
-rw-r--r--plugins/zsh-navigation-tools/.config/znt/README.txt1
-rw-r--r--plugins/zsh-navigation-tools/.config/znt/n-aliases.conf5
-rw-r--r--plugins/zsh-navigation-tools/.config/znt/n-cd.conf26
-rw-r--r--plugins/zsh-navigation-tools/.config/znt/n-env.conf9
-rw-r--r--plugins/zsh-navigation-tools/.config/znt/n-functions.conf10
-rw-r--r--plugins/zsh-navigation-tools/.config/znt/n-history.conf10
-rw-r--r--plugins/zsh-navigation-tools/.config/znt/n-kill.conf13
-rw-r--r--plugins/zsh-navigation-tools/.config/znt/n-list.conf3
-rw-r--r--plugins/zsh-navigation-tools/.config/znt/n-options.conf5
-rw-r--r--plugins/zsh-navigation-tools/.config/znt/n-panelize.conf5
-rw-r--r--plugins/zsh-navigation-tools/LICENSE700
-rw-r--r--plugins/zsh-navigation-tools/README.md111
-rw-r--r--plugins/zsh-navigation-tools/n-aliases47
-rw-r--r--plugins/zsh-navigation-tools/n-cd68
-rw-r--r--plugins/zsh-navigation-tools/n-env47
-rw-r--r--plugins/zsh-navigation-tools/n-functions54
-rw-r--r--plugins/zsh-navigation-tools/n-history54
-rw-r--r--plugins/zsh-navigation-tools/n-kill96
-rw-r--r--plugins/zsh-navigation-tools/n-list428
-rw-r--r--plugins/zsh-navigation-tools/n-list-draw131
-rw-r--r--plugins/zsh-navigation-tools/n-list-input238
-rw-r--r--plugins/zsh-navigation-tools/n-options84
-rw-r--r--plugins/zsh-navigation-tools/n-panelize68
-rw-r--r--plugins/zsh-navigation-tools/znt-cd-widget8
-rw-r--r--plugins/zsh-navigation-tools/znt-history-widget14
-rw-r--r--plugins/zsh-navigation-tools/znt-kill-widget8
-rw-r--r--plugins/zsh-navigation-tools/znt-usetty-wrapper40
-rwxr-xr-xplugins/zsh-navigation-tools/zsh-navigation-tools.plugin.zsh38
206 files changed, 11807 insertions, 2447 deletions
diff --git a/plugins/adb/_adb b/plugins/adb/_adb
index 22089581a..f30f3247f 100644
--- a/plugins/adb/_adb
+++ b/plugins/adb/_adb
@@ -16,14 +16,22 @@ _1st_arguments=(
'help:show the help message'
'install:push this package file to the device and install it'
'jdwp:list PIDs of processes hosting a JDWP transport'
-'logcat:View device log'
+'kill-server:kill the server if it is running'
+'logcat:view device log'
'pull:copy file/dir from device'
'push:copy file/dir to device'
+'reboot:reboots the device, optionally into the bootloader or recovery program'
+'reboot-bootloader:reboots the device into the bootloader'
+'remount:remounts the partitions on the device read-write'
+'root:restarts the adbd daemon with root permissions'
+'sideload:push a ZIP to device and install it'
'shell:run remote shell interactively'
'sync:copy host->device only if changed (-l means list but dont copy)'
-‘tcpip:restart host adb in tcpip mode’
+'start-server:ensure that there is a server running'
+'tcpip:restart host adb in tcpip mode'
'uninstall:remove this app package from the device'
'version:show version num'
+'wait-for-device:block until device is online'
)
local expl
diff --git a/plugins/apache2-macports/README.md b/plugins/apache2-macports/README.md
new file mode 100644
index 000000000..099fc8da3
--- /dev/null
+++ b/plugins/apache2-macports/README.md
@@ -0,0 +1,19 @@
+## APACHE2 MACPORTS PLUGIN
+
+
+---
+
+### FEATURES
+
+| Alias | Function | Description |
+|:--------------:|:-------------------------------------------------------------------------------|----------------------:|
+| apache2restart | sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper restart | Restart apache daemon |
+| apache2start | sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper start | Start apache daemon |
+| apache2stop | sudo /opt/local/etc/LaunchDaemons/org.macports.apache2/apache2.wrapper stop | Stop apache daemon |
+
+---
+
+### CONTRIBUTORS
+ - Alexander Rinass (alex@rinass.net)
+
+---
diff --git a/plugins/archlinux/README.md b/plugins/archlinux/README.md
new file mode 100644
index 000000000..ad42d4cd2
--- /dev/null
+++ b/plugins/archlinux/README.md
@@ -0,0 +1,64 @@
+## ARCHLINUX PLUGIN
+
+
+---
+
+### FEATURES
+
+| Alias | Function | Description |
+|:------------:|-----------------------------------------|:--------------------------------------------------------------------------------------------------------------------|
+| pacin | sudo pacman -S | Install specific package(s) from the repositories |
+| pacins | sudo pacman -U | Install specific package not from the repositories but from a file |
+| pacinsd | sudo pacman -S --asdeps | Install given package(s) as dependencies of another package |
+| pacloc | pacman -Qi | Display information about a given package in the local database |
+| paclocs | pacman -Qs | Search for package(s) in the local database |
+| paclsorphans | sudo pacman -Qdt' | List all orphaned packages |
+| pacmir | sudo pacman -Syy | Force refresh of all package lists after updating /etc/pacman.d/mirrorlist |
+| pacre | sudo pacman -R | Remove the specified package(s), retaining its configuration(s) and required dependencies |
+| pacrem | sudo pacman -Rns | Remove the specified package(s), its configuration(s) and unneeded dependencies |
+| pacrep | pacman -Si | Display information about a given package in the repositories |
+| pacreps | pacman -Ss | Search for package(s) in the repositories |
+| pacrmorphans | sudo pacman -Rs $(pacman -Qtdq)' | Delete all orphaned packages |
+| pacupd | sudo pacman -Sy && sudo abs && sudo aur | Update and refresh the local package, ABS and AUR databases against repositories |
+| pacupd | sudo pacman -Sy && sudo abs | Update and refresh the local package and ABS databases against repositories |
+| pacupd | sudo pacman -Sy && sudo aur | Update and refresh the local package and AUR databases against repositories |
+| pacupd | sudo pacman -Sy | Update and refresh the local package database against repositories |
+| pacupg | sudo pacman -Syu | Synchronize with repositories before upgrading packages that are out of date on the local system. |
+| yaconf | yaourt -C | Fix all configuration files with vimdiff |
+| yain | yaourt -S | Install specific package(s) from the repositories |
+| yains | yaourt -U | Install specific package not from the repositories but from a file |
+| yainsd | yaourt -S --asdeps | Install given package(s) as dependencies of another package |
+| yaloc | yaourt -Qi | Display information about a given package in the local database |
+| yalocs | yaourt -Qs | Search for package(s) in the local database |
+| yalst | yaourt -Qe | List installed packages, even those installed from AUR (they're tagged as "local") |
+| yamir | yaourt -Syy | Force refresh of all package lists after updating /etc/pacman.d/mirrorlist |
+| yaorph | yaourt -Qtd | Remove orphans using yaourt |
+| yare | yaourt -R | Remove the specified package(s), retaining its configuration(s) and required dependencies |
+| yarem | yaourt -Rns | Remove the specified package(s), its configuration(s) and unneeded dependencies |
+| yarep | yaourt -Si | Display information about a given package in the repositories |
+| yareps | yaourt -Ss | Search for package(s) in the repositories |
+| yasu | yaourt --sucre | Same as yaupg, but without confirmation |
+| yaupd | yaourt -Sy && sudo abs && sudo aur | Update and refresh the local package, ABS and AUR databases against repositories |
+| yaupd | yaourt -Sy && sudo abs | Update and refresh the local package and ABS databases against repositories |
+| yaupd | yaourt -Sy && sudo aur | Update and refresh the local package and AUR databases against repositories |
+| yaupd | yaourt -Sy | Update and refresh the local package database against repositories |
+| yaupg | yaourt -Syua | Synchronize with repositories before upgrading packages (AUR packages too) that are out of date on the local system |
+
+| Function | Description |
+|----------------|:------------------------------------------------------------------------------------------------------------------|
+| pacdisowned | List all disowned files in your system |
+| paclist | List all installed packages with a short description - [Source](https://bbs.archlinux.org/viewtopic.php?id=93683) |
+| pacmanallkeys | Get all keys for developers and trusted users |
+| pacmansignkeys | |
+
+---
+
+### CONTRIBUTORS
+ - Benjamin Boudreau - dreurmail@gmail.com
+ - Celso Miranda - contacto@celsomiranda.net
+ - KhasMek - Boushh@gmail.com
+ - Martin Putniorz - mputniorz@gmail.com
+ - MatthR3D - matthr3d@gmail.com
+ - ornicar - thibault.duplessis@gmail.com
+
+---
diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh
index 059884c27..99de5b936 100644
--- a/plugins/archlinux/archlinux.plugin.zsh
+++ b/plugins/archlinux/archlinux.plugin.zsh
@@ -2,7 +2,7 @@
# Usage is also described at https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins
# Look for yaourt, and add some useful functions if we have it.
-if [[ -x `which yaourt` ]]; then
+if (( $+commands[yaourt] )); then
upgrade () {
yaourt -Syu
}
@@ -21,11 +21,11 @@ if [[ -x `which yaourt` ]]; then
alias yalst='yaourt -Qe' # List installed packages, even those installed from AUR (they're tagged as "local")
alias yaorph='yaourt -Qtd' # Remove orphans using yaourt
# Additional yaourt alias examples
- if [[ -x `which abs` && -x `which aur` ]]; then
+ if (( $+commands[abs] && $+commands[aur] )); then
alias yaupd='yaourt -Sy && sudo abs && sudo aur' # Update and refresh the local package, ABS and AUR databases against repositories
- elif [[ -x `which abs` ]]; then
+ elif (( $+commands[abs] )); then
alias yaupd='yaourt -Sy && sudo abs' # Update and refresh the local package and ABS databases against repositories
- elif [[ -x `which aur` ]]; then
+ elif (( $+commands[aur] )); then
alias yaupd='yaourt -Sy && sudo aur' # Update and refresh the local package and AUR databases against repositories
else
alias yaupd='yaourt -Sy' # Update and refresh the local package database against repositories
@@ -49,11 +49,11 @@ alias pacreps='pacman -Ss' # Search for package(s) in the repositori
alias pacloc='pacman -Qi' # Display information about a given package in the local database
alias paclocs='pacman -Qs' # Search for package(s) in the local database
# Additional pacman alias examples
-if [[ -x `which abs` && -x `which aur` ]]; then
+if (( $+commands[abs] && $+commands[aur] )); then
alias pacupd='sudo pacman -Sy && sudo abs && sudo aur' # Update and refresh the local package, ABS and AUR databases against repositories
-elif [[ -x `which abs` ]]; then
+elif (( $+commands[abs] )); then
alias pacupd='sudo pacman -Sy && sudo abs' # Update and refresh the local package and ABS databases against repositories
-elif [[ -x `which aur` ]]; then
+elif (( $+commands[aur] )); then
alias pacupd='sudo pacman -Sy && sudo aur' # Update and refresh the local package and AUR databases against repositories
else
alias pacupd='sudo pacman -Sy' # Update and refresh the local package database against repositories
@@ -63,7 +63,7 @@ alias pacmir='sudo pacman -Syy' # Force refresh of all package li
# https://bbs.archlinux.org/viewtopic.php?id=93683
paclist() {
- 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}'
+ 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}'
}
alias paclsorphans='sudo pacman -Qdt'
diff --git a/plugins/atom/atom.plugin.zsh b/plugins/atom/atom.plugin.zsh
deleted file mode 100644
index 9adb9031a..000000000
--- a/plugins/atom/atom.plugin.zsh
+++ /dev/null
@@ -1,14 +0,0 @@
-local _atom_paths > /dev/null 2>&1
-_atom_paths=(
- "$HOME/Applications/Atom.app"
- "/Applications/Atom.app"
-)
-
-for _atom_path in $_atom_paths; do
- if [[ -a $_atom_path ]]; then
- alias at="open -a '$_atom_path'"
- break
- fi
-done
-
-alias att='at .'
diff --git a/plugins/autoenv/autoenv.plugin.zsh b/plugins/autoenv/autoenv.plugin.zsh
index a8271849e..ea2e56dd6 100644
--- a/plugins/autoenv/autoenv.plugin.zsh
+++ b/plugins/autoenv/autoenv.plugin.zsh
@@ -1,12 +1,26 @@
# Activates autoenv or reports its failure
-if ! source $HOME/.autoenv/activate.sh 2>/dev/null; then
- echo '-------- AUTOENV ---------'
- echo 'Could not find ~/.autoenv/activate.sh.'
- echo 'Please check if autoenv is correctly installed.'
- echo 'In the meantime the autoenv plugin is DISABLED.'
- echo '--------------------------'
- return 1
+() {
+if ! type autoenv_init >/dev/null; then
+ for d (~/.autoenv /usr/local/opt/autoenv); do
+ if [[ -e $d/activate.sh ]]; then
+ autoenv_dir=$d
+ break
+ fi
+ done
+ if [[ -z $autoenv_dir ]]; then
+ cat <<END >&2
+-------- AUTOENV ---------
+Could not locate autoenv installation.
+Please check if autoenv is correctly installed.
+In the meantime the autoenv plugin is DISABLED.
+--------------------------
+END
+ return 1
+ fi
+ source $autoenv_dir/activate.sh
fi
+}
+[[ $? != 0 ]] && return $?
# The use_env call below is a reusable command to activate/create a new Python
# virtualenv, requiring only a single declarative line of code in your .env files.
diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh
index 4cf036401..c05c699e1 100644
--- a/plugins/autojump/autojump.plugin.zsh
+++ b/plugins/autojump/autojump.plugin.zsh
@@ -15,7 +15,7 @@ if [ $commands[autojump] ]; then # check if autojump is installed
. /usr/local/share/autojump/autojump.zsh
elif [ -f /opt/local/etc/profile.d/autojump.zsh ]; then # mac os x with ports
. /opt/local/etc/profile.d/autojump.zsh
- elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump.zsh ]; then # mac os x with brew
- . `brew --prefix`/etc/autojump.zsh
+ elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump.sh ]; then # mac os x with brew
+ . `brew --prefix`/etc/autojump.sh
fi
fi
diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh
index 0ae18dd56..d31052f83 100644
--- a/plugins/aws/aws.plugin.zsh
+++ b/plugins/aws/aws.plugin.zsh
@@ -11,10 +11,16 @@ export AWS_HOME=~/.aws
function agp {
echo $AWS_DEFAULT_PROFILE
}
+
function asp {
+ local rprompt=${RPROMPT/<aws:$(agp)>/}
+
export AWS_DEFAULT_PROFILE=$1
- export RPROMPT="<aws:$AWS_DEFAULT_PROFILE>"
+ export AWS_PROFILE=$1
+
+ export RPROMPT="<aws:$AWS_DEFAULT_PROFILE>$rprompt"
}
+
function aws_profiles {
reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_-]*\).*/\1/'))
}
@@ -22,7 +28,7 @@ function aws_profiles {
compctl -K aws_profiles asp
if _homebrew-installed && _awscli-homebrew-installed ; then
- _aws_zsh_completer_path=$(brew --prefix)/opt/awscli/libexec/bin/aws_zsh_completer.sh
+ _aws_zsh_completer_path=$(brew --prefix awscli)/libexec/bin/aws_zsh_completer.sh
else
_aws_zsh_completer_path=$(which aws_zsh_completer.sh)
fi
diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh
index 14ca4c817..459f5214e 100755
--- a/plugins/bgnotify/bgnotify.plugin.zsh
+++ b/plugins/bgnotify/bgnotify.plugin.zsh
@@ -11,31 +11,38 @@ autoload -Uz add-zsh-hook || { print "can't add zsh hook!"; return }
## definitions ##
-if ! (type bgnotify_formatted | grep -q 'function'); then
- function bgnotify_formatted {
- ## exit_status, command, elapsed_time
- [ $1 -eq 0 ] && title="#win (took $3 s)" || title="#fail (took $3 s)"
- bgnotify "$title" "$2"
+if ! (type bgnotify_formatted | grep -q 'function'); then ## allow custom function override
+ function bgnotify_formatted { ## args: (exit_status, command, elapsed_seconds)
+ elapsed="$(( $3 % 60 ))s"
+ (( $3 >= 60 )) && elapsed="$((( $3 % 3600) / 60 ))m $elapsed"
+ (( $3 >= 3600 )) && elapsed="$(( $3 / 3600 ))h $elapsed"
+ [ $1 -eq 0 ] && bgnotify "#win (took $elapsed)" "$2" || bgnotify "#fail (took $elapsed)" "$2"
}
fi
currentWindowId () {
if hash osascript 2>/dev/null; then #osx
osascript -e 'tell application (path to frontmost application as text) to id of front window' 2&> /dev/null || echo "0"
- elif hash notify-send 2>/dev/null; then #ubuntu!
- xprop -root | awk '/NET_ACTIVE_WINDOW/ { print $5; exit }'
+ elif (hash notify-send 2>/dev/null || hash kdialog 2>/dev/null); then #ubuntu!
+ xprop -root 2> /dev/null | awk '/NET_ACTIVE_WINDOW/{print $5;exit} END{exit !$5}' || echo "0"
else
echo $EPOCHSECONDS #fallback for windows
fi
}
-bgnotify () {
+bgnotify () { ## args: (title, subtitle)
if hash terminal-notifier 2>/dev/null; then #osx
- terminal-notifier -message "$2" -title "$1"
+ [[ "$TERM_PROGRAM" == 'iTerm.app' ]] && term_id='com.googlecode.iterm2';
+ [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]] && term_id='com.apple.terminal';
+ ## now call terminal-notifier, (hopefully with $term_id!)
+ [ -z "$term_id" ] && terminal-notifier -message "$2" -title "$1" >/dev/null ||
+ terminal-notifier -message "$2" -title "$1" -activate "$term_id" -sender "$term_id" >/dev/null
elif hash growlnotify 2>/dev/null; then #osx growl
- growlnotify -m $1 $2
- elif hash notify-send 2>/dev/null; then #ubuntu!
- notify-send $1 $2
+ growlnotify -m "$1" "$2"
+ elif hash notify-send 2>/dev/null; then #ubuntu gnome!
+ notify-send "$1" "$2"
+ elif hash kdialog 2>/dev/null; then #ubuntu kde!
+ kdialog -title "$1" --passivepopup "$2" 5
elif hash notifu 2>/dev/null; then #cygwyn support!
notifu /m "$2" /p "$1"
fi
@@ -46,7 +53,7 @@ bgnotify () {
bgnotify_begin() {
bgnotify_timestamp=$EPOCHSECONDS
- bgnotify_lastcmd=$1
+ bgnotify_lastcmd="$1"
bgnotify_windowid=$(currentWindowId)
}
@@ -63,5 +70,8 @@ bgnotify_end() {
bgnotify_timestamp=0 #reset it to 0!
}
-add-zsh-hook preexec bgnotify_begin
-add-zsh-hook precmd bgnotify_end
+## only enable if a local (non-ssh) connection
+if [ -z "$SSH_CLIENT" ] && [ -z "$SSH_TTY" ]; then
+ add-zsh-hook preexec bgnotify_begin
+ add-zsh-hook precmd bgnotify_end
+fi
diff --git a/plugins/boot2docker/README.md b/plugins/boot2docker/README.md
new file mode 100644
index 000000000..9551e2351
--- /dev/null
+++ b/plugins/boot2docker/README.md
@@ -0,0 +1,6 @@
+## Boot2docker autocomplete plugin
+
+- Adds autocomplete options for all boot2docker commands.
+
+
+Maintainer : Manfred Touron ([@moul](https://github.com/moul))
diff --git a/plugins/boot2docker/_boot2docker b/plugins/boot2docker/_boot2docker
new file mode 100644
index 000000000..3116bd14c
--- /dev/null
+++ b/plugins/boot2docker/_boot2docker
@@ -0,0 +1,73 @@
+#compdef boot2docker
+
+# Boot2docker autocompletion for oh-my-zsh
+# Requires: Boot2docker installed
+# Author: Manfred Touron (@moul)
+
+local -a _1st_arguments
+_1st_arguments=(
+ "init":"Create a new Boot2Docker VM."
+ "up":"Start VM from any states."
+ "start":"Start VM from any states."
+ "boot":"Start VM from any states."
+ "ssh":"[ssh-command] Login to VM via SSH."
+ "save":"Suspend VM and save state to disk."
+ "suspend":"Suspend VM and save state to disk."
+ "down":"Gracefully shutdown the VM."
+ "stop":"Gracefully shutdown the VM."
+ "halt":"Gracefully shutdown the VM."
+ "restart":"Gracefully reboot the VM."
+ "poweroff":"Forcefully power off the VM (may corrupt disk image)."
+ "reset":"Forcefully power cycle the VM (may corrupt disk image)."
+ "delete":"Delete Boot2Docker VM and its disk image."
+ "destroy":"Delete Boot2Docker VM and its disk image."
+ "config":"Show selected profile file settings."
+ "cfg":"Show selected profile file settings."
+ "info":"Display detailed information of VM."
+ "ip":"Display the IP address of the VM's Host-only network."
+ "socket":"Display the DOCKER_HOST socket to connect to."
+ "shellinit":"Display the shell command to set up the Docker client."
+ "status":"Display current state of VM."
+ "download":"Download Boot2Docker ISO image."
+ "upgrade":"Upgrade the Boot2Docker ISO image (restart if running)."
+ "version":"Display version information."
+)
+
+_arguments \
+ '(--basevmdk)--basevmdk[Path to VMDK to use as base for persistent partition]' \
+ '(--cpus)'{-c,--cpus}'[number of CPUs for boot2docker.]' \
+ '(--clobber)--clobber[overwrite Docker client binary on boot2docker upgrade]' \
+ '(--dhcp)--dhcp[enable VirtualBox host-only network DHCP.]' \
+ '(--dhcpip)--dhcpip[VirtualBox host-only network DHCP server address.]' \
+ '(-s --disksize)'{-s,--disksize}'[boot2docker disk image size (in MB).]' \
+ '(--dockerport)--dockerport[host Docker port (forward to port 2376 in VM). (deprecated - use with care)]' \
+ '(--driver)--driver[hypervisor driver.]' \
+ '(--force-upgrade-download)--force-upgrade-download[always download on boot2docker upgrade, never skip.]' \
+ '(--hostip)--hostip[VirtualBox host-only network IP address.]' \
+ '(--iso)--iso[path to boot2docker ISO image.]' \
+ '(--iso-url)--iso-url[/api.github.com/repos/boot2docker/boot2docker/releases": source URL to provision the boot2docker ISO image.]' \
+ '(--lowerip)--lowerip[VirtualBox host-only network DHCP lower bound.]' \
+ '(--memory)'{-m,--memory}'[virtual machine memory size (in MB).]' \
+ '(--netmask)--netmask[VirtualBox host-only network mask.]' \
+ '(--no-dummy)--no-dummy[Example parameter for the dummy driver.]' \
+ '(--retries)--retries[number of port knocking retries during 'start']' \
+ '(--serial)--serial[try serial console to get IP address (experimental)]' \
+ '(--serialfile)--serialfile[path to the serial socket/pipe.]' \
+ '(--ssh)--ssh[path to SSH client utility.]' \
+ '(--ssh-keygen)--ssh-keygen[path to ssh-keygen utility.]' \
+ '(--sshkey)--sshkey[path to SSH key to use.]' \
+ '(--sshport)--sshport[host SSH port (forward to port 22 in VM).]' \
+ '(--upperip)--upperip[VirtualBox host-only network DHCP upper bound.]' \
+ '(--vbm)--vbm[path to VirtualBox management utility.]' \
+ '(--vbox-share)--vbox-share[(defaults to "/Users=Users" if no shares are specified; use "disable" to explicitly prevent any shares from being created) List of directories to share during "up|start|boot" via VirtualBox Guest Additions, with optional labels]' \
+ '(--verbose)'{-v,--verbose}'[display verbose command invocations.]' \
+ '(--vm)--vm[virtual machine name.]' \
+ '(--waittime)--waittime[Time in milliseconds to wait between port knocking retries during 'start']' \
+ '*:: :->subcmds' && return 0
+
+#_arguments '*:: :->command'
+
+if (( CURRENT == 1 )); then
+ _describe -t commands "boot2docker command" _1st_arguments
+ return
+fi
diff --git a/plugins/branch/README.md b/plugins/branch/README.md
new file mode 100644
index 000000000..56ab8da4b
--- /dev/null
+++ b/plugins/branch/README.md
@@ -0,0 +1,33 @@
+# Branch
+
+Displays the current Git or Mercurial branch fast.
+
+## Speed test
+
+### Mercurial
+
+```shell
+$ time hg branch
+0.11s user 0.14s system 70% cpu 0.355 total
+```
+
+### Branch plugin
+
+```shell
+$ time zsh /tmp/branch_prompt_info_test.zsh
+0.00s user 0.01s system 78% cpu 0.014 total
+```
+
+## Usage
+
+Edit your theme file (eg.: `~/.oh-my-zsh/theme/robbyrussell.zsh-theme`)
+adding `$(branch_prompt_info)` in your prompt like this:
+
+```diff
+- PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
++ PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)$(branch_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
+```
+
+## Maintainer
+
+Victor Torres (<vpaivatorres@gmail.com>)
diff --git a/plugins/branch/branch.plugin.zsh b/plugins/branch/branch.plugin.zsh
new file mode 100644
index 000000000..a1e9ca31b
--- /dev/null
+++ b/plugins/branch/branch.plugin.zsh
@@ -0,0 +1,26 @@
+# Branch: displays the current Git or Mercurial branch fast.
+# Victor Torres <vpaivatorres@gmail.com>
+# Oct 2, 2015
+
+function branch_prompt_info() {
+ # Defines path as current directory
+ local current_dir=$PWD
+ # While current path is not root path
+ while [[ $current_dir != '/' ]]
+ do
+ # Git repository
+ if [[ -d "${current_dir}/.git" ]]
+ then
+ echo '±' ${"$(<"$current_dir/.git/HEAD")"##*/}
+ return;
+ fi
+ # Mercurial repository
+ if [[ -d "${current_dir}/.hg" ]]
+ then
+ echo '☿' $(<"$current_dir/.hg/branch")
+ return;
+ fi
+ # Defines path as parent directory and keeps looking for :)
+ current_dir="${current_dir:h}"
+ done
+}
diff --git a/plugins/brew/_brew b/plugins/brew/_brew
index d11aa245d..1f24bd67b 100644
--- a/plugins/brew/_brew
+++ b/plugins/brew/_brew
@@ -1,7 +1,13 @@
#compdef brew
#autoload
-# imported from the latest homebrew contributions
+# imported from https://github.com/Homebrew/homebrew/blob/29f73d2212c2b202fe25f69dcbf440d8391fa4c9/Library/Contributions/brew_zsh_completion.zsh
+
+# Brew ZSH completion function
+# Drop this somewhere in your $fpath (like /usr/share/zsh/site-functions)
+# and rename it _brew
+#
+# altered from _fink
_brew_all_formulae() {
formulae=(`brew search`)
@@ -15,6 +21,14 @@ _brew_installed_taps() {
installed_taps=(`brew tap`)
}
+_brew_official_taps() {
+ official_taps=(`brew tap --list-official`)
+}
+
+_brew_pinned_taps() {
+ pinned_taps=(`brew tap --list-pinned`)
+}
+
_brew_outdated_formulae() {
outdated_formulae=(`brew outdated`)
}
@@ -25,8 +39,10 @@ _1st_arguments=(
'cat:display formula file for a formula'
'cleanup:uninstall unused and old versions of packages'
'commands:show a list of commands'
+ 'config:show homebrew and system configuration'
'create:create a new formula'
- 'deps:list dependencies of a formula'
+ 'deps:list dependencies and dependants of a formula'
+ 'desc:display a description of a formula'
'doctor:audits your installation for common issues'
'edit:edit a formula'
'fetch:download formula resources to the cache'
@@ -35,41 +51,47 @@ _1st_arguments=(
'info:information about a formula'
'install:install a formula'
'reinstall:install a formula anew; re-using its current options'
+ 'leaves:show installed formulae that are not dependencies of another installed formula'
'link:link a formula'
+ 'linkapps:symlink .app bundles provided by formulae into /Applications'
'list:list files in a formula or not-installed formulae'
'log:git commit log for a formula'
'missing:check all installed formuale for missing dependencies.'
+ 'migrate:migrate renamed formula to new name'
'outdated:list formulae for which a newer version is available'
'pin:pin specified formulae'
'postinstall:perform post_install for a given formula'
'prune:remove dead links'
'remove:remove a formula'
'search:search for a formula (/regex/ or string)'
- 'switch:switch linkage between installed versions of a formula'
+ 'switch:switch between different versions of a formula'
'tap:tap a new formula repository from GitHub, or list existing taps'
+ 'tap-info:information about a tap'
+ 'tap-pin:pin a tap'
+ 'tap-unpin:unpin a tap'
'test-bot:test a formula and build a bottle'
'uninstall:uninstall a formula'
'unlink:unlink a formula'
+ 'unlinkapps:remove symlinked .app bundles provided by formulae from /Applications'
'unpin:unpin specified formulae'
'untap:remove a tapped repository'
- 'update:pull latest repository'
+ 'update:fetch latest version of Homebrew and all formulae'
'upgrade:upgrade outdated formulae'
'uses:show formulae which depend on a formula'
+ `brew commands --quiet --include-aliases`
)
local expl
-local -a formulae installed_formulae installed_taps outdated_formulae
+local -a formulae installed_formulae installed_taps official_taps outdated_formulae
_arguments \
'(-v)-v[verbose]' \
'(--cellar)--cellar[brew cellar]' \
- '(--config)--config[brew configuration]' \
'(--env)--env[brew environment]' \
'(--repository)--repository[brew repository]' \
'(--version)--version[version information]' \
'(--prefix)--prefix[where brew lives on this system]' \
'(--cache)--cache[brew cache]' \
- '(--force)--force[brew force]' \
'*:: :->subcmds' && return 0
if (( CURRENT == 1 )); then
@@ -78,9 +100,18 @@ if (( CURRENT == 1 )); then
fi
case "$words[1]" in
- install|reinstall|audit|home|homepage|log|info|abv|uses|cat|deps|edit|options)
+ install|reinstall|audit|home|homepage|log|info|abv|uses|cat|deps|desc|edit|options|switch)
_brew_all_formulae
_wanted formulae expl 'all formulae' compadd -a formulae ;;
+ linkapps|unlinkapps)
+ _arguments \
+ '(--local)--local[operate on ~/Applications instead of /Applications]' \
+ '1: :->forms' && return 0
+
+ if [[ "$state" == forms ]]; then
+ _brew_installed_formulae
+ _wanted installed_formulae expl 'installed formulae' compadd -a installed_formulae
+ fi ;;
list|ls)
_arguments \
'(--unbrewed)--unbrewed[files in brew --prefix not controlled by brew]' \
@@ -99,9 +130,15 @@ case "$words[1]" in
_arguments \
'(--macports)--macports[search the macports repository]' \
'(--fink)--fink[search the fink repository]' ;;
- untap)
+ untap|tap-info|tap-pin)
_brew_installed_taps
- _wanted installed_taps expl 'installed taps' compadd -a installed_taps ;;
+ _wanted installed_taps expl 'installed taps' compadd -a installed_taps ;;
+ tap)
+ _brew_official_taps
+ _wanted official_taps expl 'official taps' compadd -a official_taps ;;
+ tap-unpin)
+ _brew_pinned_taps
+ _wanted pinned_taps expl 'pinned taps' compadd -a pinned_taps ;;
upgrade)
_brew_outdated_formulae
_wanted outdated_formulae expl 'outdated formulae' compadd -a outdated_formulae ;;
diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh
index 42fb80c9a..5b5847328 100644
--- a/plugins/brew/brew.plugin.zsh
+++ b/plugins/brew/brew.plugin.zsh
@@ -1,2 +1,4 @@
alias brews='brew list -1'
-alias bubu="brew update && brew upgrade && brew cleanup"
+alias bubo='brew update && brew outdated'
+alias bubc='brew upgrade && brew cleanup'
+alias bubu='bubo && bubc'
diff --git a/plugins/bundler/README.md b/plugins/bundler/README.md
index 56f0c7176..04d551447 100644
--- a/plugins/bundler/README.md
+++ b/plugins/bundler/README.md
@@ -6,6 +6,7 @@
- `bl` aliased to `bundle list`
- `bp` aliased to `bundle package`
- `bo` aliased to `bundle open`
+ - `bout` aliased to `bundle outdated`
- `bu` aliased to `bundle update`
- `bi` aliased to `bundle install --jobs=<cpu core count>` (only for bundler `>= 1.4.0`)
- adds a wrapper for common gems:
@@ -39,7 +40,7 @@ This will exclude the `foreman` and `spin` gems (i.e. their executable) from bei
## Excluded gems
-These gems should not be called with `bundle exec`. Please see the Issues on GitHub for clarification.
+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.
`berks`
`foreman`
diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh
index ba3d3f623..382a1a471 100644
--- a/plugins/bundler/bundler.plugin.zsh
+++ b/plugins/bundler/bundler.plugin.zsh
@@ -2,8 +2,10 @@ alias be="bundle exec"
alias bl="bundle list"
alias bp="bundle package"
alias bo="bundle open"
+alias bout="bundle outdated"
alias bu="bundle update"
alias bi="bundle_install"
+alias bcn="bundle clean"
bundled_commands=(
annotate
diff --git a/plugins/cakephp3/cakephp3.plugin.zsh b/plugins/cakephp3/cakephp3.plugin.zsh
new file mode 100644
index 000000000..28d5af2ea
--- /dev/null
+++ b/plugins/cakephp3/cakephp3.plugin.zsh
@@ -0,0 +1,19 @@
+# CakePHP 3 basic command completion
+_cakephp3_get_command_list () {
+ cakephp3commands=($(bin/cake completion commands));printf "%s\n" "${cakephp3commands[@]}"
+}
+
+_cakephp3 () {
+ if [ -f bin/cake ]; then
+ compadd `_cakephp3_get_command_list`
+ fi
+}
+
+compdef _cakephp3 bin/cake
+compdef _cakephp3 cake
+
+#Alias
+alias c3='bin/cake'
+
+alias c3cache='bin/cake orm_cache clear'
+alias c3migrate='bin/cake migrations migrate'
diff --git a/plugins/capistrano/_capistrano b/plugins/capistrano/_capistrano
index 3cadf3d54..a79e47b2f 100644
--- a/plugins/capistrano/_capistrano
+++ b/plugins/capistrano/_capistrano
@@ -1,10 +1,49 @@
-#compdef cap
+#compdef capit
#autoload
-if [[ -f config/deploy.rb || -f Capfile ]]; then
- if [[ ! -f .cap_tasks~ || config/deploy.rb -nt .cap_tasks~ ]]; then
- echo "\nGenerating .cap_tasks~..." > /dev/stderr
- cap -v --tasks | grep '#' | cut -d " " -f 2 > .cap_tasks~
+# Added `capit` because `cap` is a reserved word. `cap` completion doesn't work.
+# http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcap-Module
+
+local curcontext="$curcontext" state line ret=1
+local -a _configs
+
+_arguments -C \
+ '1: :->cmds' \
+ '2:: :->args' && ret=0
+
+_cap_tasks() {
+ if [[ -f config/deploy.rb || -f Capfile ]]; then
+ if [[ ! -f .cap_tasks~ ]]; then
+ capit --tasks | sed 's/\(\[\)\(.*\)\(\]\)/\2:/' | awk '{command=$2; $1=$2=$3=""; gsub(/^[ \t\r\n]+/, "", $0); gsub(":", "\\:", command); print command"["$0"]"}' > .cap_tasks~
+ fi
+
+ OLD_IFS=$IFS
+ IFS=$'\n'
+ _values 'cap commands' $(< .cap_tasks~)
+ IFS=$OLD_IFS
+ # zmodload zsh/mapfile
+ # _values ${(f)mapfile[.cap_tasks~]}
fi
- compadd `cat .cap_tasks~`
-fi
+}
+
+_cap_stages() {
+ compadd $(find config/deploy -name \*.rb | cut -d/ -f3 | sed s:.rb::g)
+}
+
+case $state in
+ cmds)
+ # check if it uses multistage
+ if [[ -d config/deploy ]]; then
+ _cap_stages
+ else
+ _cap_tasks
+ fi
+ ret=0
+ ;;
+ args)
+ _cap_tasks
+ ret=0
+ ;;
+esac
+
+return ret
diff --git a/plugins/capistrano/capistrano.plugin.zsh b/plugins/capistrano/capistrano.plugin.zsh
new file mode 100644
index 000000000..0b5559791
--- /dev/null
+++ b/plugins/capistrano/capistrano.plugin.zsh
@@ -0,0 +1,11 @@
+# Added `shipit` because `cap` is a reserved word. `cap` completion doesn't work.
+# http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcap-Module
+
+func capit() {
+ if [ -f Gemfile ]
+ then
+ bundle exec cap $*
+ else
+ cap $*
+ fi
+}
diff --git a/plugins/chruby/chruby.plugin.zsh b/plugins/chruby/chruby.plugin.zsh
index b461b0c9b..758b4a56c 100644
--- a/plugins/chruby/chruby.plugin.zsh
+++ b/plugins/chruby/chruby.plugin.zsh
@@ -16,15 +16,12 @@
# rvm and rbenv plugins also provide this alias
alias rubies='chruby'
-local _chruby_path
-local _chruby_auto
-
_homebrew-installed() {
whence brew &> /dev/null
}
_chruby-from-homebrew-installed() {
- [ -r $(brew --prefix chruby)] &> /dev/null
+ [ -r $(brew --prefix chruby) ] &> /dev/null
}
_ruby-build_installed() {
@@ -42,14 +39,17 @@ if _ruby-build_installed; then
fi
_source_from_omz_settings() {
+ local _chruby_path
+ local _chruby_auto
+
zstyle -s :omz:plugins:chruby path _chruby_path
zstyle -s :omz:plugins:chruby auto _chruby_auto
- if ${_chruby_path} && [[ -r ${_chruby_path} ]]; then
+ if [[ -r ${_chruby_path} ]]; then
source ${_chruby_path}
fi
- if ${_chruby_auto} && [[ -r ${_chruby_auto} ]]; then
+ if [[ -r ${_chruby_auto} ]]; then
source ${_chruby_auto}
fi
}
diff --git a/plugins/chucknorris/chucknorris.plugin.zsh b/plugins/chucknorris/chucknorris.plugin.zsh
index 096364633..1dbb04ef0 100644
--- a/plugins/chucknorris/chucknorris.plugin.zsh
+++ b/plugins/chucknorris/chucknorris.plugin.zsh
@@ -1,6 +1,28 @@
-if [ ! -f $ZSH/plugins/chucknorris/fortunes/chucknorris.dat ]; then
- strfile $ZSH/plugins/chucknorris/fortunes/chucknorris $ZSH/plugins/chucknorris/fortunes/chucknorris.dat
+# chucknorris: Chuck Norris fortunes
+
+# Automatically generate or update Chuck's compiled fortune data file
+# $0 must be used outside a local function. This variable name is unlikly to collide.
+CHUCKNORRIS_PLUGIN_DIR=${0:h}
+
+() {
+local DIR=$CHUCKNORRIS_PLUGIN_DIR/fortunes
+if [[ ! -f $DIR/chucknorris.dat ]] || [[ $DIR/chucknorris.dat -ot $DIR/chucknorris ]]; then
+ # For some reason, Cygwin puts strfile in /usr/sbin, which is not on the path by default
+ local strfile=strfile
+ if ! which strfile &>/dev/null && [[ -f /usr/sbin/strfile ]]; then
+ strfile=/usr/sbin/strfile
+ fi
+ if which $strfile &> /dev/null; then
+ $strfile $DIR/chucknorris $DIR/chucknorris.dat >/dev/null
+ else
+ echo "[oh-my-zsh] chucknorris depends on strfile, which is not installed" >&2
+ echo "[oh-my-zsh] strfile is often provided as part of the 'fortune' package" >&2
+ fi
fi
-alias chuck="fortune -a $ZSH/plugins/chucknorris/fortunes"
+# Aliases
+alias chuck="fortune -a $DIR"
alias chuck_cow="chuck | cowthink"
+}
+
+unset CHUCKNORRIS_PLUGIN_DIR
diff --git a/plugins/chucknorris/fortunes/chucknorris b/plugins/chucknorris/fortunes/chucknorris
index b8edf9ac3..e705d1c13 100644
--- a/plugins/chucknorris/fortunes/chucknorris
+++ b/plugins/chucknorris/fortunes/chucknorris
@@ -17,9 +17,11 @@ Chuck Norris' blood type is AK+. Ass-Kicking Positive. It is compatible only wit
Chuck Norris is 1/8th Cherokee. This has nothing to do with ancestry, the man ate a fucking Indian.
%
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.
+%
There is no chin behind Chuck Norris' beard. There is only another fist.
%
Chuck Norris does not teabag the ladies. He potato-sacks them.
+%
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.
%
When Chuck Norris goes to donate blood, he declines the syringe, and instead requests a hand gun and a bucket.
@@ -127,6 +129,7 @@ Chuck Norris can drink an entire gallon of milk in thirty-seven seconds.
Little known medical fact: Chuck Norris invented the Caesarean section when he roundhouse-kicked his way out of his monther's womb.
%
Chuck Norris doesn't bowl strikes, he just knocks down one pin and the other nine faint.
+%
The show Survivor had the original premise of putting people on an island with Chuck Norris. There were no survivors, and nobody is brave enough to go to the island to retrieve the footage.
%
It takes Chuck Norris 20 minutes to watch 60 Minutes.
@@ -281,6 +284,7 @@ In a recent survey it was discovered the 94% of American women lost their virgin
Chuck Norris invented a language that incorporates karate and roundhouse kicks. So next time Chuck Norris is kicking your ass, don't be offended or hurt, he may be just trying to tell you he likes your hat.
%
If at first you don't succeed, you're not Chuck Norris.
+%
If Chuck Norris were a calendar, every month would be named Chucktober, and every day he'd kick your ass.
%
Fear is not the only emotion Chuck Norris can smell. He can also detect hope, as in "I hope I don't get a roundhouse kick from Chuck Norris."
@@ -349,7 +353,7 @@ As President Roosevelt said: "We have nothing to fear but fear itself. And Chuck
%
Chuck Norris just says "no" to drugs. If he said "yes", it would collapse Colombia's infrastructure.
%
-Since 1940, the year Chuck Norris was born, roundhouse-kick related deaths have increased 13,000 percent. 
+Since 1940, the year Chuck Norris was born, roundhouse-kick related deaths have increased 13,000 percent.?
%
Crime does not pay - unless you are an undertaker following Walker, Texas Ranger, on a routine patrol.
%
@@ -497,7 +501,8 @@ When Chuck Norris works out on the Total Gym, the Total Gym feels like it's been
%
Chuck Norris can skeletize a cow in two minutes.
%
-The only sure things are Death and Taxes?and when Chuck Norris goes to work for the IRS, they'll be the same thing.
+The only sure things are Death and Taxes, and when Chuck Norris goes to work for the IRS, they'll be the same thing.
+%
Chuck Norris' first job was as a paperboy. There were no survivors.
%
With the rising cost of gasoline, Chuck Norris is beginning to worry about his drinking habit.
@@ -528,8 +533,6 @@ Noah was the only man notified before Chuck Norris relieved himself in the Atlan
%
Chuck Norris once invited all of the other badasses from TV to duke it out in order to see who was the supreme badass. Only two showed up-- Jack Bauer and MacGyver.
%
-
-%
MacGyver immediately tried to make a bomb out of some Q-Tips and Gatorade, but Chuck Norris roundhouse-kicked him in the solar plexus. MacGyver promptly threw up his own heart.
%
Jack Bauer tried to use his detailed knowledge of torture techniques, but to no avail: Chuck Norris thrives on pain. Chuck Norris then ripped off Jack Bauer's arm and beat him to death with it. Game, set, match.
diff --git a/plugins/codeclimate/_codeclimate b/plugins/codeclimate/_codeclimate
new file mode 100644
index 000000000..fd2536a34
--- /dev/null
+++ b/plugins/codeclimate/_codeclimate
@@ -0,0 +1,82 @@
+#compdef codeclimate
+
+_codeclimate_all_engines() {
+ engines_all=(`codeclimate engines:list | tail -n +2 | gawk '{ print $2 }' | gawk -F: '{ print $1 }'`)
+}
+
+_codeclimate_installed_engines() {
+ _codeclimate_all_engines
+
+ engines_installed=()
+
+ if [ -e .codeclimate.yml ]
+ then
+ for engine in $engines_all
+ do
+ if grep -q $engine ".codeclimate.yml"
+ then
+ engines_installed+=$engine
+ fi
+ done
+ fi
+}
+
+_codeclimate_not_installed_engines() {
+ _codeclimate_all_engines
+
+ engines_not_installed=()
+
+ if [ -e .codeclimate.yml ]
+ then
+ for engine in $engines_all
+ do
+ if ! grep -q $engine ".codeclimate.yml"
+ then
+ engines_not_installed+=$engine
+ fi
+ done
+ fi
+}
+
+local curcontext="$curcontext" state line ret=1
+local expl
+local -a engines_all engines_installed engines_not_installed
+
+_arguments \
+ '1: :->cmds' \
+ '*:: :->args' && ret=0
+
+case $state in
+ cmds)
+ _values "bundle command" \
+ "analyze[Analyze all relevant files in the current working directory]" \
+ "console[Start an interactive session providing access to the classes within the CLI]" \
+ "engines\:disable[Prevents the engine from being used in this project]" \
+ "engines\:enable[This engine will be run the next time your project is analyzed]" \
+ "engines\:install[Compares the list of engines in your .codeclimate.yml file to those that are currently installed, then installs any missing engines]" \
+ "engines\:list[Lists all available engines in the Code Climate Docker Hub]" \
+ "engines\:remove[Removes an engine from your .codeclimate.yml file]" \
+ "help[Displays a list of commands that can be passed to the Code Climate CLI]" \
+ "init[Generates a new .codeclimate.yml file in the current working directory]" \
+ "validate-config[Validates the .codeclimate.yml file in the current working directory]" \
+ "version[Displays the current version of the Code Climate CLI]"
+ ret=0
+ ;;
+ args)
+ case $line[1] in
+ engines:enable)
+ _codeclimate_not_installed_engines
+ _wanted engines_not_installed expl 'not installed engines' compadd -a engines_not_installed ;;
+ engines:disable|engines:remove)
+ _codeclimate_installed_engines
+ _wanted engines_installed expl 'installed engines' compadd -a engines_installed ;;
+ analyze)
+ _arguments \
+ '-f:Output Format:(text json)'
+ ret=0
+ ;;
+ esac
+ ;;
+esac
+
+return ret
diff --git a/plugins/coffee/README.md b/plugins/coffee/README.md
new file mode 100644
index 000000000..432ce3414
--- /dev/null
+++ b/plugins/coffee/README.md
@@ -0,0 +1,31 @@
+## Coffeescript Plugin
+
+This plugin provides aliases for quickly compiling and previewing your
+cofeescript code.
+
+When writing Coffeescript it's very common to want to preview the output of a
+certain snippet of code, either because you want to test the output or because
+you'd like to execute it in a browser console which doesn't accept Coffeescript.
+
+Preview the compiled result of your coffeescript with `cf "code"` as per the
+following:
+
+```zsh
+$ cf 'if a then b else c'
+if (a) {
+ b;
+} else {
+ c;
+}
+```
+
+Also provides the following aliases:
+
+* **cfc:** Copies the compiled JS to your clipboard. Very useful when you want
+ to run the code in a JS console.
+
+* **cfp:** Compiles from your currently copied clipboard. Useful when you want
+ to compile large/multi-line snippets
+
+* **cfpc:** Paste coffeescript from clipboard, compile to JS, then copy the
+ the result back to clipboard.
diff --git a/plugins/coffee/coffee.plugin.zsh b/plugins/coffee/coffee.plugin.zsh
new file mode 100644
index 000000000..6d1ce5ce4
--- /dev/null
+++ b/plugins/coffee/coffee.plugin.zsh
@@ -0,0 +1,16 @@
+#!/bin/zsh
+
+# compile a string of coffeescript and print to output
+cf () {
+ coffee -peb "$1"
+}
+# compile & copy to clipboard
+cfc () {
+ cf "$1" | clipcopy
+}
+
+# compile from clipboard & print
+alias cfp='cf "$(clippaste)"'
+
+# compile from clipboard and copy to clipboard
+alias cfpc='cfp | clipcopy'
diff --git a/plugins/colored-man-pages/colored-man-pages.plugin.zsh b/plugins/colored-man-pages/colored-man-pages.plugin.zsh
new file mode 100644
index 000000000..54f0bdda9
--- /dev/null
+++ b/plugins/colored-man-pages/colored-man-pages.plugin.zsh
@@ -0,0 +1,32 @@
+if [[ "$OSTYPE" = solaris* ]]
+then
+ if [[ ! -x "$HOME/bin/nroff" ]]
+ then
+ mkdir -p "$HOME/bin"
+ cat > "$HOME/bin/nroff" <<EOF
+#!/bin/sh
+if [ -n "\$_NROFF_U" -a "\$1,\$2,\$3" = "-u0,-Tlp,-man" ]; then
+ shift
+ exec /usr/bin/nroff -u\$_NROFF_U "\$@"
+fi
+#-- Some other invocation of nroff
+exec /usr/bin/nroff "\$@"
+EOF
+ chmod +x "$HOME/bin/nroff"
+ fi
+fi
+
+man() {
+ env \
+ LESS_TERMCAP_mb=$(printf "\e[1;31m") \
+ LESS_TERMCAP_md=$(printf "\e[1;31m") \
+ LESS_TERMCAP_me=$(printf "\e[0m") \
+ LESS_TERMCAP_se=$(printf "\e[0m") \
+ LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
+ LESS_TERMCAP_ue=$(printf "\e[0m") \
+ LESS_TERMCAP_us=$(printf "\e[1;32m") \
+ PAGER="${commands[less]:-$PAGER}" \
+ _NROFF_U=1 \
+ PATH="$HOME/bin:$PATH" \
+ man "$@"
+}
diff --git a/plugins/colored-man/colored-man.plugin.zsh b/plugins/colored-man/colored-man.plugin.zsh
deleted file mode 100644
index 5c613f49d..000000000
--- a/plugins/colored-man/colored-man.plugin.zsh
+++ /dev/null
@@ -1,32 +0,0 @@
-if [ "$OSTYPE[0,7]" = "solaris" ]
-then
- if [ ! -x ${HOME}/bin/nroff ]
- then
- mkdir -p ${HOME}/bin
- cat > ${HOME}/bin/nroff <<EOF
-#!/bin/sh
-if [ -n "\$_NROFF_U" -a "\$1,\$2,\$3" = "-u0,-Tlp,-man" ]; then
- shift
- exec /usr/bin/nroff -u\${_NROFF_U} "\$@"
-fi
-#-- Some other invocation of nroff
-exec /usr/bin/nroff "\$@"
-EOF
- chmod +x ${HOME}/bin/nroff
- fi
-fi
-
-man() {
- env \
- LESS_TERMCAP_mb=$(printf "\e[1;31m") \
- LESS_TERMCAP_md=$(printf "\e[1;31m") \
- LESS_TERMCAP_me=$(printf "\e[0m") \
- LESS_TERMCAP_se=$(printf "\e[0m") \
- LESS_TERMCAP_so=$(printf "\e[1;44;33m") \
- LESS_TERMCAP_ue=$(printf "\e[0m") \
- LESS_TERMCAP_us=$(printf "\e[1;32m") \
- PAGER=/usr/bin/less \
- _NROFF_U=1 \
- PATH=${HOME}/bin:${PATH} \
- man "$@"
-}
diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh
index 797554a13..0e2f2133f 100644
--- a/plugins/command-not-found/command-not-found.plugin.zsh
+++ b/plugins/command-not-found/command-not-found.plugin.zsh
@@ -23,3 +23,11 @@ if [ -f /usr/libexec/pk-command-not-found ]; then
return $retval
}
fi
+
+# OSX command-not-found support
+# https://github.com/Homebrew/homebrew-command-not-found
+if type brew &> /dev/null; then
+ if brew command command-not-found-init > /dev/null 2>&1; then
+ eval "$(brew command-not-found-init)";
+ fi
+fi
diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh
index e3830adcf..c7aafd8b8 100644
--- a/plugins/common-aliases/common-aliases.plugin.zsh
+++ b/plugins/common-aliases/common-aliases.plugin.zsh
@@ -13,7 +13,7 @@ alias lS='ls -1FSsh'
alias lart='ls -1Fcart'
alias lrt='ls -1Fcrt'
-alias zshrc='vim ~/.zshrc' # Quick access to the ~/.zshrc file
+alias zshrc='$EDITOR ~/.zshrc' # Quick access to the ~/.zshrc file
alias grep='grep --color'
alias sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS} '
@@ -52,7 +52,7 @@ alias mv='mv -i'
# zsh is able to auto-do some kungfoo
# depends on the SUFFIX :)
-if [ ${ZSH_VERSION//\./} -ge 420 ]; then
+if is-at-least 4.2.0; then
# open browser on urls
_browser_fts=(htm html de org net com at cx nl se dk dk php)
for ft in $_browser_fts ; do alias -s $ft=$BROWSER ; done
diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh
index 86f5be3d0..07eb1de88 100644
--- a/plugins/composer/composer.plugin.zsh
+++ b/plugins/composer/composer.plugin.zsh
@@ -7,11 +7,11 @@
# Composer basic command completion
_composer_get_command_list () {
- $_comp_command1 --no-ansi | sed "1,/Available commands/d" | awk '/^[ \t]*[a-z]+/ { print $1 }'
+ $_comp_command1 --no-ansi 2>/dev/null | sed "1,/Available commands/d" | awk '/^[ \t]*[a-z]+/ { print $1 }'
}
_composer_get_required_list () {
- $_comp_command1 show -s --no-ansi | sed '1,/requires/d' | awk 'NF > 0 && !/^requires \(dev\)/{ print $1 }'
+ $_comp_command1 show -s --no-ansi 2>/dev/null | sed '1,/requires/d' | awk 'NF > 0 && !/^requires \(dev\)/{ print $1 }'
}
_composer () {
diff --git a/plugins/copydir/copydir.plugin.zsh b/plugins/copydir/copydir.plugin.zsh
index 37bb5e086..c45106240 100644
--- a/plugins/copydir/copydir.plugin.zsh
+++ b/plugins/copydir/copydir.plugin.zsh
@@ -1,3 +1,5 @@
+# Copies the pathname of the current directory to the system or X Windows clipboard
function copydir {
- pwd | tr -d "\r\n" | pbcopy
-} \ No newline at end of file
+ emulate -L zsh
+ print -n $PWD | clipcopy
+}
diff --git a/plugins/copyfile/copyfile.plugin.zsh b/plugins/copyfile/copyfile.plugin.zsh
index 944a903c6..f4eca5acf 100644
--- a/plugins/copyfile/copyfile.plugin.zsh
+++ b/plugins/copyfile/copyfile.plugin.zsh
@@ -1,5 +1,7 @@
+# Copies the contents of a given file to the system or X Windows clipboard
+#
+# copyfile <file>
function copyfile {
- [[ "$#" != 1 ]] && return 1
- local file_to_copy=$1
- cat $file_to_copy | pbcopy
+ emulate -L zsh
+ clipcopy $1
}
diff --git a/plugins/debian/debian.plugin.zsh b/plugins/debian/debian.plugin.zsh
index 6e45e0521..31a772d60 100644
--- a/plugins/debian/debian.plugin.zsh
+++ b/plugins/debian/debian.plugin.zsh
@@ -9,8 +9,10 @@
# You can just set apt_pref='apt-get' to override it.
if [[ -e $( which -p aptitude 2>&1 ) ]]; then
apt_pref='aptitude'
+ apt_upgr='safe-upgrade'
else
apt_pref='apt-get'
+ apt_upgr='upgrade'
fi
# Use sudo by default if it's installed
@@ -45,10 +47,10 @@ if [[ $use_sudo -eq 1 ]]; then
alias abd='sudo $apt_pref build-dep'
alias ac='sudo $apt_pref clean'
alias ad='sudo $apt_pref update'
- alias adg='sudo $apt_pref update && sudo $apt_pref upgrade'
+ alias adg='sudo $apt_pref update && sudo $apt_pref $apt_upgr'
alias adu='sudo $apt_pref update && sudo $apt_pref dist-upgrade'
alias afu='sudo apt-file update'
- alias ag='sudo $apt_pref upgrade'
+ alias ag='sudo $apt_pref $apt_upgr'
alias ai='sudo $apt_pref install'
# Install all packages given on the command line while using only the first word of each line:
# acs ... | ail
@@ -80,10 +82,10 @@ else
}
alias ac='su -ls \'$apt_pref clean\' root'
alias ad='su -lc \'$apt_pref update\' root'
- alias adg='su -lc \'$apt_pref update && aptitude safe-upgrade\' root'
+ alias adg='su -lc \'$apt_pref update && aptitude $apt_upgr\' root'
alias adu='su -lc \'$apt_pref update && aptitude dist-upgrade\' root'
alias afu='su -lc "apt-file update"'
- alias ag='su -lc \'$apt_pref safe-upgrade\' root'
+ alias ag='su -lc \'$apt_pref $apt_upgr\' root'
ai() {
cmd="su -lc 'aptitude -P install $@' root"
print "$cmd"
@@ -136,7 +138,7 @@ apt_pref_compdef abd "build-dep"
apt_pref_compdef ac "clean"
apt_pref_compdef ad "update"
apt_pref_compdef afu "update"
-apt_pref_compdef ag "upgrade"
+apt_pref_compdef ag "$apt_upgr"
apt_pref_compdef ai "install"
apt_pref_compdef ail "install"
apt_pref_compdef ap "purge"
diff --git a/plugins/dircycle/dircycle.plugin.zsh b/plugins/dircycle/dircycle.plugin.zsh
index 1e31105b1..8a406b54d 100644
--- a/plugins/dircycle/dircycle.plugin.zsh
+++ b/plugins/dircycle/dircycle.plugin.zsh
@@ -27,11 +27,11 @@ insert-cycledright () {
zle -N insert-cycledright
-# add key bindings for iTerm2
-if [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then
- bindkey "^[[1;6D" insert-cycledleft
- bindkey "^[[1;6C" insert-cycledright
-else
- bindkey "\e[1;6D" insert-cycledleft
- bindkey "\e[1;6C" insert-cycledright
-fi \ No newline at end of file
+# These sequences work for xterm, Apple Terminal.app, and probably others.
+# Not for rxvt-unicode, but it doesn't seem differentiate Ctrl-Shift-Arrow
+# from plain Shift-Arrow, at least by default.
+# iTerm2 does not have these key combinations defined by default; you will need
+# to add them under "Keys" in your profile if you want to use this. You can do
+# this conveniently by loading the "xterm with Numeric Keypad" preset.
+bindkey "\e[1;6D" insert-cycledleft
+bindkey "\e[1;6C" insert-cycledright
diff --git a/plugins/dirhistory/dirhistory.plugin.zsh b/plugins/dirhistory/dirhistory.plugin.zsh
index d101cfcae..0209981e3 100644
--- a/plugins/dirhistory/dirhistory.plugin.zsh
+++ b/plugins/dirhistory/dirhistory.plugin.zsh
@@ -49,7 +49,8 @@ function push_future() {
}
# Called by zsh when directory changes
-function chpwd() {
+chpwd_functions+=(chpwd_dirhistory)
+function chpwd_dirhistory() {
push_past $PWD
# If DIRHISTORY_CD is not set...
if [[ -z "${DIRHISTORY_CD+x}" ]]; then
diff --git a/plugins/dirpersist/dirpersist.plugin.zsh b/plugins/dirpersist/dirpersist.plugin.zsh
index 88d1129d4..616e2c3c6 100644
--- a/plugins/dirpersist/dirpersist.plugin.zsh
+++ b/plugins/dirpersist/dirpersist.plugin.zsh
@@ -11,7 +11,8 @@ if [[ -f ${dirstack_file} ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then
[[ -d $dirstack[1] ]] && cd $dirstack[1] && cd $OLDPWD
fi
-chpwd() {
+chpwd_functions+=(chpwd_dirpersist)
+chpwd_dirpersist() {
if (( $DIRSTACKSIZE <= 0 )) || [[ -z $dirstack_file ]]; then return; fi
local -ax my_stack
my_stack=( ${PWD} ${dirstack} )
diff --git a/plugins/dnf/README.md b/plugins/dnf/README.md
new file mode 100755
index 000000000..f9ef496fa
--- /dev/null
+++ b/plugins/dnf/README.md
@@ -0,0 +1,25 @@
+## Description
+
+This plugin makes `dnf` usage easier by adding aliases for the most
+common commands.
+
+`dnf` is the new package manager for RPM-based distributions, which
+replaces `yum`.
+
+## Aliases
+
+| Alias | Command | Description |
+|-------|-------------------------|--------------------------|
+| dnfl | `dnf list` | List packages |
+| dnfli | `dnf list installed` | List installed packages |
+| dnfgl | `dnf grouplist` | List package groups |
+| dnfmc | `dnf makecache` | Generate metadata cache |
+| dnfp | `dnf info` | Show package information |
+| dnfs | `dnf search` | Search package |
+| **Use `sudo`** |
+| dnfu | `sudo dnf upgrade` | Upgrade package |
+| dnfi | `sudo dnf install` | Install package |
+| dnfgi | `sudo dnf groupinstall` | Install package group |
+| dnfr | `sudo dnf remove` | Remove package |
+| dnfgr | `sudo dnf groupremove` | Remove package group |
+| dnfc | `sudo dnf clean all` | Clean cache |
diff --git a/plugins/dnf/dnf.plugin.zsh b/plugins/dnf/dnf.plugin.zsh
new file mode 100644
index 000000000..653ce7dda
--- /dev/null
+++ b/plugins/dnf/dnf.plugin.zsh
@@ -0,0 +1,15 @@
+## Aliases
+
+alias dnfl="dnf list" # List packages
+alias dnfli="dnf list installed" # List installed packages
+alias dnfgl="dnf grouplist" # List package groups
+alias dnfmc="dnf makecache" # Generate metadata cache
+alias dnfp="dnf info" # Show package information
+alias dnfs="dnf search" # Search package
+
+alias dnfu="sudo dnf upgrade" # Upgrade package
+alias dnfi="sudo dnf install" # Install package
+alias dnfgi="sudo dnf groupinstall" # Install package group
+alias dnfr="sudo dnf remove" # Remove package
+alias dnfgr="sudo dnf groupremove" # Remove package group
+alias dnfc="sudo dnf clean all" # Clean cache
diff --git a/plugins/docker-compose/README.md b/plugins/docker-compose/README.md
new file mode 100644
index 000000000..567b82148
--- /dev/null
+++ b/plugins/docker-compose/README.md
@@ -0,0 +1,5 @@
+# Docker-compose plugin for oh my zsh
+
+A copy of the completion script from the [docker-compose](1) git repo.
+
+[1]:[https://github.com/docker/compose/blob/master/contrib/completion/zsh/_docker-compose]
diff --git a/plugins/docker-compose/_docker-compose b/plugins/docker-compose/_docker-compose
new file mode 100644
index 000000000..19c06675a
--- /dev/null
+++ b/plugins/docker-compose/_docker-compose
@@ -0,0 +1,308 @@
+#compdef docker-compose
+
+# Description
+# -----------
+# zsh completion for docker-compose
+# https://github.com/sdurrheimer/docker-compose-zsh-completion
+# -------------------------------------------------------------------------
+# Version
+# -------
+# 0.1.0
+# -------------------------------------------------------------------------
+# Authors
+# -------
+# * Steve Durrheimer <s.durrheimer@gmail.com>
+# -------------------------------------------------------------------------
+# Inspiration
+# -----------
+# * @albers docker-compose bash completion script
+# * @felixr docker zsh completion script : https://github.com/felixr/docker-zsh-completion
+# -------------------------------------------------------------------------
+
+# For compatibility reasons, Compose and therefore its completion supports several
+# stack compositon files as listed here, in descending priority.
+# Support for these filenames might be dropped in some future version.
+__docker-compose_compose_file() {
+ local file
+ for file in docker-compose.y{,a}ml fig.y{,a}ml ; do
+ [ -e $file ] && {
+ echo $file
+ return
+ }
+ done
+ echo docker-compose.yml
+}
+
+# Extracts all service names from docker-compose.yml.
+___docker-compose_all_services_in_compose_file() {
+ local already_selected
+ local -a services
+ already_selected=$(echo ${words[@]} | tr " " "|")
+ awk -F: '/^[a-zA-Z0-9]/{print $1}' "${compose_file:-$(__docker-compose_compose_file)}" 2>/dev/null | grep -Ev "$already_selected"
+}
+
+# All services, even those without an existing container
+__docker-compose_services_all() {
+ services=$(___docker-compose_all_services_in_compose_file)
+ _alternative "args:services:($services)"
+}
+
+# All services that have an entry with the given key in their docker-compose.yml section
+___docker-compose_services_with_key() {
+ local already_selected
+ local -a buildable
+ already_selected=$(echo ${words[@]} | tr " " "|")
+ # flatten sections to one line, then filter lines containing the key and return section name.
+ 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"
+}
+
+# All services that are defined by a Dockerfile reference
+__docker-compose_services_from_build() {
+ buildable=$(___docker-compose_services_with_key build)
+ _alternative "args:buildable services:($buildable)"
+}
+
+# All services that are defined by an image
+__docker-compose_services_from_image() {
+ pullable=$(___docker-compose_services_with_key image)
+ _alternative "args:pullable services:($pullable)"
+}
+
+__docker-compose_get_services() {
+ local kind expl
+ declare -a running stopped lines args services
+
+ docker_status=$(docker ps > /dev/null 2>&1)
+ if [ $? -ne 0 ]; then
+ _message "Error! Docker is not running."
+ return 1
+ fi
+
+ kind=$1
+ shift
+ [[ $kind = (stopped|all) ]] && args=($args -a)
+
+ lines=(${(f)"$(_call_program commands docker ps ${args})"})
+ services=(${(f)"$(_call_program commands docker-compose 2>/dev/null ${compose_file:+-f $compose_file} ${compose_project:+-p $compose_project} ps -q)"})
+
+ # Parse header line to find columns
+ local i=1 j=1 k header=${lines[1]}
+ declare -A begin end
+ while (( $j < ${#header} - 1 )) {
+ i=$(( $j + ${${header[$j,-1]}[(i)[^ ]]} - 1))
+ j=$(( $i + ${${header[$i,-1]}[(i) ]} - 1))
+ k=$(( $j + ${${header[$j,-1]}[(i)[^ ]]} - 2))
+ begin[${header[$i,$(($j-1))]}]=$i
+ end[${header[$i,$(($j-1))]}]=$k
+ }
+ lines=(${lines[2,-1]})
+
+ # Container ID
+ local line s name
+ local -a names
+ for line in $lines; do
+ if [[ $services == *"${line[${begin[CONTAINER ID]},${end[CONTAINER ID]}]%% ##}"* ]]; then
+ names=(${(ps:,:)${${line[${begin[NAMES]},-1]}%% *}})
+ for name in $names; do
+ s="${${name%_*}#*_}:${(l:15:: :::)${${line[${begin[CREATED]},${end[CREATED]}]/ ago/}%% ##}}"
+ s="$s, ${line[${begin[CONTAINER ID]},${end[CONTAINER ID]}]%% ##}"
+ s="$s, ${${${line[$begin[IMAGE],$end[IMAGE]]}/:/\\:}%% ##}"
+ if [[ ${line[${begin[STATUS]},${end[STATUS]}]} = Exit* ]]; then
+ stopped=($stopped $s)
+ else
+ running=($running $s)
+ fi
+ done
+ fi
+ done
+
+ [[ $kind = (running|all) ]] && _describe -t services-running "running services" running
+ [[ $kind = (stopped|all) ]] && _describe -t services-stopped "stopped services" stopped
+}
+
+__docker-compose_stoppedservices() {
+ __docker-compose_get_services stopped "$@"
+}
+
+__docker-compose_runningservices() {
+ __docker-compose_get_services running "$@"
+}
+
+__docker-compose_services () {
+ __docker-compose_get_services all "$@"
+}
+
+__docker-compose_caching_policy() {
+ oldp=( "$1"(Nmh+1) ) # 1 hour
+ (( $#oldp ))
+}
+
+__docker-compose_commands () {
+ local cache_policy
+
+ zstyle -s ":completion:${curcontext}:" cache-policy cache_policy
+ if [[ -z "$cache_policy" ]]; then
+ zstyle ":completion:${curcontext}:" cache-policy __docker-compose_caching_policy
+ fi
+
+ if ( [[ ${+_docker_compose_subcommands} -eq 0 ]] || _cache_invalid docker_compose_subcommands) \
+ && ! _retrieve_cache docker_compose_subcommands;
+ then
+ local -a lines
+ lines=(${(f)"$(_call_program commands docker-compose 2>&1)"})
+ _docker_compose_subcommands=(${${${lines[$((${lines[(i)Commands:]} + 1)),${lines[(I) *]}]}## #}/ ##/:})
+ _store_cache docker_compose_subcommands _docker_compose_subcommands
+ fi
+ _describe -t docker-compose-commands "docker-compose command" _docker_compose_subcommands
+}
+
+__docker-compose_subcommand () {
+ local -a _command_args
+ integer ret=1
+ case "$words[1]" in
+ (build)
+ _arguments \
+ '--no-cache[Do not use cache when building the image]' \
+ '*:services:__docker-compose_services_from_build' && ret=0
+ ;;
+ (help)
+ _arguments ':subcommand:__docker-compose_commands' && ret=0
+ ;;
+ (kill)
+ _arguments \
+ '-s[SIGNAL to send to the container. Default signal is SIGKILL.]:signal:_signals' \
+ '*:running services:__docker-compose_runningservices' && ret=0
+ ;;
+ (logs)
+ _arguments \
+ '--no-color[Produce monochrome output.]' \
+ '*:services:__docker-compose_services_all' && ret=0
+ ;;
+ (migrate-to-labels)
+ _arguments \
+ '(-):Recreate containers to add labels' && ret=0
+ ;;
+ (port)
+ _arguments \
+ '--protocol=-[tcp or udap (defaults to tcp)]:protocol:(tcp udp)' \
+ '--index=-[index of the container if there are mutiple instances of a service (defaults to 1)]:index: ' \
+ '1:running services:__docker-compose_runningservices' \
+ '2:port:_ports' && ret=0
+ ;;
+ (ps)
+ _arguments \
+ '-q[Only display IDs]' \
+ '*:services:__docker-compose_services_all' && ret=0
+ ;;
+ (pull)
+ _arguments \
+ '--allow-insecure-ssl[Allow insecure connections to the docker registry]' \
+ '*:services:__docker-compose_services_from_image' && ret=0
+ ;;
+ (rm)
+ _arguments \
+ '(-f --force)'{-f,--force}"[Don't ask to confirm removal]" \
+ '-v[Remove volumes associated with containers]' \
+ '*:stopped services:__docker-compose_stoppedservices' && ret=0
+ ;;
+ (run)
+ _arguments \
+ '--allow-insecure-ssl[Allow insecure connections to the docker registry]' \
+ '-d[Detached mode: Run container in the background, print new container name.]' \
+ '--entrypoint[Overwrite the entrypoint of the image.]:entry point: ' \
+ '*-e[KEY=VAL Set an environment variable (can be used multiple times)]:environment variable KEY=VAL: ' \
+ '(-u --user)'{-u,--user=-}'[Run as specified username or uid]:username or uid:_users' \
+ "--no-deps[Don't start linked services.]" \
+ '--rm[Remove container after run. Ignored in detached mode.]' \
+ "--service-ports[Run command with the service's ports enabled and mapped to the host.]" \
+ '-T[Disable pseudo-tty allocation. By default `docker-compose run` allocates a TTY.]' \
+ '(-):services:__docker-compose_services' \
+ '(-):command: _command_names -e' \
+ '*::arguments: _normal' && ret=0
+ ;;
+ (scale)
+ _arguments '*:running services:__docker-compose_runningservices' && ret=0
+ ;;
+ (start)
+ _arguments '*:stopped services:__docker-compose_stoppedservices' && ret=0
+ ;;
+ (stop|restart)
+ _arguments \
+ '(-t --timeout)'{-t,--timeout}"[Specify a shutdown timeout in seconds. (default: 10)]:seconds: " \
+ '*:running services:__docker-compose_runningservices' && ret=0
+ ;;
+ (up)
+ _arguments \
+ '--allow-insecure-ssl[Allow insecure connections to the docker registry]' \
+ '-d[Detached mode: Run containers in the background, print new container names.]' \
+ '--no-color[Produce monochrome output.]' \
+ "--no-deps[Don't start linked services.]" \
+ "--no-recreate[If containers already exist, don't recreate them.]" \
+ "--no-build[Don't build an image, even if it's missing]" \
+ '(-t --timeout)'{-t,--timeout}"[Specify a shutdown timeout in seconds. (default: 10)]:seconds: " \
+ "--x-smart-recreate[Only recreate containers whose configuration or image needs to be updated. (EXPERIMENTAL)]" \
+ '*:services:__docker-compose_services_all' && ret=0
+ ;;
+ (version)
+ _arguments \
+ "--short[Shows only Compose's version number.]" && ret=0
+ ;;
+ (*)
+ _message 'Unknown sub command'
+ esac
+
+ return ret
+}
+
+_docker-compose () {
+ # Support for subservices, which allows for `compdef _docker docker-shell=_docker_containers`.
+ # Based on /usr/share/zsh/functions/Completion/Unix/_git without support for `ret`.
+ if [[ $service != docker-compose ]]; then
+ _call_function - _$service
+ return
+ fi
+
+ local curcontext="$curcontext" state line ret=1
+ typeset -A opt_args
+
+ _arguments -C \
+ '(- :)'{-h,--help}'[Get help]' \
+ '--verbose[Show more output]' \
+ '(- :)'{-v,--version}'[Print version and exit]' \
+ '(-f --file)'{-f,--file}'[Specify an alternate docker-compose file (default: docker-compose.yml)]:file:_files -g "*.yml"' \
+ '(-p --project-name)'{-p,--project-name}'[Specify an alternate project name (default: directory name)]:project name:' \
+ '(-): :->command' \
+ '(-)*:: :->option-or-argument' && ret=0
+
+ local counter=1
+ #local compose_file compose_project
+ while [ $counter -lt ${#words[@]} ]; do
+ case "${words[$counter]}" in
+ -f|--file)
+ (( counter++ ))
+ compose_file="${words[$counter]}"
+ ;;
+ -p|--project-name)
+ (( counter++ ))
+ compose_project="${words[$counter]}"
+ ;;
+ *)
+ ;;
+ esac
+ (( counter++ ))
+ done
+
+ case $state in
+ (command)
+ __docker-compose_commands && ret=0
+ ;;
+ (option-or-argument)
+ curcontext=${curcontext%:*:*}:docker-compose-$words[1]:
+ __docker-compose_subcommand && ret=0
+ ;;
+ esac
+
+ return ret
+}
+
+_docker-compose "$@"
diff --git a/plugins/docker/_docker b/plugins/docker/_docker
index fd459a0ca..a82a31ad3 100644
--- a/plugins/docker/_docker
+++ b/plugins/docker/_docker
@@ -27,7 +27,7 @@ __docker_all_containers() {
# output a selectable list of all docker images
__docker_images() {
declare -a img_cmd
- img_cmd=($(docker images | awk 'NR>1{print $1}'))
+ img_cmd=($(docker images | awk 'NR>1{print $1}'| sed 's/:/\\:/g'))
_describe 'images' img_cmd
}
@@ -36,7 +36,7 @@ __docker_images() {
# ---------------------------
__attach() {
_arguments \
- '--no-stdin[Do not attach stdin]' \
+ '--no-stdin[Do not attach STDIN]' \
'--sig-proxy[Proxify all received signal to the process (even in non-tty mode)]'
__docker_containers
}
@@ -52,16 +52,59 @@ __build() {
__commit() {
_arguments \
- '(-a,--author=)'{-a,--author=}'[Author (eg. "John Hannibal Smith <hannibal@a-team.com>"]' \
+ '(-a,--author=)'{-a,--author=}'[Author (e.g. "John Hannibal Smith <hannibal@a-team.com>")]' \
+ '(-c,--change=)'{-c,--change=}'[Apply Dockerfile instruction to the created image]' \
'(-m,--message=)'{-m,--message=}'[Commit message]' \
- '--run=[Config automatically applied when the image is run.]'
- __docker_containers
+ '(-p,--pause=)'{-p,--pause=}'[Pause container during commit]' \
}
__cp() {
__docker_containers
}
+__create() {
+ _arguments \
+ '(-P,--publish-all=)'{-P,--publish-all=}'[Publish all exposed ports to the host interfaces]' \
+ '(-a,--attach=)'{-a,--attach=}'[Attach to STDIN, STDOUT or STDERR]' \
+ '--add-host=[Add a custom host-to-IP mapping]' \
+ '--cap-add=[Add Linux capabilities]' \
+ '--cap-drop=[Drop Linux capabilities]' \
+ '--cpuset-cpus=[CPUs in which to allow execution (0-3, 0,1)]' \
+ '(-c,--cpu-shares=)'{-c,--cpu-shares=}'[CPU shares (relative weight)]' \
+ '--cidfile=[Write the container ID to the file]' \
+ '--device=[Add a host device to the container]' \
+ '--dns=[Set custom dns servers]' \
+ '--dns-search=[Set custom DNS search domains]' \
+ '(-e,--env=)'{-e,--env=}'[Set environment variables]' \
+ '--env-file=[Read in a file of environment variables]' \
+ '--entrypoint=[Overwrite the default entrypoint of the image]' \
+ '--expose=[Expose a port from the container without publishing it to your host]' \
+ '(-h,--hostname=)'{-h,--hostname=}'[Container host name]' \
+ '(-i,--interactive=)'{-i,--interactive=}'[Keep STDIN open even if not attached]' \
+ '--ipc=[IPC namespace to use]' \
+ '(-l,--label=)'{-l,--label=}'[Set meta data on a container]' \
+ '--link=[Add link to another container (name:alias)]' \
+ '--log-driver=[Logging driver for the container]' \
+ '--lxc-conf=[Add custom LXC options]' \
+ '--mac-address=[Container MAC address (e.g. 92:d0:c6:0a:29:33)]' \
+ '(-m,--memory=)'{-m,--memory=}'[Memory limit (format: <number><optional unit>, where unit = b, k, m or g)]' \
+ '--net=[Set the Network mode for the container]' \
+ '--name=[Assign a name to the container]' \
+ '--pid=[PID namespace to use]' \
+ '(-p,--publish=)'{-p,--publish=}'[Publish a container''s port to the host (format: ip:hostPort:containerPort/protocol)]' \
+ '--privileged=[Give extended privileges to this container]' \
+ '--restart=[Restart policy to apply when a container exits]' \
+ '--security-opt=[Security Options]' \
+ '--sig-proxy=[Proxify all received signal to the process (even in non-tty mode)]' \
+ '(-t,--tty=)'{-t,--tty=}'[Allocate a pseudo-tty]' \
+ '(-u,--user=)'{-u,--user=}'[Username or UID]' \
+ '--ulimit=[Ulimit options]' \
+ '(-v,--volume=)'{-v,--volume=}'[Bind mount a volume (e.g. -v /host:/container or -v /container)]' \
+ '--volumes-from=[Mount volumes from the specified container(s)]' \
+ '(-w,--workdir=)'{-w,--workdir=}'[Working directory inside the container]'
+ __docker_images
+}
+
__diff() {
__docker_containers
}
@@ -100,11 +143,6 @@ __info() {
# no arguments
}
-__insert() {
- __docker_images
- _arguments '*:files:_files'
-}
-
__inspect() {
__docker_images
__docker_all_containers
@@ -185,28 +223,43 @@ __rmi() {
__run() {
_arguments \
'(-P,--publish-all=)'{-P,--publish-all=}'[Publish all exposed ports to the host interfaces]' \
- '(-a,--attach=)'{-a,--attach=}'[Attach to stdin, stdout or stderr.]' \
- '(-c,--cpu-shares=)'{-c,--cpu-shares=}': CPU shares (relative weight)]' \
+ '(-a,--attach=)'{-a,--attach=}'[Attach to STDIN, STDOUT or STDERR]' \
+ '--add-host=[Add a custom host-to-IP mapping]' \
+ '--cap-add=[Add Linux capabilities]' \
+ '--cap-drop=[Drop Linux capabilities]' \
+ '--cpuset-cpus=[CPUs in which to allow execution (0-3, 0,1)]' \
+ '(-c,--cpu-shares=)'{-c,--cpu-shares=}'[CPU shares (relative weight)]' \
'--cidfile=[Write the container ID to the file]' \
- '(-d,--detach=)'{-d,--detach=}'[Detached mode: Run container in the background, print new container id]' \
+ '(-d,--detach=)'{-d,--detach=}'[Run container in the background, print new container id]' \
+ '--device=[Add a host device to the container]' \
'--dns=[Set custom dns servers]' \
+ '--dns-search=[Set custom DNS search domains]' \
'(-e,--env=)'{-e,--env=}'[Set environment variables]' \
+ '--env-file=[Read in a file of environment variables]' \
'--entrypoint=[Overwrite the default entrypoint of the image]' \
'--expose=[Expose a port from the container without publishing it to your host]' \
'(-h,--hostname=)'{-h,--hostname=}'[Container host name]' \
- '(-i,--interactive=)'{-i,--interactive=}'[Keep stdin open even if not attached]' \
+ '(-i,--interactive=)'{-i,--interactive=}'[Keep STDIN open even if not attached]' \
+ '--ipc=[IPC namespace to use]' \
+ '(-l,--label=)'{-l,--label=}'[Set meta data on a container]' \
'--link=[Add link to another container (name:alias)]' \
- '--lxc-conf=[Add custom lxc options -lxc-conf="lxc.cgroup.cpuset.cpus = 0,1"]' \
+ '--log-driver=[Logging driver for the container]' \
+ '--lxc-conf=[Add custom LXC options]' \
+ '--mac-address=[Container MAC address (e.g. 92:d0:c6:0a:29:33)]' \
'(-m,--memory=)'{-m,--memory=}'[Memory limit (format: <number><optional unit>, where unit = b, k, m or g)]' \
- '(-n,--networking=)'{-n,--networking=}'[Enable networking for this container]' \
+ '--net=[Set the Network mode for the container]' \
'--name=[Assign a name to the container]' \
- '(-p,--publish=)'{-p,--publish=}'[Publish a container''s port to the host (format: ip:hostPort:containerPort | ip::containerPort | hostPort:containerPort) (use "docker port" to see the actual mapping)]' \
+ '--pid=[PID namespace to use]' \
+ '(-p,--publish=)'{-p,--publish=}'[Publish a container''s port to the host (format: ip:hostPort:containerPort/protocol)]' \
'--privileged=[Give extended privileges to this container]' \
+ '--restart=[Restart policy to apply when a container exits]' \
'--rm=[Automatically remove the container when it exits (incompatible with -d)]' \
+ '--security-opt=[Security Options]' \
'--sig-proxy=[Proxify all received signal to the process (even in non-tty mode)]' \
'(-t,--tty=)'{-t,--tty=}'[Allocate a pseudo-tty]' \
'(-u,--user=)'{-u,--user=}'[Username or UID]' \
- '(-v,--volume=)'{-v,--volume=}'[Bind mount a volume (e.g. from the host: -v /host:/container, from docker: -v /container)]' \
+ '--ulimit=[Ulimit options]' \
+ '(-v,--volume=)'{-v,--volume=}'[Bind mount a volume (e.g. -v /host:/container or -v /container)]' \
'--volumes-from=[Mount volumes from the specified container(s)]' \
'(-w,--workdir=)'{-w,--workdir=}'[Working directory inside the container]'
__docker_images
@@ -225,8 +278,8 @@ __save() {
__start() {
_arguments \
- '(-a,--attach=)'{-a,--attach=}'[Attach container''s stdout/stderr and forward all signals to the process]' \
- '(-i,--interactive=)'{-i,--interactive=}'[Attach container''s stdin]'
+ '(-a,--attach=)'{-a,--attach=}'[Attach container''s STDOUT/STDERR and forward all signals to the process]' \
+ '(-i,--interactive=)'{-i,--interactive=}'[Attach container''s STDIN]'
__docker_all_containers
}
@@ -271,6 +324,7 @@ _1st_arguments=(
"build":"Build a container from a Dockerfile"
"commit":"Create a new image from a container's changes"
"cp":"Copy files/folders from the containers filesystem to the host path"
+ "create":"Create new container without running it"
"diff":"Inspect changes on a container's filesystem"
"events":"Get real time events from the server"
"export":"Stream the contents of a container as a tar archive"
@@ -278,7 +332,6 @@ _1st_arguments=(
"images":"List images"
"import":"Create a new filesystem image from the contents of a tarball"
"info":"Display system-wide information"
- "insert":"Insert a file in an image"
"inspect":"Return low-level information on a container"
"kill":"Kill a running container"
"load":"Load an image from a tar archive"
@@ -321,6 +374,8 @@ case "$words[1]" in
__commit ;;
cp)
__cp ;;
+ create)
+ __create ;;
diff)
__diff ;;
events)
@@ -335,8 +390,6 @@ case "$words[1]" in
__import ;;
info)
__info ;;
- insert)
- __insert ;;
inspect)
__inspect ;;
kill)
diff --git a/plugins/ember-cli/README.md b/plugins/ember-cli/README.md
index d1dedf884..1f92bba32 100644
--- a/plugins/ember-cli/README.md
+++ b/plugins/ember-cli/README.md
@@ -1,22 +1,21 @@
-# Ember-cli
+# Ember CLI
-**Maintainer:** [BilalBudhani](http://www.github.com/BilalBudhani)
+**Maintainers:** [BilalBudhani](http://www.github.com/BilalBudhani), [eubenesa](http://www.github.com/eubenesa)
-Ember-cli (http://www.ember-cli.com/)
+Ember CLI (http://www.ember-cli.com/)
### List of Aliases
-alias es='ember serve'
-alias ea='ember addon'
-alias eb='ember build'
-alias ed='ember destroy'
-alias eg='ember generate'
-alias eh='ember help'
-alias ein='ember init'
-alias eia='ember install:addon'
-alias eib='ember install:bower'
-alias ein='ember install:npm'
-alias ei='ember install'
-alias et='ember test'
-alias eu='ember update'
-alias ev='ember version'
+Alias | Ember-CLI command
+----- | -----------------
+**es** | *ember serve*
+**ea** | *ember addon*
+**eb** | *ember build*
+**ed** | *ember destroy*
+**eg** | *ember generate*
+**eh** | *ember help*
+**ein** | *ember init*
+**ei** | *ember install*
+**et** | *ember test*
+**eu** | *ember update*
+**ev** | *ember version*
diff --git a/plugins/ember-cli/ember-cli.plugin.zsh b/plugins/ember-cli/ember-cli.plugin.zsh
index 044a2c043..a0f346829 100644
--- a/plugins/ember-cli/ember-cli.plugin.zsh
+++ b/plugins/ember-cli/ember-cli.plugin.zsh
@@ -1,5 +1,5 @@
-# Ember ClI
-# visit http://www.ember-cli.com/ to view user guid
+# Ember CLI
+# Visit http://www.ember-cli.com/ to view user guide
alias es='ember serve'
alias ea='ember addon'
@@ -8,9 +8,6 @@ alias ed='ember destroy'
alias eg='ember generate'
alias eh='ember help'
alias ein='ember init'
-alias eia='ember install:addon'
-alias eib='ember install:bower'
-alias ein='ember install:npm'
alias ei='ember install'
alias et='ember test'
alias eu='ember update'
diff --git a/plugins/emoji/README.md b/plugins/emoji/README.md
new file mode 100644
index 000000000..889e567e6
--- /dev/null
+++ b/plugins/emoji/README.md
@@ -0,0 +1,135 @@
+# emoji plugin
+
+Support for conveniently working with Unicode emoji in Zsh.
+
+## Features
+
+This plugin provides support for working with Unicode emoji characters in `zsh` using human-readable identifiers. It provides global variables which map emoji names to the actual characters, country names to their flags, and some named groupings of emoji. It also provides associated functions for displaying them.
+
+#### Variables
+
+Variable | Description
+----------------- | --------------------------------
+ $emoji | Maps emoji names to characters
+ $emoji_flags | Maps country names to flag characters (using region indicators)
+ $emoji_groups | Named groups of emoji. Keys are group names; values are whitespace-separated lists of character names
+
+You may define new emoji groups at run time by modifying `$emoji_groups`. The special group name `all` is reserved for use by the plugin. You should not modify `$emoji` or `$emoji_flags`.
+
+#### Functions
+
+Function | Description
+---------------- | -------------------------------
+ random_emoji | Prints a random emoji character
+ display_emoji | Displays emoji, along with their names
+
+## Usage and Examples
+
+To output a specific emoji, use:
+```
+$> echo $emoji[<name>]
+```
+E.g.:
+```
+$> echo $emoji[mouse_face]
+```
+
+To output a random emoji, use:
+```
+$> random_emoji
+```
+To output a random emoji from a particular group, use:
+```
+$> random_emoji <group>
+```
+E.g.:
+```
+$> random_emoji fruits
+$> random_emoji animals
+$> random_emoji vehicles
+$> random_emoji faces
+```
+
+The defined group names can be found with `echo ${(k)emoji_groups}`.
+
+To list all available emoji with their names, use:
+```
+$> display_emoji
+$> display_emoji fruits
+$> display_emoji animals
+$> display_emoji vehicles
+$> display_emoji faces
+```
+
+To use emoji in a prompt:
+```
+PROMPT="$emoji[penguin] > ""
+PROMPT='$(random_emoji fruits) > '
+surfer=$emoji[surfer]
+PROMPT="$surfer > "
+```
+
+## Technical Details
+
+The emoji names and codes are sourced from Unicode Technical Report \#51, which provides information on emoji support in Unicode. It can be found at http://www.unicode.org/reports/tr51/index.html.
+
+The group definitions are added by this OMZ plugin. They are not based on external definitions. (As far as I can tell. -apjanke)
+
+The values in the `$emoji*` maps are the emoji characters themselves, not escape sequences or other forms that require interpretation. They can be used in any context and do not require escape sequence support from commands like `echo` or `print`.
+
+The emoji in the main `$emoji` map are standalone character sequences which can all be output on their own, without worrying about combining characters. The values may actually be multi-code-point sequences, instead of a single code point, and may include combining characters in those sequences. But they're arranged so their effects do not extend beyond that sequence.
+
+The exception to this is the skin tone variation selectors. These are included in the main `$emoji` map because they can be displayed on their own, as well as used as combining characters. (If they follow a character that is not one of the emoji characters they combine with, they are displayed as color swatches.)
+
+
+## Experimental Features
+
+This defines some additional variables and functions, but these are experimental and subject to change at any time. You shouldn't rely on them being available. They're mostly for the use of emoji plugin developers to help decide what to include in future revisions.
+
+Variables:
+
+Variable | Description
+----------------- | --------------------------------
+ $emoji2 | Auxiliary and combining characters
+ $emoji_skintone | Skin tone modifiers (from Unicode 8.0)
+
+
+#### Skin Tone Variation Selection
+
+This includes experimental support for the skin tone Variation Selectors introduced with Unicode 8.0, which let you select different skin tones for emoji involving humans.
+
+NOTE: This really is experimental. The skin tone selectors are a relatively new feature and may not be supported by all systems. And the support in this plugin is a work in progress. It may not work in all places. In fact, I haven't gotten it to work anywhere yet. -apjanke
+
+The "variation selectors" are combining characters which change the appearance of the preceding character. A variation selector character can be output immediately following a human emoji to change its skin tone color. You can also output a variation selector on its own to display a color swatch of that skin tone.
+
+The `$emoji_skintone` associative array maps skin tone IDs to the variation selector characters. To use one, output it immediately following a smiley or other human emoji.
+
+```
+echo "$emoji[smiling_face_with_open_mouth]$emoji_skintone[4]"
+```
+
+Note that `$emoji_skintone` is an associative array, and its keys are the *names* of "Fitzpatrick Skin Type" groups, not linear indexes into a normal array. The names are `1_2`, `3`, `4`, `5`, and `6`. (Types 1 and 2 are combined into a single color.) See the [Diversity section in Unicode TR 51](http://www.unicode.org/reports/tr51/index.html#Diversity) for details.
+
+## TODO
+
+These are things that could be enhanced in future revisions of the plugin.
+
+* Incorporate CLDR data for ordering and groupings
+* Short :bracket: style names (from gemoji)
+* Incorporate `gemoji` data
+* Country codes for flags
+* ZWJ combining function?
+
+#### Gemoji support
+
+The [gemoji project](https://github.com/github/gemoji) seems to be the de facto main source for short names and other emoji-related metadata that isn't included in the official Unicode reports. (I'm saying this just from looking at the google results for "emoji short names" and related searches. -apjanke)
+
+If this plugin is updated to provide short names, CLDR sorting data, and similar stuff, it should probably be changed to use the Gemoji project, and the `update_emoji.pl` script be rewritten in Ruby so it can use the Gemoji library directly instead of parsing its data files.
+
+This does *not* mean that it should use Gemoji at run time. None of the `zsh` plugin stuff should call Gemoji or Ruby code. Rather, the "build time" `update_emoji.pl` script should be rewritten to use Gemoji to generate a pure-native-`zsh` character definition file which would be checked in to the repo and can be called by OMZ users without having Gemoji installed.
+
+#### ZWJ combining function
+
+One of the newer features of Unicode emoji is the ability to use the "Zero-Width Joiner" character to compose multiple emoji characters in to a single "emoji ligature" glyph. For example, this is [how Apple supports "family" emoji with various genders and skin tones](http://www.unicode.org/reports/tr51/index.html#ZWJ_Sequences).
+
+These are a pain to write out (and probably worse to read), and it might be convenient to have a couple functions for concisely composing them, if wider support for them appears.
diff --git a/plugins/emoji/emoji-char-definitions.zsh b/plugins/emoji/emoji-char-definitions.zsh
new file mode 100644
index 000000000..04693da05
--- /dev/null
+++ b/plugins/emoji/emoji-char-definitions.zsh
@@ -0,0 +1,1303 @@
+
+# emoji-char-definitions.zsh - Emoji character definitions for oh-my-zsh emoji plugin
+#
+# This file is auto-generated by update_emoji.pl. Do not edit it manually.
+#
+# This contains the definition for:
+# $emoji - which maps character names to Unicode characters
+# $emoji_flags - maps country names to Unicode flag characters using region indicators
+
+# Main emoji
+typeset -gAH emoji
+# National flags
+typeset -gAH emoji_flags
+# Combining modifiers
+typeset -gAH emoji_mod
+
+emoji[copyright_sign]=$'\U00A9'
+emoji[registered_sign]=$'\U00AE'
+emoji[double_exclamation_mark]=$'\U203C'
+emoji[exclamation_question_mark]=$'\U2049'
+emoji[trade_mark_sign]=$'\U2122'
+emoji[information_source]=$'\U2139'
+emoji[left_right_arrow]=$'\U2194'
+emoji[up_down_arrow]=$'\U2195'
+emoji[north_west_arrow]=$'\U2196'
+emoji[north_east_arrow]=$'\U2197'
+emoji[south_east_arrow]=$'\U2198'
+emoji[south_west_arrow]=$'\U2199'
+emoji[leftwards_arrow_with_hook]=$'\U21A9'
+emoji[rightwards_arrow_with_hook]=$'\U21AA'
+emoji[watch]=$'\U231A'
+emoji[hourglass]=$'\U231B'
+emoji[keyboard]=$'\U2328'
+emoji[eject_symbol]=$'\U23CF'
+emoji[black_right_pointing_double_triangle]=$'\U23E9'
+emoji[black_left_pointing_double_triangle]=$'\U23EA'
+emoji[black_up_pointing_double_triangle]=$'\U23EB'
+emoji[black_down_pointing_double_triangle]=$'\U23EC'
+emoji[black_right_pointing_double_triangle_with_vertical_bar]=$'\U23ED'
+emoji[black_left_pointing_double_triangle_with_vertical_bar]=$'\U23EE'
+emoji[black_right_pointing_triangle_with_double_vertical_bar]=$'\U23EF'
+emoji[alarm_clock]=$'\U23F0'
+emoji[stopwatch]=$'\U23F1'
+emoji[timer_clock]=$'\U23F2'
+emoji[hourglass_with_flowing_sand]=$'\U23F3'
+emoji[double_vertical_bar]=$'\U23F8'
+emoji[black_square_for_stop]=$'\U23F9'
+emoji[black_circle_for_record]=$'\U23FA'
+emoji[circled_latin_capital_letter_m]=$'\U24C2'
+emoji[black_small_square]=$'\U25AA'
+emoji[white_small_square]=$'\U25AB'
+emoji[black_right_pointing_triangle]=$'\U25B6'
+emoji[black_left_pointing_triangle]=$'\U25C0'
+emoji[white_medium_square]=$'\U25FB'
+emoji[black_medium_square]=$'\U25FC'
+emoji[white_medium_small_square]=$'\U25FD'
+emoji[black_medium_small_square]=$'\U25FE'
+emoji[black_sun_with_rays]=$'\U2600'
+emoji[cloud]=$'\U2601'
+emoji[umbrella]=$'\U2602'
+emoji[snowman]=$'\U2603'
+emoji[comet]=$'\U2604'
+emoji[black_telephone]=$'\U260E'
+emoji[ballot_box_with_check]=$'\U2611'
+emoji[umbrella_with_rain_drops]=$'\U2614'
+emoji[hot_beverage]=$'\U2615'
+emoji[shamrock]=$'\U2618'
+emoji[white_up_pointing_index]=$'\U261D'
+emoji[skull_and_crossbones]=$'\U2620'
+emoji[radioactive_sign]=$'\U2622'
+emoji[biohazard_sign]=$'\U2623'
+emoji[orthodox_cross]=$'\U2626'
+emoji[star_and_crescent]=$'\U262A'
+emoji[peace_symbol]=$'\U262E'
+emoji[yin_yang]=$'\U262F'
+emoji[wheel_of_dharma]=$'\U2638'
+emoji[white_frowning_face]=$'\U2639'
+emoji[white_smiling_face]=$'\U263A'
+emoji[aries]=$'\U2648'
+emoji[taurus]=$'\U2649'
+emoji[gemini]=$'\U264A'
+emoji[cancer]=$'\U264B'
+emoji[leo]=$'\U264C'
+emoji[virgo]=$'\U264D'
+emoji[libra]=$'\U264E'
+emoji[scorpius]=$'\U264F'
+emoji[sagittarius]=$'\U2650'
+emoji[capricorn]=$'\U2651'
+emoji[aquarius]=$'\U2652'
+emoji[pisces]=$'\U2653'
+emoji[black_spade_suit]=$'\U2660'
+emoji[black_club_suit]=$'\U2663'
+emoji[black_heart_suit]=$'\U2665'
+emoji[black_diamond_suit]=$'\U2666'
+emoji[hot_springs]=$'\U2668'
+emoji[black_universal_recycling_symbol]=$'\U267B'
+emoji[wheelchair_symbol]=$'\U267F'
+emoji[hammer_and_pick]=$'\U2692'
+emoji[anchor]=$'\U2693'
+emoji[crossed_swords]=$'\U2694'
+emoji[scales]=$'\U2696'
+emoji[alembic]=$'\U2697'
+emoji[gear]=$'\U2699'
+emoji[atom_symbol]=$'\U269B'
+emoji[fleur_de_lis]=$'\U269C'
+emoji[warning_sign]=$'\U26A0'
+emoji[high_voltage_sign]=$'\U26A1'
+emoji[medium_white_circle]=$'\U26AA'
+emoji[medium_black_circle]=$'\U26AB'
+emoji[coffin]=$'\U26B0'
+emoji[funeral_urn]=$'\U26B1'
+emoji[soccer_ball]=$'\U26BD'
+emoji[baseball]=$'\U26BE'
+emoji[snowman_without_snow]=$'\U26C4'
+emoji[sun_behind_cloud]=$'\U26C5'
+emoji[thunder_cloud_and_rain]=$'\U26C8'
+emoji[ophiuchus]=$'\U26CE'
+emoji[pick]=$'\U26CF'
+emoji[helmet_with_white_cross]=$'\U26D1'
+emoji[chains]=$'\U26D3'
+emoji[no_entry]=$'\U26D4'
+emoji[shinto_shrine]=$'\U26E9'
+emoji[church]=$'\U26EA'
+emoji[mountain]=$'\U26F0'
+emoji[umbrella_on_ground]=$'\U26F1'
+emoji[fountain]=$'\U26F2'
+emoji[flag_in_hole]=$'\U26F3'
+emoji[ferry]=$'\U26F4'
+emoji[sailboat]=$'\U26F5'
+emoji[skier]=$'\U26F7'
+emoji[ice_skate]=$'\U26F8'
+emoji[person_with_ball]=$'\U26F9'
+emoji[tent]=$'\U26FA'
+emoji[fuel_pump]=$'\U26FD'
+emoji[black_scissors]=$'\U2702'
+emoji[white_heavy_check_mark]=$'\U2705'
+emoji[airplane]=$'\U2708'
+emoji[envelope]=$'\U2709'
+emoji[raised_fist]=$'\U270A'
+emoji[raised_hand]=$'\U270B'
+emoji[victory_hand]=$'\U270C'
+emoji[writing_hand]=$'\U270D'
+emoji[pencil]=$'\U270F'
+emoji[black_nib]=$'\U2712'
+emoji[heavy_check_mark]=$'\U2714'
+emoji[heavy_multiplication_x]=$'\U2716'
+emoji[latin_cross]=$'\U271D'
+emoji[star_of_david]=$'\U2721'
+emoji[sparkles]=$'\U2728'
+emoji[eight_spoked_asterisk]=$'\U2733'
+emoji[eight_pointed_black_star]=$'\U2734'
+emoji[snowflake]=$'\U2744'
+emoji[sparkle]=$'\U2747'
+emoji[cross_mark]=$'\U274C'
+emoji[negative_squared_cross_mark]=$'\U274E'
+emoji[black_question_mark_ornament]=$'\U2753'
+emoji[white_question_mark_ornament]=$'\U2754'
+emoji[white_exclamation_mark_ornament]=$'\U2755'
+emoji[heavy_exclamation_mark_symbol]=$'\U2757'
+emoji[heavy_heart_exclamation_mark_ornament]=$'\U2763'
+emoji[heavy_black_heart]=$'\U2764'
+emoji[heavy_plus_sign]=$'\U2795'
+emoji[heavy_minus_sign]=$'\U2796'
+emoji[heavy_division_sign]=$'\U2797'
+emoji[black_rightwards_arrow]=$'\U27A1'
+emoji[curly_loop]=$'\U27B0'
+emoji[double_curly_loop]=$'\U27BF'
+emoji[arrow_pointing_rightwards_then_curving_upwards]=$'\U2934'
+emoji[arrow_pointing_rightwards_then_curving_downwards]=$'\U2935'
+emoji[leftwards_black_arrow]=$'\U2B05'
+emoji[upwards_black_arrow]=$'\U2B06'
+emoji[downwards_black_arrow]=$'\U2B07'
+emoji[black_large_square]=$'\U2B1B'
+emoji[white_large_square]=$'\U2B1C'
+emoji[white_medium_star]=$'\U2B50'
+emoji[heavy_large_circle]=$'\U2B55'
+emoji[wavy_dash]=$'\U3030'
+emoji[part_alternation_mark]=$'\U303D'
+emoji[circled_ideograph_congratulation]=$'\U3297'
+emoji[circled_ideograph_secret]=$'\U3299'
+emoji[mahjong_tile_red_dragon]=$'\U1F004'
+emoji[playing_card_black_joker]=$'\U1F0CF'
+emoji[negative_squared_latin_capital_letter_a]=$'\U1F170'
+emoji[negative_squared_latin_capital_letter_b]=$'\U1F171'
+emoji[negative_squared_latin_capital_letter_o]=$'\U1F17E'
+emoji[negative_squared_latin_capital_letter_p]=$'\U1F17F'
+emoji[negative_squared_ab]=$'\U1F18E'
+emoji[squared_cl]=$'\U1F191'
+emoji[squared_cool]=$'\U1F192'
+emoji[squared_free]=$'\U1F193'
+emoji[squared_id]=$'\U1F194'
+emoji[squared_new]=$'\U1F195'
+emoji[squared_ng]=$'\U1F196'
+emoji[squared_ok]=$'\U1F197'
+emoji[squared_sos]=$'\U1F198'
+emoji[squared_up_with_exclamation_mark]=$'\U1F199'
+emoji[squared_vs]=$'\U1F19A'
+emoji[squared_katakana_koko]=$'\U1F201'
+emoji[squared_katakana_sa]=$'\U1F202'
+emoji[squared_cjk_unified_ideograph_7121]=$'\U1F21A'
+emoji[squared_cjk_unified_ideograph_6307]=$'\U1F22F'
+emoji[squared_cjk_unified_ideograph_7981]=$'\U1F232'
+emoji[squared_cjk_unified_ideograph_7a7a]=$'\U1F233'
+emoji[squared_cjk_unified_ideograph_5408]=$'\U1F234'
+emoji[squared_cjk_unified_ideograph_6e80]=$'\U1F235'
+emoji[squared_cjk_unified_ideograph_6709]=$'\U1F236'
+emoji[squared_cjk_unified_ideograph_6708]=$'\U1F237'
+emoji[squared_cjk_unified_ideograph_7533]=$'\U1F238'
+emoji[squared_cjk_unified_ideograph_5272]=$'\U1F239'
+emoji[squared_cjk_unified_ideograph_55b6]=$'\U1F23A'
+emoji[circled_ideograph_advantage]=$'\U1F250'
+emoji[circled_ideograph_accept]=$'\U1F251'
+emoji[cyclone]=$'\U1F300'
+emoji[foggy]=$'\U1F301'
+emoji[closed_umbrella]=$'\U1F302'
+emoji[night_with_stars]=$'\U1F303'
+emoji[sunrise_over_mountains]=$'\U1F304'
+emoji[sunrise]=$'\U1F305'
+emoji[cityscape_at_dusk]=$'\U1F306'
+emoji[sunset_over_buildings]=$'\U1F307'
+emoji[rainbow]=$'\U1F308'
+emoji[bridge_at_night]=$'\U1F309'
+emoji[water_wave]=$'\U1F30A'
+emoji[volcano]=$'\U1F30B'
+emoji[milky_way]=$'\U1F30C'
+emoji[earth_globe_europe_africa]=$'\U1F30D'
+emoji[earth_globe_americas]=$'\U1F30E'
+emoji[earth_globe_asia_australia]=$'\U1F30F'
+emoji[globe_with_meridians]=$'\U1F310'
+emoji[new_moon_symbol]=$'\U1F311'
+emoji[waxing_crescent_moon_symbol]=$'\U1F312'
+emoji[first_quarter_moon_symbol]=$'\U1F313'
+emoji[waxing_gibbous_moon_symbol]=$'\U1F314'
+emoji[full_moon_symbol]=$'\U1F315'
+emoji[waning_gibbous_moon_symbol]=$'\U1F316'
+emoji[last_quarter_moon_symbol]=$'\U1F317'
+emoji[waning_crescent_moon_symbol]=$'\U1F318'
+emoji[crescent_moon]=$'\U1F319'
+emoji[new_moon_with_face]=$'\U1F31A'
+emoji[first_quarter_moon_with_face]=$'\U1F31B'
+emoji[last_quarter_moon_with_face]=$'\U1F31C'
+emoji[full_moon_with_face]=$'\U1F31D'
+emoji[sun_with_face]=$'\U1F31E'
+emoji[glowing_star]=$'\U1F31F'
+emoji[shooting_star]=$'\U1F320'
+emoji[thermometer]=$'\U1F321'
+emoji[white_sun_with_small_cloud]=$'\U1F324'
+emoji[white_sun_behind_cloud]=$'\U1F325'
+emoji[white_sun_behind_cloud_with_rain]=$'\U1F326'
+emoji[cloud_with_rain]=$'\U1F327'
+emoji[cloud_with_snow]=$'\U1F328'
+emoji[cloud_with_lightning]=$'\U1F329'
+emoji[cloud_with_tornado]=$'\U1F32A'
+emoji[fog]=$'\U1F32B'
+emoji[wind_blowing_face]=$'\U1F32C'
+emoji[hot_dog]=$'\U1F32D'
+emoji[taco]=$'\U1F32E'
+emoji[burrito]=$'\U1F32F'
+emoji[chestnut]=$'\U1F330'
+emoji[seedling]=$'\U1F331'
+emoji[evergreen_tree]=$'\U1F332'
+emoji[deciduous_tree]=$'\U1F333'
+emoji[palm_tree]=$'\U1F334'
+emoji[cactus]=$'\U1F335'
+emoji[hot_pepper]=$'\U1F336'
+emoji[tulip]=$'\U1F337'
+emoji[cherry_blossom]=$'\U1F338'
+emoji[rose]=$'\U1F339'
+emoji[hibiscus]=$'\U1F33A'
+emoji[sunflower]=$'\U1F33B'
+emoji[blossom]=$'\U1F33C'
+emoji[ear_of_maize]=$'\U1F33D'
+emoji[ear_of_rice]=$'\U1F33E'
+emoji[herb]=$'\U1F33F'
+emoji[four_leaf_clover]=$'\U1F340'
+emoji[maple_leaf]=$'\U1F341'
+emoji[fallen_leaf]=$'\U1F342'
+emoji[leaf_fluttering_in_wind]=$'\U1F343'
+emoji[mushroom]=$'\U1F344'
+emoji[tomato]=$'\U1F345'
+emoji[aubergine]=$'\U1F346'
+emoji[grapes]=$'\U1F347'
+emoji[melon]=$'\U1F348'
+emoji[watermelon]=$'\U1F349'
+emoji[tangerine]=$'\U1F34A'
+emoji[lemon]=$'\U1F34B'
+emoji[banana]=$'\U1F34C'
+emoji[pineapple]=$'\U1F34D'
+emoji[red_apple]=$'\U1F34E'
+emoji[green_apple]=$'\U1F34F'
+emoji[pear]=$'\U1F350'
+emoji[peach]=$'\U1F351'
+emoji[cherries]=$'\U1F352'
+emoji[strawberry]=$'\U1F353'
+emoji[hamburger]=$'\U1F354'
+emoji[slice_of_pizza]=$'\U1F355'
+emoji[meat_on_bone]=$'\U1F356'
+emoji[poultry_leg]=$'\U1F357'
+emoji[rice_cracker]=$'\U1F358'
+emoji[rice_ball]=$'\U1F359'
+emoji[cooked_rice]=$'\U1F35A'
+emoji[curry_and_rice]=$'\U1F35B'
+emoji[steaming_bowl]=$'\U1F35C'
+emoji[spaghetti]=$'\U1F35D'
+emoji[bread]=$'\U1F35E'
+emoji[french_fries]=$'\U1F35F'
+emoji[roasted_sweet_potato]=$'\U1F360'
+emoji[dango]=$'\U1F361'
+emoji[oden]=$'\U1F362'
+emoji[sushi]=$'\U1F363'
+emoji[fried_shrimp]=$'\U1F364'
+emoji[fish_cake_with_swirl_design]=$'\U1F365'
+emoji[soft_ice_cream]=$'\U1F366'
+emoji[shaved_ice]=$'\U1F367'
+emoji[ice_cream]=$'\U1F368'
+emoji[doughnut]=$'\U1F369'
+emoji[cookie]=$'\U1F36A'
+emoji[chocolate_bar]=$'\U1F36B'
+emoji[candy]=$'\U1F36C'
+emoji[lollipop]=$'\U1F36D'
+emoji[custard]=$'\U1F36E'
+emoji[honey_pot]=$'\U1F36F'
+emoji[shortcake]=$'\U1F370'
+emoji[bento_box]=$'\U1F371'
+emoji[pot_of_food]=$'\U1F372'
+emoji[cooking]=$'\U1F373'
+emoji[fork_and_knife]=$'\U1F374'
+emoji[teacup_without_handle]=$'\U1F375'
+emoji[sake_bottle_and_cup]=$'\U1F376'
+emoji[wine_glass]=$'\U1F377'
+emoji[cocktail_glass]=$'\U1F378'
+emoji[tropical_drink]=$'\U1F379'
+emoji[beer_mug]=$'\U1F37A'
+emoji[clinking_beer_mugs]=$'\U1F37B'
+emoji[baby_bottle]=$'\U1F37C'
+emoji[fork_and_knife_with_plate]=$'\U1F37D'
+emoji[bottle_with_popping_cork]=$'\U1F37E'
+emoji[popcorn]=$'\U1F37F'
+emoji[ribbon]=$'\U1F380'
+emoji[wrapped_present]=$'\U1F381'
+emoji[birthday_cake]=$'\U1F382'
+emoji[jack_o_lantern]=$'\U1F383'
+emoji[christmas_tree]=$'\U1F384'
+emoji[father_christmas]=$'\U1F385'
+emoji[fireworks]=$'\U1F386'
+emoji[firework_sparkler]=$'\U1F387'
+emoji[balloon]=$'\U1F388'
+emoji[party_popper]=$'\U1F389'
+emoji[confetti_ball]=$'\U1F38A'
+emoji[tanabata_tree]=$'\U1F38B'
+emoji[crossed_flags]=$'\U1F38C'
+emoji[pine_decoration]=$'\U1F38D'
+emoji[japanese_dolls]=$'\U1F38E'
+emoji[carp_streamer]=$'\U1F38F'
+emoji[wind_chime]=$'\U1F390'
+emoji[moon_viewing_ceremony]=$'\U1F391'
+emoji[school_satchel]=$'\U1F392'
+emoji[graduation_cap]=$'\U1F393'
+emoji[military_medal]=$'\U1F396'
+emoji[reminder_ribbon]=$'\U1F397'
+emoji[studio_microphone]=$'\U1F399'
+emoji[level_slider]=$'\U1F39A'
+emoji[control_knobs]=$'\U1F39B'
+emoji[film_frames]=$'\U1F39E'
+emoji[admission_tickets]=$'\U1F39F'
+emoji[carousel_horse]=$'\U1F3A0'
+emoji[ferris_wheel]=$'\U1F3A1'
+emoji[roller_coaster]=$'\U1F3A2'
+emoji[fishing_pole_and_fish]=$'\U1F3A3'
+emoji[microphone]=$'\U1F3A4'
+emoji[movie_camera]=$'\U1F3A5'
+emoji[cinema]=$'\U1F3A6'
+emoji[headphone]=$'\U1F3A7'
+emoji[artist_palette]=$'\U1F3A8'
+emoji[top_hat]=$'\U1F3A9'
+emoji[circus_tent]=$'\U1F3AA'
+emoji[ticket]=$'\U1F3AB'
+emoji[clapper_board]=$'\U1F3AC'
+emoji[performing_arts]=$'\U1F3AD'
+emoji[video_game]=$'\U1F3AE'
+emoji[direct_hit]=$'\U1F3AF'
+emoji[slot_machine]=$'\U1F3B0'
+emoji[billiards]=$'\U1F3B1'
+emoji[game_die]=$'\U1F3B2'
+emoji[bowling]=$'\U1F3B3'
+emoji[flower_playing_cards]=$'\U1F3B4'
+emoji[musical_note]=$'\U1F3B5'
+emoji[multiple_musical_notes]=$'\U1F3B6'
+emoji[saxophone]=$'\U1F3B7'
+emoji[guitar]=$'\U1F3B8'
+emoji[musical_keyboard]=$'\U1F3B9'
+emoji[trumpet]=$'\U1F3BA'
+emoji[violin]=$'\U1F3BB'
+emoji[musical_score]=$'\U1F3BC'
+emoji[running_shirt_with_sash]=$'\U1F3BD'
+emoji[tennis_racquet_and_ball]=$'\U1F3BE'
+emoji[ski_and_ski_boot]=$'\U1F3BF'
+emoji[basketball_and_hoop]=$'\U1F3C0'
+emoji[chequered_flag]=$'\U1F3C1'
+emoji[snowboarder]=$'\U1F3C2'
+emoji[runner]=$'\U1F3C3'
+emoji[surfer]=$'\U1F3C4'
+emoji[sports_medal]=$'\U1F3C5'
+emoji[trophy]=$'\U1F3C6'
+emoji[horse_racing]=$'\U1F3C7'
+emoji[american_football]=$'\U1F3C8'
+emoji[rugby_football]=$'\U1F3C9'
+emoji[swimmer]=$'\U1F3CA'
+emoji[weight_lifter]=$'\U1F3CB'
+emoji[golfer]=$'\U1F3CC'
+emoji[racing_motorcycle]=$'\U1F3CD'
+emoji[racing_car]=$'\U1F3CE'
+emoji[cricket_bat_and_ball]=$'\U1F3CF'
+emoji[volleyball]=$'\U1F3D0'
+emoji[field_hockey_stick_and_ball]=$'\U1F3D1'
+emoji[ice_hockey_stick_and_puck]=$'\U1F3D2'
+emoji[table_tennis_paddle_and_ball]=$'\U1F3D3'
+emoji[snow_capped_mountain]=$'\U1F3D4'
+emoji[camping]=$'\U1F3D5'
+emoji[beach_with_umbrella]=$'\U1F3D6'
+emoji[building_construction]=$'\U1F3D7'
+emoji[house_buildings]=$'\U1F3D8'
+emoji[cityscape]=$'\U1F3D9'
+emoji[derelict_house_building]=$'\U1F3DA'
+emoji[classical_building]=$'\U1F3DB'
+emoji[desert]=$'\U1F3DC'
+emoji[desert_island]=$'\U1F3DD'
+emoji[national_park]=$'\U1F3DE'
+emoji[stadium]=$'\U1F3DF'
+emoji[house_building]=$'\U1F3E0'
+emoji[house_with_garden]=$'\U1F3E1'
+emoji[office_building]=$'\U1F3E2'
+emoji[japanese_post_office]=$'\U1F3E3'
+emoji[european_post_office]=$'\U1F3E4'
+emoji[hospital]=$'\U1F3E5'
+emoji[bank]=$'\U1F3E6'
+emoji[automated_teller_machine]=$'\U1F3E7'
+emoji[hotel]=$'\U1F3E8'
+emoji[love_hotel]=$'\U1F3E9'
+emoji[convenience_store]=$'\U1F3EA'
+emoji[school]=$'\U1F3EB'
+emoji[department_store]=$'\U1F3EC'
+emoji[factory]=$'\U1F3ED'
+emoji[izakaya_lantern]=$'\U1F3EE'
+emoji[japanese_castle]=$'\U1F3EF'
+emoji[european_castle]=$'\U1F3F0'
+emoji[waving_white_flag]=$'\U1F3F3'
+emoji[waving_black_flag]=$'\U1F3F4'
+emoji[rosette]=$'\U1F3F5'
+emoji[label]=$'\U1F3F7'
+emoji[badminton_racquet_and_shuttlecock]=$'\U1F3F8'
+emoji[bow_and_arrow]=$'\U1F3F9'
+emoji[amphora]=$'\U1F3FA'
+emoji[emoji_modifier_fitzpatrick_type_1_2]=$'\U1F3FB'
+emoji_mod[emoji_modifier_fitzpatrick_type_1_2]=$'\U1F3FB'
+emoji[emoji_modifier_fitzpatrick_type_3]=$'\U1F3FC'
+emoji_mod[emoji_modifier_fitzpatrick_type_3]=$'\U1F3FC'
+emoji[emoji_modifier_fitzpatrick_type_4]=$'\U1F3FD'
+emoji_mod[emoji_modifier_fitzpatrick_type_4]=$'\U1F3FD'
+emoji[emoji_modifier_fitzpatrick_type_5]=$'\U1F3FE'
+emoji_mod[emoji_modifier_fitzpatrick_type_5]=$'\U1F3FE'
+emoji[emoji_modifier_fitzpatrick_type_6]=$'\U1F3FF'
+emoji_mod[emoji_modifier_fitzpatrick_type_6]=$'\U1F3FF'
+emoji[rat]=$'\U1F400'
+emoji[mouse]=$'\U1F401'
+emoji[ox]=$'\U1F402'
+emoji[water_buffalo]=$'\U1F403'
+emoji[cow]=$'\U1F404'
+emoji[tiger]=$'\U1F405'
+emoji[leopard]=$'\U1F406'
+emoji[rabbit]=$'\U1F407'
+emoji[cat]=$'\U1F408'
+emoji[dragon]=$'\U1F409'
+emoji[crocodile]=$'\U1F40A'
+emoji[whale]=$'\U1F40B'
+emoji[snail]=$'\U1F40C'
+emoji[snake]=$'\U1F40D'
+emoji[horse]=$'\U1F40E'
+emoji[ram]=$'\U1F40F'
+emoji[goat]=$'\U1F410'
+emoji[sheep]=$'\U1F411'
+emoji[monkey]=$'\U1F412'
+emoji[rooster]=$'\U1F413'
+emoji[chicken]=$'\U1F414'
+emoji[dog]=$'\U1F415'
+emoji[pig]=$'\U1F416'
+emoji[boar]=$'\U1F417'
+emoji[elephant]=$'\U1F418'
+emoji[octopus]=$'\U1F419'
+emoji[spiral_shell]=$'\U1F41A'
+emoji[bug]=$'\U1F41B'
+emoji[ant]=$'\U1F41C'
+emoji[honeybee]=$'\U1F41D'
+emoji[lady_beetle]=$'\U1F41E'
+emoji[fish]=$'\U1F41F'
+emoji[tropical_fish]=$'\U1F420'
+emoji[blowfish]=$'\U1F421'
+emoji[turtle]=$'\U1F422'
+emoji[hatching_chick]=$'\U1F423'
+emoji[baby_chick]=$'\U1F424'
+emoji[front_facing_baby_chick]=$'\U1F425'
+emoji[bird]=$'\U1F426'
+emoji[penguin]=$'\U1F427'
+emoji[koala]=$'\U1F428'
+emoji[poodle]=$'\U1F429'
+emoji[dromedary_camel]=$'\U1F42A'
+emoji[bactrian_camel]=$'\U1F42B'
+emoji[dolphin]=$'\U1F42C'
+emoji[mouse_face]=$'\U1F42D'
+emoji[cow_face]=$'\U1F42E'
+emoji[tiger_face]=$'\U1F42F'
+emoji[rabbit_face]=$'\U1F430'
+emoji[cat_face]=$'\U1F431'
+emoji[dragon_face]=$'\U1F432'
+emoji[spouting_whale]=$'\U1F433'
+emoji[horse_face]=$'\U1F434'
+emoji[monkey_face]=$'\U1F435'
+emoji[dog_face]=$'\U1F436'
+emoji[pig_face]=$'\U1F437'
+emoji[frog_face]=$'\U1F438'
+emoji[hamster_face]=$'\U1F439'
+emoji[wolf_face]=$'\U1F43A'
+emoji[bear_face]=$'\U1F43B'
+emoji[panda_face]=$'\U1F43C'
+emoji[pig_nose]=$'\U1F43D'
+emoji[paw_prints]=$'\U1F43E'
+emoji[chipmunk]=$'\U1F43F'
+emoji[eyes]=$'\U1F440'
+emoji[eye]=$'\U1F441'
+emoji[ear]=$'\U1F442'
+emoji[nose]=$'\U1F443'
+emoji[mouth]=$'\U1F444'
+emoji[tongue]=$'\U1F445'
+emoji[white_up_pointing_backhand_index]=$'\U1F446'
+emoji[white_down_pointing_backhand_index]=$'\U1F447'
+emoji[white_left_pointing_backhand_index]=$'\U1F448'
+emoji[white_right_pointing_backhand_index]=$'\U1F449'
+emoji[fisted_hand_sign]=$'\U1F44A'
+emoji[waving_hand_sign]=$'\U1F44B'
+emoji[ok_hand_sign]=$'\U1F44C'
+emoji[thumbs_up_sign]=$'\U1F44D'
+emoji[thumbs_down_sign]=$'\U1F44E'
+emoji[clapping_hands_sign]=$'\U1F44F'
+emoji[open_hands_sign]=$'\U1F450'
+emoji[crown]=$'\U1F451'
+emoji[womans_hat]=$'\U1F452'
+emoji[eyeglasses]=$'\U1F453'
+emoji[necktie]=$'\U1F454'
+emoji[t_shirt]=$'\U1F455'
+emoji[jeans]=$'\U1F456'
+emoji[dress]=$'\U1F457'
+emoji[kimono]=$'\U1F458'
+emoji[bikini]=$'\U1F459'
+emoji[womans_clothes]=$'\U1F45A'
+emoji[purse]=$'\U1F45B'
+emoji[handbag]=$'\U1F45C'
+emoji[pouch]=$'\U1F45D'
+emoji[mans_shoe]=$'\U1F45E'
+emoji[athletic_shoe]=$'\U1F45F'
+emoji[high_heeled_shoe]=$'\U1F460'
+emoji[womans_sandal]=$'\U1F461'
+emoji[womans_boots]=$'\U1F462'
+emoji[footprints]=$'\U1F463'
+emoji[bust_in_silhouette]=$'\U1F464'
+emoji[busts_in_silhouette]=$'\U1F465'
+emoji[boy]=$'\U1F466'
+emoji[girl]=$'\U1F467'
+emoji[man]=$'\U1F468'
+emoji[woman]=$'\U1F469'
+emoji[family]=$'\U1F46A'
+emoji[man_and_woman_holding_hands]=$'\U1F46B'
+emoji[two_men_holding_hands]=$'\U1F46C'
+emoji[two_women_holding_hands]=$'\U1F46D'
+emoji[police_officer]=$'\U1F46E'
+emoji[woman_with_bunny_ears]=$'\U1F46F'
+emoji[bride_with_veil]=$'\U1F470'
+emoji[person_with_blond_hair]=$'\U1F471'
+emoji[man_with_gua_pi_mao]=$'\U1F472'
+emoji[man_with_turban]=$'\U1F473'
+emoji[older_man]=$'\U1F474'
+emoji[older_woman]=$'\U1F475'
+emoji[baby]=$'\U1F476'
+emoji[construction_worker]=$'\U1F477'
+emoji[princess]=$'\U1F478'
+emoji[japanese_ogre]=$'\U1F479'
+emoji[japanese_goblin]=$'\U1F47A'
+emoji[ghost]=$'\U1F47B'
+emoji[baby_angel]=$'\U1F47C'
+emoji[extraterrestrial_alien]=$'\U1F47D'
+emoji[alien_monster]=$'\U1F47E'
+emoji[imp]=$'\U1F47F'
+emoji[skull]=$'\U1F480'
+emoji[information_desk_person]=$'\U1F481'
+emoji[guardsman]=$'\U1F482'
+emoji[dancer]=$'\U1F483'
+emoji[lipstick]=$'\U1F484'
+emoji[nail_polish]=$'\U1F485'
+emoji[face_massage]=$'\U1F486'
+emoji[haircut]=$'\U1F487'
+emoji[barber_pole]=$'\U1F488'
+emoji[syringe]=$'\U1F489'
+emoji[pill]=$'\U1F48A'
+emoji[kiss_mark]=$'\U1F48B'
+emoji[love_letter]=$'\U1F48C'
+emoji[ring]=$'\U1F48D'
+emoji[gem_stone]=$'\U1F48E'
+emoji[kiss]=$'\U1F48F'
+emoji[bouquet]=$'\U1F490'
+emoji[couple_with_heart]=$'\U1F491'
+emoji[wedding]=$'\U1F492'
+emoji[beating_heart]=$'\U1F493'
+emoji[broken_heart]=$'\U1F494'
+emoji[two_hearts]=$'\U1F495'
+emoji[sparkling_heart]=$'\U1F496'
+emoji[growing_heart]=$'\U1F497'
+emoji[heart_with_arrow]=$'\U1F498'
+emoji[blue_heart]=$'\U1F499'
+emoji[green_heart]=$'\U1F49A'
+emoji[yellow_heart]=$'\U1F49B'
+emoji[purple_heart]=$'\U1F49C'
+emoji[heart_with_ribbon]=$'\U1F49D'
+emoji[revolving_hearts]=$'\U1F49E'
+emoji[heart_decoration]=$'\U1F49F'
+emoji[diamond_shape_with_a_dot_inside]=$'\U1F4A0'
+emoji[electric_light_bulb]=$'\U1F4A1'
+emoji[anger_symbol]=$'\U1F4A2'
+emoji[bomb]=$'\U1F4A3'
+emoji[sleeping_symbol]=$'\U1F4A4'
+emoji[collision_symbol]=$'\U1F4A5'
+emoji[splashing_sweat_symbol]=$'\U1F4A6'
+emoji[droplet]=$'\U1F4A7'
+emoji[dash_symbol]=$'\U1F4A8'
+emoji[pile_of_poo]=$'\U1F4A9'
+emoji[flexed_biceps]=$'\U1F4AA'
+emoji[dizzy_symbol]=$'\U1F4AB'
+emoji[speech_balloon]=$'\U1F4AC'
+emoji[thought_balloon]=$'\U1F4AD'
+emoji[white_flower]=$'\U1F4AE'
+emoji[hundred_points_symbol]=$'\U1F4AF'
+emoji[money_bag]=$'\U1F4B0'
+emoji[currency_exchange]=$'\U1F4B1'
+emoji[heavy_dollar_sign]=$'\U1F4B2'
+emoji[credit_card]=$'\U1F4B3'
+emoji[banknote_with_yen_sign]=$'\U1F4B4'
+emoji[banknote_with_dollar_sign]=$'\U1F4B5'
+emoji[banknote_with_euro_sign]=$'\U1F4B6'
+emoji[banknote_with_pound_sign]=$'\U1F4B7'
+emoji[money_with_wings]=$'\U1F4B8'
+emoji[chart_with_upwards_trend_and_yen_sign]=$'\U1F4B9'
+emoji[seat]=$'\U1F4BA'
+emoji[personal_computer]=$'\U1F4BB'
+emoji[briefcase]=$'\U1F4BC'
+emoji[minidisc]=$'\U1F4BD'
+emoji[floppy_disk]=$'\U1F4BE'
+emoji[optical_disc]=$'\U1F4BF'
+emoji[dvd]=$'\U1F4C0'
+emoji[file_folder]=$'\U1F4C1'
+emoji[open_file_folder]=$'\U1F4C2'
+emoji[page_with_curl]=$'\U1F4C3'
+emoji[page_facing_up]=$'\U1F4C4'
+emoji[calendar]=$'\U1F4C5'
+emoji[tear_off_calendar]=$'\U1F4C6'
+emoji[card_index]=$'\U1F4C7'
+emoji[chart_with_upwards_trend]=$'\U1F4C8'
+emoji[chart_with_downwards_trend]=$'\U1F4C9'
+emoji[bar_chart]=$'\U1F4CA'
+emoji[clipboard]=$'\U1F4CB'
+emoji[pushpin]=$'\U1F4CC'
+emoji[round_pushpin]=$'\U1F4CD'
+emoji[paperclip]=$'\U1F4CE'
+emoji[straight_ruler]=$'\U1F4CF'
+emoji[triangular_ruler]=$'\U1F4D0'
+emoji[bookmark_tabs]=$'\U1F4D1'
+emoji[ledger]=$'\U1F4D2'
+emoji[notebook]=$'\U1F4D3'
+emoji[notebook_with_decorative_cover]=$'\U1F4D4'
+emoji[closed_book]=$'\U1F4D5'
+emoji[open_book]=$'\U1F4D6'
+emoji[green_book]=$'\U1F4D7'
+emoji[blue_book]=$'\U1F4D8'
+emoji[orange_book]=$'\U1F4D9'
+emoji[books]=$'\U1F4DA'
+emoji[name_badge]=$'\U1F4DB'
+emoji[scroll]=$'\U1F4DC'
+emoji[memo]=$'\U1F4DD'
+emoji[telephone_receiver]=$'\U1F4DE'
+emoji[pager]=$'\U1F4DF'
+emoji[fax_machine]=$'\U1F4E0'
+emoji[satellite_antenna]=$'\U1F4E1'
+emoji[public_address_loudspeaker]=$'\U1F4E2'
+emoji[cheering_megaphone]=$'\U1F4E3'
+emoji[outbox_tray]=$'\U1F4E4'
+emoji[inbox_tray]=$'\U1F4E5'
+emoji[package]=$'\U1F4E6'
+emoji[e_mail_symbol]=$'\U1F4E7'
+emoji[incoming_envelope]=$'\U1F4E8'
+emoji[envelope_with_downwards_arrow_above]=$'\U1F4E9'
+emoji[closed_mailbox_with_lowered_flag]=$'\U1F4EA'
+emoji[closed_mailbox_with_raised_flag]=$'\U1F4EB'
+emoji[open_mailbox_with_raised_flag]=$'\U1F4EC'
+emoji[open_mailbox_with_lowered_flag]=$'\U1F4ED'
+emoji[postbox]=$'\U1F4EE'
+emoji[postal_horn]=$'\U1F4EF'
+emoji[newspaper]=$'\U1F4F0'
+emoji[mobile_phone]=$'\U1F4F1'
+emoji[mobile_phone_with_rightwards_arrow_at_left]=$'\U1F4F2'
+emoji[vibration_mode]=$'\U1F4F3'
+emoji[mobile_phone_off]=$'\U1F4F4'
+emoji[no_mobile_phones]=$'\U1F4F5'
+emoji[antenna_with_bars]=$'\U1F4F6'
+emoji[camera]=$'\U1F4F7'
+emoji[camera_with_flash]=$'\U1F4F8'
+emoji[video_camera]=$'\U1F4F9'
+emoji[television]=$'\U1F4FA'
+emoji[radio]=$'\U1F4FB'
+emoji[videocassette]=$'\U1F4FC'
+emoji[film_projector]=$'\U1F4FD'
+emoji[prayer_beads]=$'\U1F4FF'
+emoji[twisted_rightwards_arrows]=$'\U1F500'
+emoji[clockwise_rightwards_and_leftwards_open_circle_arrows]=$'\U1F501'
+emoji[clockwise_rightwards_and_leftwards_open_circle_arrows_with_circled_one_overlay]=$'\U1F502'
+emoji[clockwise_downwards_and_upwards_open_circle_arrows]=$'\U1F503'
+emoji[anticlockwise_downwards_and_upwards_open_circle_arrows]=$'\U1F504'
+emoji[low_brightness_symbol]=$'\U1F505'
+emoji[high_brightness_symbol]=$'\U1F506'
+emoji[speaker_with_cancellation_stroke]=$'\U1F507'
+emoji[speaker]=$'\U1F508'
+emoji[speaker_with_one_sound_wave]=$'\U1F509'
+emoji[speaker_with_three_sound_waves]=$'\U1F50A'
+emoji[battery]=$'\U1F50B'
+emoji[electric_plug]=$'\U1F50C'
+emoji[left_pointing_magnifying_glass]=$'\U1F50D'
+emoji[right_pointing_magnifying_glass]=$'\U1F50E'
+emoji[lock_with_ink_pen]=$'\U1F50F'
+emoji[closed_lock_with_key]=$'\U1F510'
+emoji[key]=$'\U1F511'
+emoji[lock]=$'\U1F512'
+emoji[open_lock]=$'\U1F513'
+emoji[bell]=$'\U1F514'
+emoji[bell_with_cancellation_stroke]=$'\U1F515'
+emoji[bookmark]=$'\U1F516'
+emoji[link_symbol]=$'\U1F517'
+emoji[radio_button]=$'\U1F518'
+emoji[back_with_leftwards_arrow_above]=$'\U1F519'
+emoji[end_with_leftwards_arrow_above]=$'\U1F51A'
+emoji[on_with_exclamation_mark_with_left_right_arrow_above]=$'\U1F51B'
+emoji[soon_with_rightwards_arrow_above]=$'\U1F51C'
+emoji[top_with_upwards_arrow_above]=$'\U1F51D'
+emoji[no_one_under_eighteen_symbol]=$'\U1F51E'
+emoji[keycap_ten]=$'\U1F51F'
+emoji[input_symbol_for_latin_capital_letters]=$'\U1F520'
+emoji[input_symbol_for_latin_small_letters]=$'\U1F521'
+emoji[input_symbol_for_numbers]=$'\U1F522'
+emoji[input_symbol_for_symbols]=$'\U1F523'
+emoji[input_symbol_for_latin_letters]=$'\U1F524'
+emoji[fire]=$'\U1F525'
+emoji[electric_torch]=$'\U1F526'
+emoji[wrench]=$'\U1F527'
+emoji[hammer]=$'\U1F528'
+emoji[nut_and_bolt]=$'\U1F529'
+emoji[hocho]=$'\U1F52A'
+emoji[pistol]=$'\U1F52B'
+emoji[microscope]=$'\U1F52C'
+emoji[telescope]=$'\U1F52D'
+emoji[crystal_ball]=$'\U1F52E'
+emoji[six_pointed_star_with_middle_dot]=$'\U1F52F'
+emoji[japanese_symbol_for_beginner]=$'\U1F530'
+emoji[trident_emblem]=$'\U1F531'
+emoji[black_square_button]=$'\U1F532'
+emoji[white_square_button]=$'\U1F533'
+emoji[large_red_circle]=$'\U1F534'
+emoji[large_blue_circle]=$'\U1F535'
+emoji[large_orange_diamond]=$'\U1F536'
+emoji[large_blue_diamond]=$'\U1F537'
+emoji[small_orange_diamond]=$'\U1F538'
+emoji[small_blue_diamond]=$'\U1F539'
+emoji[up_pointing_red_triangle]=$'\U1F53A'
+emoji[down_pointing_red_triangle]=$'\U1F53B'
+emoji[up_pointing_small_red_triangle]=$'\U1F53C'
+emoji[down_pointing_small_red_triangle]=$'\U1F53D'
+emoji[om_symbol]=$'\U1F549'
+emoji[dove_of_peace]=$'\U1F54A'
+emoji[kaaba]=$'\U1F54B'
+emoji[mosque]=$'\U1F54C'
+emoji[synagogue]=$'\U1F54D'
+emoji[menorah_with_nine_branches]=$'\U1F54E'
+emoji[clock_face_one_oclock]=$'\U1F550'
+emoji[clock_face_two_oclock]=$'\U1F551'
+emoji[clock_face_three_oclock]=$'\U1F552'
+emoji[clock_face_four_oclock]=$'\U1F553'
+emoji[clock_face_five_oclock]=$'\U1F554'
+emoji[clock_face_six_oclock]=$'\U1F555'
+emoji[clock_face_seven_oclock]=$'\U1F556'
+emoji[clock_face_eight_oclock]=$'\U1F557'
+emoji[clock_face_nine_oclock]=$'\U1F558'
+emoji[clock_face_ten_oclock]=$'\U1F559'
+emoji[clock_face_eleven_oclock]=$'\U1F55A'
+emoji[clock_face_twelve_oclock]=$'\U1F55B'
+emoji[clock_face_one_thirty]=$'\U1F55C'
+emoji[clock_face_two_thirty]=$'\U1F55D'
+emoji[clock_face_three_thirty]=$'\U1F55E'
+emoji[clock_face_four_thirty]=$'\U1F55F'
+emoji[clock_face_five_thirty]=$'\U1F560'
+emoji[clock_face_six_thirty]=$'\U1F561'
+emoji[clock_face_seven_thirty]=$'\U1F562'
+emoji[clock_face_eight_thirty]=$'\U1F563'
+emoji[clock_face_nine_thirty]=$'\U1F564'
+emoji[clock_face_ten_thirty]=$'\U1F565'
+emoji[clock_face_eleven_thirty]=$'\U1F566'
+emoji[clock_face_twelve_thirty]=$'\U1F567'
+emoji[candle]=$'\U1F56F'
+emoji[mantelpiece_clock]=$'\U1F570'
+emoji[hole]=$'\U1F573'
+emoji[man_in_business_suit_levitating]=$'\U1F574'
+emoji[sleuth_or_spy]=$'\U1F575'
+emoji[dark_sunglasses]=$'\U1F576'
+emoji[spider]=$'\U1F577'
+emoji[spider_web]=$'\U1F578'
+emoji[joystick]=$'\U1F579'
+emoji[linked_paperclips]=$'\U1F587'
+emoji[lower_left_ballpoint_pen]=$'\U1F58A'
+emoji[lower_left_fountain_pen]=$'\U1F58B'
+emoji[lower_left_paintbrush]=$'\U1F58C'
+emoji[lower_left_crayon]=$'\U1F58D'
+emoji[raised_hand_with_fingers_splayed]=$'\U1F590'
+emoji[reversed_hand_with_middle_finger_extended]=$'\U1F595'
+emoji[raised_hand_with_part_between_middle_and_ring_fingers]=$'\U1F596'
+emoji[desktop_computer]=$'\U1F5A5'
+emoji[printer]=$'\U1F5A8'
+emoji[three_button_mouse]=$'\U1F5B1'
+emoji[trackball]=$'\U1F5B2'
+emoji[frame_with_picture]=$'\U1F5BC'
+emoji[card_index_dividers]=$'\U1F5C2'
+emoji[card_file_box]=$'\U1F5C3'
+emoji[file_cabinet]=$'\U1F5C4'
+emoji[wastebasket]=$'\U1F5D1'
+emoji[spiral_note_pad]=$'\U1F5D2'
+emoji[spiral_calendar_pad]=$'\U1F5D3'
+emoji[compression]=$'\U1F5DC'
+emoji[old_key]=$'\U1F5DD'
+emoji[rolled_up_newspaper]=$'\U1F5DE'
+emoji[dagger_knife]=$'\U1F5E1'
+emoji[speaking_head_in_silhouette]=$'\U1F5E3'
+emoji[right_anger_bubble]=$'\U1F5EF'
+emoji[ballot_box_with_ballot]=$'\U1F5F3'
+emoji[world_map]=$'\U1F5FA'
+emoji[mount_fuji]=$'\U1F5FB'
+emoji[tokyo_tower]=$'\U1F5FC'
+emoji[statue_of_liberty]=$'\U1F5FD'
+emoji[silhouette_of_japan]=$'\U1F5FE'
+emoji[moyai]=$'\U1F5FF'
+emoji[grinning_face]=$'\U1F600'
+emoji[grinning_face_with_smiling_eyes]=$'\U1F601'
+emoji[face_with_tears_of_joy]=$'\U1F602'
+emoji[smiling_face_with_open_mouth]=$'\U1F603'
+emoji[smiling_face_with_open_mouth_and_smiling_eyes]=$'\U1F604'
+emoji[smiling_face_with_open_mouth_and_cold_sweat]=$'\U1F605'
+emoji[smiling_face_with_open_mouth_and_tightly_closed_eyes]=$'\U1F606'
+emoji[smiling_face_with_halo]=$'\U1F607'
+emoji[smiling_face_with_horns]=$'\U1F608'
+emoji[winking_face]=$'\U1F609'
+emoji[smiling_face_with_smiling_eyes]=$'\U1F60A'
+emoji[face_savouring_delicious_food]=$'\U1F60B'
+emoji[relieved_face]=$'\U1F60C'
+emoji[smiling_face_with_heart_shaped_eyes]=$'\U1F60D'
+emoji[smiling_face_with_sunglasses]=$'\U1F60E'
+emoji[smirking_face]=$'\U1F60F'
+emoji[neutral_face]=$'\U1F610'
+emoji[expressionless_face]=$'\U1F611'
+emoji[unamused_face]=$'\U1F612'
+emoji[face_with_cold_sweat]=$'\U1F613'
+emoji[pensive_face]=$'\U1F614'
+emoji[confused_face]=$'\U1F615'
+emoji[confounded_face]=$'\U1F616'
+emoji[kissing_face]=$'\U1F617'
+emoji[face_throwing_a_kiss]=$'\U1F618'
+emoji[kissing_face_with_smiling_eyes]=$'\U1F619'
+emoji[kissing_face_with_closed_eyes]=$'\U1F61A'
+emoji[face_with_stuck_out_tongue]=$'\U1F61B'
+emoji[face_with_stuck_out_tongue_and_winking_eye]=$'\U1F61C'
+emoji[face_with_stuck_out_tongue_and_tightly_closed_eyes]=$'\U1F61D'
+emoji[disappointed_face]=$'\U1F61E'
+emoji[worried_face]=$'\U1F61F'
+emoji[angry_face]=$'\U1F620'
+emoji[pouting_face]=$'\U1F621'
+emoji[crying_face]=$'\U1F622'
+emoji[persevering_face]=$'\U1F623'
+emoji[face_with_look_of_triumph]=$'\U1F624'
+emoji[disappointed_but_relieved_face]=$'\U1F625'
+emoji[frowning_face_with_open_mouth]=$'\U1F626'
+emoji[anguished_face]=$'\U1F627'
+emoji[fearful_face]=$'\U1F628'
+emoji[weary_face]=$'\U1F629'
+emoji[sleepy_face]=$'\U1F62A'
+emoji[tired_face]=$'\U1F62B'
+emoji[grimacing_face]=$'\U1F62C'
+emoji[loudly_crying_face]=$'\U1F62D'
+emoji[face_with_open_mouth]=$'\U1F62E'
+emoji[hushed_face]=$'\U1F62F'
+emoji[face_with_open_mouth_and_cold_sweat]=$'\U1F630'
+emoji[face_screaming_in_fear]=$'\U1F631'
+emoji[astonished_face]=$'\U1F632'
+emoji[flushed_face]=$'\U1F633'
+emoji[sleeping_face]=$'\U1F634'
+emoji[dizzy_face]=$'\U1F635'
+emoji[face_without_mouth]=$'\U1F636'
+emoji[face_with_medical_mask]=$'\U1F637'
+emoji[grinning_cat_face_with_smiling_eyes]=$'\U1F638'
+emoji[cat_face_with_tears_of_joy]=$'\U1F639'
+emoji[smiling_cat_face_with_open_mouth]=$'\U1F63A'
+emoji[smiling_cat_face_with_heart_shaped_eyes]=$'\U1F63B'
+emoji[cat_face_with_wry_smile]=$'\U1F63C'
+emoji[kissing_cat_face_with_closed_eyes]=$'\U1F63D'
+emoji[pouting_cat_face]=$'\U1F63E'
+emoji[crying_cat_face]=$'\U1F63F'
+emoji[weary_cat_face]=$'\U1F640'
+emoji[slightly_frowning_face]=$'\U1F641'
+emoji[slightly_smiling_face]=$'\U1F642'
+emoji[upside_down_face]=$'\U1F643'
+emoji[face_with_rolling_eyes]=$'\U1F644'
+emoji[face_with_no_good_gesture]=$'\U1F645'
+emoji[face_with_ok_gesture]=$'\U1F646'
+emoji[person_bowing_deeply]=$'\U1F647'
+emoji[see_no_evil_monkey]=$'\U1F648'
+emoji[hear_no_evil_monkey]=$'\U1F649'
+emoji[speak_no_evil_monkey]=$'\U1F64A'
+emoji[happy_person_raising_one_hand]=$'\U1F64B'
+emoji[person_raising_both_hands_in_celebration]=$'\U1F64C'
+emoji[person_frowning]=$'\U1F64D'
+emoji[person_with_pouting_face]=$'\U1F64E'
+emoji[person_with_folded_hands]=$'\U1F64F'
+emoji[rocket]=$'\U1F680'
+emoji[helicopter]=$'\U1F681'
+emoji[steam_locomotive]=$'\U1F682'
+emoji[railway_car]=$'\U1F683'
+emoji[high_speed_train]=$'\U1F684'
+emoji[high_speed_train_with_bullet_nose]=$'\U1F685'
+emoji[train]=$'\U1F686'
+emoji[metro]=$'\U1F687'
+emoji[light_rail]=$'\U1F688'
+emoji[station]=$'\U1F689'
+emoji[tram]=$'\U1F68A'
+emoji[tram_car]=$'\U1F68B'
+emoji[bus]=$'\U1F68C'
+emoji[oncoming_bus]=$'\U1F68D'
+emoji[trolleybus]=$'\U1F68E'
+emoji[bus_stop]=$'\U1F68F'
+emoji[minibus]=$'\U1F690'
+emoji[ambulance]=$'\U1F691'
+emoji[fire_engine]=$'\U1F692'
+emoji[police_car]=$'\U1F693'
+emoji[oncoming_police_car]=$'\U1F694'
+emoji[taxi]=$'\U1F695'
+emoji[oncoming_taxi]=$'\U1F696'
+emoji[automobile]=$'\U1F697'
+emoji[oncoming_automobile]=$'\U1F698'
+emoji[recreational_vehicle]=$'\U1F699'
+emoji[delivery_truck]=$'\U1F69A'
+emoji[articulated_lorry]=$'\U1F69B'
+emoji[tractor]=$'\U1F69C'
+emoji[monorail]=$'\U1F69D'
+emoji[mountain_railway]=$'\U1F69E'
+emoji[suspension_railway]=$'\U1F69F'
+emoji[mountain_cableway]=$'\U1F6A0'
+emoji[aerial_tramway]=$'\U1F6A1'
+emoji[ship]=$'\U1F6A2'
+emoji[rowboat]=$'\U1F6A3'
+emoji[speedboat]=$'\U1F6A4'
+emoji[horizontal_traffic_light]=$'\U1F6A5'
+emoji[vertical_traffic_light]=$'\U1F6A6'
+emoji[construction_sign]=$'\U1F6A7'
+emoji[police_cars_revolving_light]=$'\U1F6A8'
+emoji[triangular_flag_on_post]=$'\U1F6A9'
+emoji[door]=$'\U1F6AA'
+emoji[no_entry_sign]=$'\U1F6AB'
+emoji[smoking_symbol]=$'\U1F6AC'
+emoji[no_smoking_symbol]=$'\U1F6AD'
+emoji[put_litter_in_its_place_symbol]=$'\U1F6AE'
+emoji[do_not_litter_symbol]=$'\U1F6AF'
+emoji[potable_water_symbol]=$'\U1F6B0'
+emoji[non_potable_water_symbol]=$'\U1F6B1'
+emoji[bicycle]=$'\U1F6B2'
+emoji[no_bicycles]=$'\U1F6B3'
+emoji[bicyclist]=$'\U1F6B4'
+emoji[mountain_bicyclist]=$'\U1F6B5'
+emoji[pedestrian]=$'\U1F6B6'
+emoji[no_pedestrians]=$'\U1F6B7'
+emoji[children_crossing]=$'\U1F6B8'
+emoji[mens_symbol]=$'\U1F6B9'
+emoji[womens_symbol]=$'\U1F6BA'
+emoji[restroom]=$'\U1F6BB'
+emoji[baby_symbol]=$'\U1F6BC'
+emoji[toilet]=$'\U1F6BD'
+emoji[water_closet]=$'\U1F6BE'
+emoji[shower]=$'\U1F6BF'
+emoji[bath]=$'\U1F6C0'
+emoji[bathtub]=$'\U1F6C1'
+emoji[passport_control]=$'\U1F6C2'
+emoji[customs]=$'\U1F6C3'
+emoji[baggage_claim]=$'\U1F6C4'
+emoji[left_luggage]=$'\U1F6C5'
+emoji[couch_and_lamp]=$'\U1F6CB'
+emoji[sleeping_accommodation]=$'\U1F6CC'
+emoji[shopping_bags]=$'\U1F6CD'
+emoji[bellhop_bell]=$'\U1F6CE'
+emoji[bed]=$'\U1F6CF'
+emoji[place_of_worship]=$'\U1F6D0'
+emoji[hammer_and_wrench]=$'\U1F6E0'
+emoji[shield]=$'\U1F6E1'
+emoji[oil_drum]=$'\U1F6E2'
+emoji[motorway]=$'\U1F6E3'
+emoji[railway_track]=$'\U1F6E4'
+emoji[motor_boat]=$'\U1F6E5'
+emoji[small_airplane]=$'\U1F6E9'
+emoji[airplane_departure]=$'\U1F6EB'
+emoji[airplane_arriving]=$'\U1F6EC'
+emoji[satellite]=$'\U1F6F0'
+emoji[passenger_ship]=$'\U1F6F3'
+emoji[zipper_mouth_face]=$'\U1F910'
+emoji[money_mouth_face]=$'\U1F911'
+emoji[face_with_thermometer]=$'\U1F912'
+emoji[nerd_face]=$'\U1F913'
+emoji[thinking_face]=$'\U1F914'
+emoji[face_with_head_bandage]=$'\U1F915'
+emoji[robot_face]=$'\U1F916'
+emoji[hugging_face]=$'\U1F917'
+emoji[sign_of_the_horns]=$'\U1F918'
+emoji[crab]=$'\U1F980'
+emoji[lion_face]=$'\U1F981'
+emoji[scorpion]=$'\U1F982'
+emoji[turkey]=$'\U1F983'
+emoji[unicorn_face]=$'\U1F984'
+emoji[cheese_wedge]=$'\U1F9C0'
+emoji[keycap_number_sign]=$'\U0023\U20E3'
+emoji[keycap_asterisk]=$'\U002A\U20E3'
+emoji[keycap_digit_zero]=$'\U0030\U20E3'
+emoji[keycap_digit_one]=$'\U0031\U20E3'
+emoji[keycap_digit_two]=$'\U0032\U20E3'
+emoji[keycap_digit_three]=$'\U0033\U20E3'
+emoji[keycap_digit_four]=$'\U0034\U20E3'
+emoji[keycap_digit_five]=$'\U0035\U20E3'
+emoji[keycap_digit_six]=$'\U0036\U20E3'
+emoji[keycap_digit_seven]=$'\U0037\U20E3'
+emoji[keycap_digit_eight]=$'\U0038\U20E3'
+emoji[keycap_digit_nine]=$'\U0039\U20E3'
+emoji_flags[Ascension_Island]=$'\U1F1E6\U1F1E8'
+emoji_flags[Andorra]=$'\U1F1E6\U1F1E9'
+emoji_flags[United_Arab_Emirates]=$'\U1F1E6\U1F1EA'
+emoji_flags[Afghanistan]=$'\U1F1E6\U1F1EB'
+emoji_flags[Antigua___Barbuda]=$'\U1F1E6\U1F1EC'
+emoji_flags[Anguilla]=$'\U1F1E6\U1F1EE'
+emoji_flags[Albania]=$'\U1F1E6\U1F1F1'
+emoji_flags[Armenia]=$'\U1F1E6\U1F1F2'
+emoji_flags[Angola]=$'\U1F1E6\U1F1F4'
+emoji_flags[Antarctica]=$'\U1F1E6\U1F1F6'
+emoji_flags[Argentina]=$'\U1F1E6\U1F1F7'
+emoji_flags[American_Samoa]=$'\U1F1E6\U1F1F8'
+emoji_flags[Austria]=$'\U1F1E6\U1F1F9'
+emoji_flags[Australia]=$'\U1F1E6\U1F1FA'
+emoji_flags[Aruba]=$'\U1F1E6\U1F1FC'
+emoji_flags[Ã_land_Islands]=$'\U1F1E6\U1F1FD'
+emoji_flags[Azerbaijan]=$'\U1F1E6\U1F1FF'
+emoji_flags[Bosnia___Herzegovina]=$'\U1F1E7\U1F1E6'
+emoji_flags[Barbados]=$'\U1F1E7\U1F1E7'
+emoji_flags[Bangladesh]=$'\U1F1E7\U1F1E9'
+emoji_flags[Belgium]=$'\U1F1E7\U1F1EA'
+emoji_flags[Burkina_Faso]=$'\U1F1E7\U1F1EB'
+emoji_flags[Bulgaria]=$'\U1F1E7\U1F1EC'
+emoji_flags[Bahrain]=$'\U1F1E7\U1F1ED'
+emoji_flags[Burundi]=$'\U1F1E7\U1F1EE'
+emoji_flags[Benin]=$'\U1F1E7\U1F1EF'
+emoji_flags[St__BarthÃ_lemy]=$'\U1F1E7\U1F1F1'
+emoji_flags[Bermuda]=$'\U1F1E7\U1F1F2'
+emoji_flags[Brunei]=$'\U1F1E7\U1F1F3'
+emoji_flags[Bolivia]=$'\U1F1E7\U1F1F4'
+emoji_flags[Caribbean_Netherlands]=$'\U1F1E7\U1F1F6'
+emoji_flags[Brazil]=$'\U1F1E7\U1F1F7'
+emoji_flags[Bahamas]=$'\U1F1E7\U1F1F8'
+emoji_flags[Bhutan]=$'\U1F1E7\U1F1F9'
+emoji_flags[Bouvet_Island]=$'\U1F1E7\U1F1FB'
+emoji_flags[Botswana]=$'\U1F1E7\U1F1FC'
+emoji_flags[Belarus]=$'\U1F1E7\U1F1FE'
+emoji_flags[Belize]=$'\U1F1E7\U1F1FF'
+emoji_flags[Canada]=$'\U1F1E8\U1F1E6'
+emoji_flags[Cocos__Islands]=$'\U1F1E8\U1F1E8'
+emoji_flags[Congo___Kinshasa]=$'\U1F1E8\U1F1E9'
+emoji_flags[Central_African_Republic]=$'\U1F1E8\U1F1EB'
+emoji_flags[Congo___Brazzaville]=$'\U1F1E8\U1F1EC'
+emoji_flags[Switzerland]=$'\U1F1E8\U1F1ED'
+emoji_flags[CÃ_te_dâ__Ivoire]=$'\U1F1E8\U1F1EE'
+emoji_flags[Cook_Islands]=$'\U1F1E8\U1F1F0'
+emoji_flags[Chile]=$'\U1F1E8\U1F1F1'
+emoji_flags[Cameroon]=$'\U1F1E8\U1F1F2'
+emoji_flags[China]=$'\U1F1E8\U1F1F3'
+emoji_flags[Colombia]=$'\U1F1E8\U1F1F4'
+emoji_flags[Clipperton_Island]=$'\U1F1E8\U1F1F5'
+emoji_flags[Costa_Rica]=$'\U1F1E8\U1F1F7'
+emoji_flags[Cuba]=$'\U1F1E8\U1F1FA'
+emoji_flags[Cape_Verde]=$'\U1F1E8\U1F1FB'
+emoji_flags[CuraÃ_ao]=$'\U1F1E8\U1F1FC'
+emoji_flags[Christmas_Island]=$'\U1F1E8\U1F1FD'
+emoji_flags[Cyprus]=$'\U1F1E8\U1F1FE'
+emoji_flags[Czech_Republic]=$'\U1F1E8\U1F1FF'
+emoji_flags[Germany]=$'\U1F1E9\U1F1EA'
+emoji_flags[Diego_Garcia]=$'\U1F1E9\U1F1EC'
+emoji_flags[Djibouti]=$'\U1F1E9\U1F1EF'
+emoji_flags[Denmark]=$'\U1F1E9\U1F1F0'
+emoji_flags[Dominica]=$'\U1F1E9\U1F1F2'
+emoji_flags[Dominican_Republic]=$'\U1F1E9\U1F1F4'
+emoji_flags[Algeria]=$'\U1F1E9\U1F1FF'
+emoji_flags[Ceuta___Melilla]=$'\U1F1EA\U1F1E6'
+emoji_flags[Ecuador]=$'\U1F1EA\U1F1E8'
+emoji_flags[Estonia]=$'\U1F1EA\U1F1EA'
+emoji_flags[Egypt]=$'\U1F1EA\U1F1EC'
+emoji_flags[Western_Sahara]=$'\U1F1EA\U1F1ED'
+emoji_flags[Eritrea]=$'\U1F1EA\U1F1F7'
+emoji_flags[Spain]=$'\U1F1EA\U1F1F8'
+emoji_flags[Ethiopia]=$'\U1F1EA\U1F1F9'
+emoji_flags[European_Union]=$'\U1F1EA\U1F1FA'
+emoji_flags[Finland]=$'\U1F1EB\U1F1EE'
+emoji_flags[Fiji]=$'\U1F1EB\U1F1EF'
+emoji_flags[Falkland_Islands]=$'\U1F1EB\U1F1F0'
+emoji_flags[Micronesia]=$'\U1F1EB\U1F1F2'
+emoji_flags[Faroe_Islands]=$'\U1F1EB\U1F1F4'
+emoji_flags[France]=$'\U1F1EB\U1F1F7'
+emoji_flags[Gabon]=$'\U1F1EC\U1F1E6'
+emoji_flags[United_Kingdom]=$'\U1F1EC\U1F1E7'
+emoji_flags[Grenada]=$'\U1F1EC\U1F1E9'
+emoji_flags[Georgia]=$'\U1F1EC\U1F1EA'
+emoji_flags[French_Guiana]=$'\U1F1EC\U1F1EB'
+emoji_flags[Guernsey]=$'\U1F1EC\U1F1EC'
+emoji_flags[Ghana]=$'\U1F1EC\U1F1ED'
+emoji_flags[Gibraltar]=$'\U1F1EC\U1F1EE'
+emoji_flags[Greenland]=$'\U1F1EC\U1F1F1'
+emoji_flags[Gambia]=$'\U1F1EC\U1F1F2'
+emoji_flags[Guinea]=$'\U1F1EC\U1F1F3'
+emoji_flags[Guadeloupe]=$'\U1F1EC\U1F1F5'
+emoji_flags[Equatorial_Guinea]=$'\U1F1EC\U1F1F6'
+emoji_flags[Greece]=$'\U1F1EC\U1F1F7'
+emoji_flags[South_Georgia___South_Sandwich_Islands]=$'\U1F1EC\U1F1F8'
+emoji_flags[Guatemala]=$'\U1F1EC\U1F1F9'
+emoji_flags[Guam]=$'\U1F1EC\U1F1FA'
+emoji_flags[Guinea_Bissau]=$'\U1F1EC\U1F1FC'
+emoji_flags[Guyana]=$'\U1F1EC\U1F1FE'
+emoji_flags[Hong_Kong]=$'\U1F1ED\U1F1F0'
+emoji_flags[Heard___McDonald_Islands]=$'\U1F1ED\U1F1F2'
+emoji_flags[Honduras]=$'\U1F1ED\U1F1F3'
+emoji_flags[Croatia]=$'\U1F1ED\U1F1F7'
+emoji_flags[Haiti]=$'\U1F1ED\U1F1F9'
+emoji_flags[Hungary]=$'\U1F1ED\U1F1FA'
+emoji_flags[Canary_Islands]=$'\U1F1EE\U1F1E8'
+emoji_flags[Indonesia]=$'\U1F1EE\U1F1E9'
+emoji_flags[Ireland]=$'\U1F1EE\U1F1EA'
+emoji_flags[Israel]=$'\U1F1EE\U1F1F1'
+emoji_flags[Isle_of_Man]=$'\U1F1EE\U1F1F2'
+emoji_flags[India]=$'\U1F1EE\U1F1F3'
+emoji_flags[British_Indian_Ocean_Territory]=$'\U1F1EE\U1F1F4'
+emoji_flags[Iraq]=$'\U1F1EE\U1F1F6'
+emoji_flags[Iran]=$'\U1F1EE\U1F1F7'
+emoji_flags[Iceland]=$'\U1F1EE\U1F1F8'
+emoji_flags[Italy]=$'\U1F1EE\U1F1F9'
+emoji_flags[Jersey]=$'\U1F1EF\U1F1EA'
+emoji_flags[Jamaica]=$'\U1F1EF\U1F1F2'
+emoji_flags[Jordan]=$'\U1F1EF\U1F1F4'
+emoji_flags[Japan]=$'\U1F1EF\U1F1F5'
+emoji_flags[Kenya]=$'\U1F1F0\U1F1EA'
+emoji_flags[Kyrgyzstan]=$'\U1F1F0\U1F1EC'
+emoji_flags[Cambodia]=$'\U1F1F0\U1F1ED'
+emoji_flags[Kiribati]=$'\U1F1F0\U1F1EE'
+emoji_flags[Comoros]=$'\U1F1F0\U1F1F2'
+emoji_flags[St__Kitts___Nevis]=$'\U1F1F0\U1F1F3'
+emoji_flags[North_Korea]=$'\U1F1F0\U1F1F5'
+emoji_flags[South_Korea]=$'\U1F1F0\U1F1F7'
+emoji_flags[Kuwait]=$'\U1F1F0\U1F1FC'
+emoji_flags[Cayman_Islands]=$'\U1F1F0\U1F1FE'
+emoji_flags[Kazakhstan]=$'\U1F1F0\U1F1FF'
+emoji_flags[Laos]=$'\U1F1F1\U1F1E6'
+emoji_flags[Lebanon]=$'\U1F1F1\U1F1E7'
+emoji_flags[St__Lucia]=$'\U1F1F1\U1F1E8'
+emoji_flags[Liechtenstein]=$'\U1F1F1\U1F1EE'
+emoji_flags[Sri_Lanka]=$'\U1F1F1\U1F1F0'
+emoji_flags[Liberia]=$'\U1F1F1\U1F1F7'
+emoji_flags[Lesotho]=$'\U1F1F1\U1F1F8'
+emoji_flags[Lithuania]=$'\U1F1F1\U1F1F9'
+emoji_flags[Luxembourg]=$'\U1F1F1\U1F1FA'
+emoji_flags[Latvia]=$'\U1F1F1\U1F1FB'
+emoji_flags[Libya]=$'\U1F1F1\U1F1FE'
+emoji_flags[Morocco]=$'\U1F1F2\U1F1E6'
+emoji_flags[Monaco]=$'\U1F1F2\U1F1E8'
+emoji_flags[Moldova]=$'\U1F1F2\U1F1E9'
+emoji_flags[Montenegro]=$'\U1F1F2\U1F1EA'
+emoji_flags[St__Martin]=$'\U1F1F2\U1F1EB'
+emoji_flags[Madagascar]=$'\U1F1F2\U1F1EC'
+emoji_flags[Marshall_Islands]=$'\U1F1F2\U1F1ED'
+emoji_flags[Macedonia]=$'\U1F1F2\U1F1F0'
+emoji_flags[Mali]=$'\U1F1F2\U1F1F1'
+emoji_flags[Myanmar]=$'\U1F1F2\U1F1F2'
+emoji_flags[Mongolia]=$'\U1F1F2\U1F1F3'
+emoji_flags[Macau]=$'\U1F1F2\U1F1F4'
+emoji_flags[Northern_Mariana_Islands]=$'\U1F1F2\U1F1F5'
+emoji_flags[Martinique]=$'\U1F1F2\U1F1F6'
+emoji_flags[Mauritania]=$'\U1F1F2\U1F1F7'
+emoji_flags[Montserrat]=$'\U1F1F2\U1F1F8'
+emoji_flags[Malta]=$'\U1F1F2\U1F1F9'
+emoji_flags[Mauritius]=$'\U1F1F2\U1F1FA'
+emoji_flags[Maldives]=$'\U1F1F2\U1F1FB'
+emoji_flags[Malawi]=$'\U1F1F2\U1F1FC'
+emoji_flags[Mexico]=$'\U1F1F2\U1F1FD'
+emoji_flags[Malaysia]=$'\U1F1F2\U1F1FE'
+emoji_flags[Mozambique]=$'\U1F1F2\U1F1FF'
+emoji_flags[Namibia]=$'\U1F1F3\U1F1E6'
+emoji_flags[New_Caledonia]=$'\U1F1F3\U1F1E8'
+emoji_flags[Niger]=$'\U1F1F3\U1F1EA'
+emoji_flags[Norfolk_Island]=$'\U1F1F3\U1F1EB'
+emoji_flags[Nigeria]=$'\U1F1F3\U1F1EC'
+emoji_flags[Nicaragua]=$'\U1F1F3\U1F1EE'
+emoji_flags[Netherlands]=$'\U1F1F3\U1F1F1'
+emoji_flags[Norway]=$'\U1F1F3\U1F1F4'
+emoji_flags[Nepal]=$'\U1F1F3\U1F1F5'
+emoji_flags[Nauru]=$'\U1F1F3\U1F1F7'
+emoji_flags[Niue]=$'\U1F1F3\U1F1FA'
+emoji_flags[New_Zealand]=$'\U1F1F3\U1F1FF'
+emoji_flags[Oman]=$'\U1F1F4\U1F1F2'
+emoji_flags[Panama]=$'\U1F1F5\U1F1E6'
+emoji_flags[Peru]=$'\U1F1F5\U1F1EA'
+emoji_flags[French_Polynesia]=$'\U1F1F5\U1F1EB'
+emoji_flags[Papua_New_Guinea]=$'\U1F1F5\U1F1EC'
+emoji_flags[Philippines]=$'\U1F1F5\U1F1ED'
+emoji_flags[Pakistan]=$'\U1F1F5\U1F1F0'
+emoji_flags[Poland]=$'\U1F1F5\U1F1F1'
+emoji_flags[St__Pierre___Miquelon]=$'\U1F1F5\U1F1F2'
+emoji_flags[Pitcairn_Islands]=$'\U1F1F5\U1F1F3'
+emoji_flags[Puerto_Rico]=$'\U1F1F5\U1F1F7'
+emoji_flags[Palestinian_Territories]=$'\U1F1F5\U1F1F8'
+emoji_flags[Portugal]=$'\U1F1F5\U1F1F9'
+emoji_flags[Palau]=$'\U1F1F5\U1F1FC'
+emoji_flags[Paraguay]=$'\U1F1F5\U1F1FE'
+emoji_flags[Qatar]=$'\U1F1F6\U1F1E6'
+emoji_flags[RÃ_union]=$'\U1F1F7\U1F1EA'
+emoji_flags[Romania]=$'\U1F1F7\U1F1F4'
+emoji_flags[Serbia]=$'\U1F1F7\U1F1F8'
+emoji_flags[Russia]=$'\U1F1F7\U1F1FA'
+emoji_flags[Rwanda]=$'\U1F1F7\U1F1FC'
+emoji_flags[Saudi_Arabia]=$'\U1F1F8\U1F1E6'
+emoji_flags[Solomon_Islands]=$'\U1F1F8\U1F1E7'
+emoji_flags[Seychelles]=$'\U1F1F8\U1F1E8'
+emoji_flags[Sudan]=$'\U1F1F8\U1F1E9'
+emoji_flags[Sweden]=$'\U1F1F8\U1F1EA'
+emoji_flags[Singapore]=$'\U1F1F8\U1F1EC'
+emoji_flags[St__Helena]=$'\U1F1F8\U1F1ED'
+emoji_flags[Slovenia]=$'\U1F1F8\U1F1EE'
+emoji_flags[Svalbard___Jan_Mayen]=$'\U1F1F8\U1F1EF'
+emoji_flags[Slovakia]=$'\U1F1F8\U1F1F0'
+emoji_flags[Sierra_Leone]=$'\U1F1F8\U1F1F1'
+emoji_flags[San_Marino]=$'\U1F1F8\U1F1F2'
+emoji_flags[Senegal]=$'\U1F1F8\U1F1F3'
+emoji_flags[Somalia]=$'\U1F1F8\U1F1F4'
+emoji_flags[Suriname]=$'\U1F1F8\U1F1F7'
+emoji_flags[South_Sudan]=$'\U1F1F8\U1F1F8'
+emoji_flags[SÃ_o_TomÃ____PrÃ_ncipe]=$'\U1F1F8\U1F1F9'
+emoji_flags[El_Salvador]=$'\U1F1F8\U1F1FB'
+emoji_flags[Sint_Maarten]=$'\U1F1F8\U1F1FD'
+emoji_flags[Syria]=$'\U1F1F8\U1F1FE'
+emoji_flags[Swaziland]=$'\U1F1F8\U1F1FF'
+emoji_flags[Tristan_da_Cunha]=$'\U1F1F9\U1F1E6'
+emoji_flags[Turks___Caicos_Islands]=$'\U1F1F9\U1F1E8'
+emoji_flags[Chad]=$'\U1F1F9\U1F1E9'
+emoji_flags[French_Southern_Territories]=$'\U1F1F9\U1F1EB'
+emoji_flags[Togo]=$'\U1F1F9\U1F1EC'
+emoji_flags[Thailand]=$'\U1F1F9\U1F1ED'
+emoji_flags[Tajikistan]=$'\U1F1F9\U1F1EF'
+emoji_flags[Tokelau]=$'\U1F1F9\U1F1F0'
+emoji_flags[Timor_Leste]=$'\U1F1F9\U1F1F1'
+emoji_flags[Turkmenistan]=$'\U1F1F9\U1F1F2'
+emoji_flags[Tunisia]=$'\U1F1F9\U1F1F3'
+emoji_flags[Tonga]=$'\U1F1F9\U1F1F4'
+emoji_flags[Turkey]=$'\U1F1F9\U1F1F7'
+emoji_flags[Trinidad___Tobago]=$'\U1F1F9\U1F1F9'
+emoji_flags[Tuvalu]=$'\U1F1F9\U1F1FB'
+emoji_flags[Taiwan]=$'\U1F1F9\U1F1FC'
+emoji_flags[Tanzania]=$'\U1F1F9\U1F1FF'
+emoji_flags[Ukraine]=$'\U1F1FA\U1F1E6'
+emoji_flags[Uganda]=$'\U1F1FA\U1F1EC'
+emoji_flags[U_S__Outlying_Islands]=$'\U1F1FA\U1F1F2'
+emoji_flags[United_States]=$'\U1F1FA\U1F1F8'
+emoji_flags[Uruguay]=$'\U1F1FA\U1F1FE'
+emoji_flags[Uzbekistan]=$'\U1F1FA\U1F1FF'
+emoji_flags[Vatican_City]=$'\U1F1FB\U1F1E6'
+emoji_flags[St__Vincent___Grenadines]=$'\U1F1FB\U1F1E8'
+emoji_flags[Venezuela]=$'\U1F1FB\U1F1EA'
+emoji_flags[British_Virgin_Islands]=$'\U1F1FB\U1F1EC'
+emoji_flags[U_S__Virgin_Islands]=$'\U1F1FB\U1F1EE'
+emoji_flags[Vietnam]=$'\U1F1FB\U1F1F3'
+emoji_flags[Vanuatu]=$'\U1F1FB\U1F1FA'
+emoji_flags[Wallis___Futuna]=$'\U1F1FC\U1F1EB'
+emoji_flags[Samoa]=$'\U1F1FC\U1F1F8'
+emoji_flags[Kosovo]=$'\U1F1FD\U1F1F0'
+emoji_flags[Yemen]=$'\U1F1FE\U1F1EA'
+emoji_flags[Mayotte]=$'\U1F1FE\U1F1F9'
+emoji_flags[South_Africa]=$'\U1F1FF\U1F1E6'
+emoji_flags[Zambia]=$'\U1F1FF\U1F1F2'
+emoji_flags[Zimbabwe]=$'\U1F1FF\U1F1FC'
+
diff --git a/plugins/emoji/emoji-data.txt b/plugins/emoji/emoji-data.txt
new file mode 100644
index 000000000..7b4c015f7
--- /dev/null
+++ b/plugins/emoji/emoji-data.txt
@@ -0,0 +1,1308 @@
+# DRAFT emoji-data.txt
+# For details about the format and other information, see /../../../reports/tr51/index.html#Data_Files.
+#
+# Format: Code ; Default_Emoji_Style ; Emoji_Level ; Emoji_Modifier_Status ; Emoji_Sources # Comment
+#
+# Field 1 — Default_Emoji_Style:
+# text: default text presentation
+# emoji: default emoji presentation
+# Field 2 — Emoji_Level:
+# L1: level 1 emoji
+# L2: level 2 emoji
+# NA: not applicable
+# Field 3 — Emoji_Modifier_Status:
+# modifier: an emoji modifier
+# primary: a primary emoji modifier base
+# secondary: a secondary emoji modifier base
+# none: not applicable
+# Field 4 — Emoji_Sources:
+# one or more values from {z, a, j, w, x}
+# see the key in http://www.unicode.org/draft/reports/tr51/tr51.html#Major_Sources
+# NA: not applicable
+# Comment — currently contains the version where the character was first encoded,
+# followed by:
+# - a character name in uppercase (for a single character),
+# - a keycap name,
+# - an associated flag, where is associated with value unicode region code
+#
+00A9 ; text ; L1 ; none ; j # V1.1 (©) COPYRIGHT SIGN
+00AE ; text ; L1 ; none ; j # V1.1 (®) REGISTERED SIGN
+203C ; text ; L1 ; none ; a j # V1.1 (‼) DOUBLE EXCLAMATION MARK
+2049 ; text ; L1 ; none ; a j # V3.0 (â‰) EXCLAMATION QUESTION MARK
+2122 ; text ; L1 ; none ; j # V1.1 (â„¢) TRADE MARK SIGN
+2139 ; text ; L1 ; none ; j # V3.0 (ℹ) INFORMATION SOURCE
+2194 ; text ; L1 ; none ; z j # V1.1 (↔) LEFT RIGHT ARROW
+2195 ; text ; L1 ; none ; z j # V1.1 (↕) UP DOWN ARROW
+2196 ; text ; L1 ; none ; j # V1.1 (↖) NORTH WEST ARROW
+2197 ; text ; L1 ; none ; j # V1.1 (↗) NORTH EAST ARROW
+2198 ; text ; L1 ; none ; j # V1.1 (↘) SOUTH EAST ARROW
+2199 ; text ; L1 ; none ; j # V1.1 (↙) SOUTH WEST ARROW
+21A9 ; text ; L1 ; none ; j # V1.1 (↩) LEFTWARDS ARROW WITH HOOK
+21AA ; text ; L1 ; none ; j # V1.1 (↪) RIGHTWARDS ARROW WITH HOOK
+231A ; emoji ; L1 ; none ; j # V1.1 (⌚) WATCH
+231B ; emoji ; L1 ; none ; j # V1.1 (⌛) HOURGLASS
+2328 ; text ; L2 ; none ; x # V1.1 (⌨) KEYBOARD
+23CF ; text ; L2 ; none ; x # V4.0 (â) EJECT SYMBOL
+23E9 ; emoji ; L1 ; none ; j w # V6.0 (â©) BLACK RIGHT-POINTING DOUBLE TRIANGLE
+23EA ; emoji ; L1 ; none ; j w # V6.0 (âª) BLACK LEFT-POINTING DOUBLE TRIANGLE
+23EB ; emoji ; L1 ; none ; j # V6.0 (â«) BLACK UP-POINTING DOUBLE TRIANGLE
+23EC ; emoji ; L1 ; none ; j # V6.0 (â¬) BLACK DOWN-POINTING DOUBLE TRIANGLE
+23ED ; text ; L2 ; none ; w # V6.0 (â­) BLACK RIGHT-POINTING DOUBLE TRIANGLE WITH VERTICAL BAR
+23EE ; text ; L2 ; none ; w # V6.0 (â®) BLACK LEFT-POINTING DOUBLE TRIANGLE WITH VERTICAL BAR
+23EF ; text ; L2 ; none ; x # V6.0 (â¯) BLACK RIGHT-POINTING TRIANGLE WITH DOUBLE VERTICAL BAR
+23F0 ; emoji ; L1 ; none ; j # V6.0 (â°) ALARM CLOCK
+23F1 ; text ; L2 ; none ; x # V6.0 (â±) STOPWATCH
+23F2 ; text ; L2 ; none ; x # V6.0 (â²) TIMER CLOCK
+23F3 ; emoji ; L1 ; none ; j w # V6.0 (â³) HOURGLASS WITH FLOWING SAND
+23F8 ; text ; L2 ; none ; w # V7.0 (â¸) DOUBLE VERTICAL BAR
+23F9 ; text ; L2 ; none ; w # V7.0 (â¹) BLACK SQUARE FOR STOP
+23FA ; text ; L2 ; none ; w # V7.0 (âº) BLACK CIRCLE FOR RECORD
+24C2 ; text ; L1 ; none ; j # V1.1 (â“‚) CIRCLED LATIN CAPITAL LETTER M
+25AA ; text ; L1 ; none ; j w # V1.1 (â–ª) BLACK SMALL SQUARE
+25AB ; text ; L1 ; none ; j # V1.1 (â–«) WHITE SMALL SQUARE
+25B6 ; text ; L1 ; none ; a j w # V1.1 (â–¶) BLACK RIGHT-POINTING TRIANGLE
+25C0 ; text ; L1 ; none ; a j w # V1.1 (â—€) BLACK LEFT-POINTING TRIANGLE
+25FB ; text ; L1 ; none ; j # V3.2 (â—») WHITE MEDIUM SQUARE
+25FC ; text ; L1 ; none ; j w # V3.2 (â—¼) BLACK MEDIUM SQUARE
+25FD ; emoji ; L1 ; none ; j # V3.2 (â—½) WHITE MEDIUM SMALL SQUARE
+25FE ; emoji ; L1 ; none ; j w # V3.2 (â—¾) BLACK MEDIUM SMALL SQUARE
+2600 ; text ; L1 ; none ; a j # V1.1 (☀) BLACK SUN WITH RAYS
+2601 ; text ; L1 ; none ; a j w # V1.1 (â˜) CLOUD
+2602 ; text ; L2 ; none ; a # V1.1 (☂) UMBRELLA
+2603 ; text ; L2 ; none ; a # V1.1 (☃) SNOWMAN
+2604 ; text ; L2 ; none ; x # V1.1 (☄) COMET
+260E ; text ; L1 ; none ; z a j # V1.1 (☎) BLACK TELEPHONE
+2611 ; text ; L1 ; none ; j w # V1.1 (☑) BALLOT BOX WITH CHECK
+2614 ; emoji ; L1 ; none ; a j # V4.0 (☔) UMBRELLA WITH RAIN DROPS
+2615 ; emoji ; L1 ; none ; j # V4.0 (☕) HOT BEVERAGE
+2618 ; text ; L2 ; none ; x # V4.1 (☘) SHAMROCK
+261D ; text ; L1 ; secondary ; j w # V1.1 (â˜) WHITE UP POINTING INDEX
+2620 ; text ; L2 ; none ; x # V1.1 (☠) SKULL AND CROSSBONES
+2622 ; text ; L2 ; none ; x # V1.1 (☢) RADIOACTIVE SIGN
+2623 ; text ; L2 ; none ; x # V1.1 (☣) BIOHAZARD SIGN
+2626 ; text ; L2 ; none ; x # V1.1 (☦) ORTHODOX CROSS
+262A ; text ; L2 ; none ; w # V1.1 (☪) STAR AND CRESCENT
+262E ; text ; L2 ; none ; x # V1.1 (☮) PEACE SYMBOL
+262F ; text ; L2 ; none ; w # V1.1 (☯) YIN YANG
+2638 ; text ; L2 ; none ; w # V1.1 (☸) WHEEL OF DHARMA
+2639 ; text ; L2 ; secondary ; w # V1.1 (☹) WHITE FROWNING FACE
+263A ; text ; L1 ; secondary ; j w # V1.1 (☺) WHITE SMILING FACE
+2648 ; emoji ; L1 ; none ; j w # V1.1 (♈) ARIES
+2649 ; emoji ; L1 ; none ; j w # V1.1 (♉) TAURUS
+264A ; emoji ; L1 ; none ; j w # V1.1 (♊) GEMINI
+264B ; emoji ; L1 ; none ; j w # V1.1 (♋) CANCER
+264C ; emoji ; L1 ; none ; j w # V1.1 (♌) LEO
+264D ; emoji ; L1 ; none ; j w # V1.1 (â™) VIRGO
+264E ; emoji ; L1 ; none ; j w # V1.1 (♎) LIBRA
+264F ; emoji ; L1 ; none ; j w # V1.1 (â™) SCORPIUS
+2650 ; emoji ; L1 ; none ; j w # V1.1 (â™) SAGITTARIUS
+2651 ; emoji ; L1 ; none ; j w # V1.1 (♑) CAPRICORN
+2652 ; emoji ; L1 ; none ; j w # V1.1 (â™’) AQUARIUS
+2653 ; emoji ; L1 ; none ; j w # V1.1 (♓) PISCES
+2660 ; text ; L1 ; none ; z a j # V1.1 (â™ ) BLACK SPADE SUIT
+2663 ; text ; L1 ; none ; z a j # V1.1 (♣) BLACK CLUB SUIT
+2665 ; text ; L1 ; none ; z a j # V1.1 (♥) BLACK HEART SUIT
+2666 ; text ; L1 ; none ; z a j # V1.1 (♦) BLACK DIAMOND SUIT
+2668 ; text ; L1 ; none ; a j # V1.1 (♨) HOT SPRINGS
+267B ; text ; L1 ; none ; j # V3.2 (â™») BLACK UNIVERSAL RECYCLING SYMBOL
+267F ; emoji ; L1 ; none ; j w # V4.1 (♿) WHEELCHAIR SYMBOL
+2692 ; text ; L2 ; none ; x # V4.1 (âš’) HAMMER AND PICK
+2693 ; emoji ; L1 ; none ; a j # V4.1 (âš“) ANCHOR
+2694 ; text ; L2 ; none ; x # V4.1 (âš”) CROSSED SWORDS
+2696 ; text ; L2 ; none ; x # V4.1 (âš–) SCALES
+2697 ; text ; L2 ; none ; x # V4.1 (âš—) ALEMBIC
+2699 ; text ; L2 ; none ; x # V4.1 (âš™) GEAR
+269B ; text ; L2 ; none ; x # V4.1 (âš›) ATOM SYMBOL
+269C ; text ; L2 ; none ; x # V4.1 (⚜) FLEUR-DE-LIS
+26A0 ; text ; L1 ; none ; j # V4.0 (âš ) WARNING SIGN
+26A1 ; emoji ; L1 ; none ; a j # V4.0 (âš¡) HIGH VOLTAGE SIGN
+26AA ; emoji ; L1 ; none ; j # V4.1 (⚪) MEDIUM WHITE CIRCLE
+26AB ; emoji ; L1 ; none ; j w # V4.1 (âš«) MEDIUM BLACK CIRCLE
+26B0 ; text ; L2 ; none ; x # V4.1 (âš°) COFFIN
+26B1 ; text ; L2 ; none ; x # V4.1 (âš±) FUNERAL URN
+26BD ; emoji ; L1 ; none ; j # V5.2 (âš½) SOCCER BALL
+26BE ; emoji ; L1 ; none ; a j # V5.2 (âš¾) BASEBALL
+26C4 ; emoji ; L1 ; none ; a j # V5.2 (⛄) SNOWMAN WITHOUT SNOW
+26C5 ; emoji ; L1 ; none ; a j # V5.2 (â›…) SUN BEHIND CLOUD
+26C8 ; text ; L2 ; none ; a # V5.2 (⛈) THUNDER CLOUD AND RAIN
+26CE ; emoji ; L1 ; none ; a j # V6.0 (⛎) OPHIUCHUS
+26CF ; text ; L2 ; none ; a # V5.2 (â›) PICK
+26D1 ; text ; L2 ; none ; a # V5.2 (⛑) HELMET WITH WHITE CROSS
+26D3 ; text ; L2 ; none ; a # V5.2 (⛓) CHAINS
+26D4 ; emoji ; L1 ; none ; a j # V5.2 (â›”) NO ENTRY
+26E9 ; text ; L2 ; none ; a # V5.2 (⛩) SHINTO SHRINE
+26EA ; emoji ; L1 ; none ; a j # V5.2 (⛪) CHURCH
+26F0 ; text ; L2 ; none ; a # V5.2 (â›°) MOUNTAIN
+26F1 ; text ; L2 ; none ; a # V5.2 (â›±) UMBRELLA ON GROUND
+26F2 ; emoji ; L1 ; none ; a j # V5.2 (⛲) FOUNTAIN
+26F3 ; emoji ; L1 ; none ; a j w # V5.2 (⛳) FLAG IN HOLE
+26F4 ; text ; L2 ; none ; a # V5.2 (â›´) FERRY
+26F5 ; emoji ; L1 ; none ; a j # V5.2 (⛵) SAILBOAT
+26F7 ; text ; L2 ; none ; a w # V5.2 (â›·) SKIER
+26F8 ; text ; L2 ; none ; a # V5.2 (⛸) ICE SKATE
+26F9 ; text ; L2 ; none ; a # V5.2 (⛹) PERSON WITH BALL
+26FA ; emoji ; L1 ; none ; a j # V5.2 (⛺) TENT
+26FD ; emoji ; L1 ; none ; a j # V5.2 (⛽) FUEL PUMP
+2702 ; text ; L1 ; none ; z j w # V1.1 (✂) BLACK SCISSORS
+2705 ; emoji ; L1 ; none ; j # V6.0 (✅) WHITE HEAVY CHECK MARK
+2708 ; text ; L1 ; none ; z a j w # V1.1 (✈) AIRPLANE
+2709 ; text ; L1 ; none ; z j # V1.1 (✉) ENVELOPE
+270A ; emoji ; L1 ; secondary ; j # V6.0 (✊) RAISED FIST
+270B ; emoji ; L1 ; secondary ; j # V6.0 (✋) RAISED HAND
+270C ; text ; L1 ; secondary ; z j w # V1.1 (✌) VICTORY HAND
+270D ; text ; L2 ; secondary ; z w # V1.1 (âœ) WRITING HAND
+270F ; text ; L1 ; none ; z j # V1.1 (âœ) PENCIL
+2712 ; text ; L1 ; none ; z j # V1.1 (✒) BLACK NIB
+2714 ; text ; L1 ; none ; z j w # V1.1 (✔) HEAVY CHECK MARK
+2716 ; text ; L1 ; none ; z j # V1.1 (✖) HEAVY MULTIPLICATION X
+271D ; text ; L2 ; none ; w # V1.1 (âœ) LATIN CROSS
+2721 ; text ; L2 ; none ; w # V1.1 (✡) STAR OF DAVID
+2728 ; emoji ; L1 ; none ; j # V6.0 (✨) SPARKLES
+2733 ; text ; L1 ; none ; z j # V1.1 (✳) EIGHT SPOKED ASTERISK
+2734 ; text ; L1 ; none ; z j # V1.1 (✴) EIGHT POINTED BLACK STAR
+2744 ; text ; L1 ; none ; z j w # V1.1 (â„) SNOWFLAKE
+2747 ; text ; L1 ; none ; z j # V1.1 (â‡) SPARKLE
+274C ; emoji ; L1 ; none ; j # V6.0 (âŒ) CROSS MARK
+274E ; emoji ; L1 ; none ; j # V6.0 (âŽ) NEGATIVE SQUARED CROSS MARK
+2753 ; emoji ; L1 ; none ; j w # V6.0 (â“) BLACK QUESTION MARK ORNAMENT
+2754 ; emoji ; L1 ; none ; j # V6.0 (â”) WHITE QUESTION MARK ORNAMENT
+2755 ; emoji ; L1 ; none ; j # V6.0 (â•) WHITE EXCLAMATION MARK ORNAMENT
+2757 ; emoji ; L1 ; none ; j # V5.2 (â—) HEAVY EXCLAMATION MARK SYMBOL
+2763 ; text ; L2 ; none ; z # V1.1 (â£) HEAVY HEART EXCLAMATION MARK ORNAMENT
+2764 ; text ; L1 ; none ; z j # V1.1 (â¤) HEAVY BLACK HEART
+2795 ; emoji ; L1 ; none ; j # V6.0 (âž•) HEAVY PLUS SIGN
+2796 ; emoji ; L1 ; none ; j # V6.0 (âž–) HEAVY MINUS SIGN
+2797 ; emoji ; L1 ; none ; j # V6.0 (âž—) HEAVY DIVISION SIGN
+27A1 ; text ; L1 ; none ; z a j # V1.1 (âž¡) BLACK RIGHTWARDS ARROW
+27B0 ; emoji ; L1 ; none ; j # V6.0 (âž°) CURLY LOOP
+27BF ; emoji ; L1 ; none ; x # V6.0 (âž¿) DOUBLE CURLY LOOP
+2934 ; text ; L1 ; none ; j # V3.2 (⤴) ARROW POINTING RIGHTWARDS THEN CURVING UPWARDS
+2935 ; text ; L1 ; none ; j # V3.2 (⤵) ARROW POINTING RIGHTWARDS THEN CURVING DOWNWARDS
+2B05 ; text ; L1 ; none ; a j # V4.0 (⬅) LEFTWARDS BLACK ARROW
+2B06 ; text ; L1 ; none ; a j # V4.0 (⬆) UPWARDS BLACK ARROW
+2B07 ; text ; L1 ; none ; a j # V4.0 (⬇) DOWNWARDS BLACK ARROW
+2B1B ; emoji ; L1 ; none ; a j w # V5.1 (⬛) BLACK LARGE SQUARE
+2B1C ; emoji ; L1 ; none ; j w # V5.1 (⬜) WHITE LARGE SQUARE
+2B50 ; emoji ; L1 ; none ; j # V5.1 (â­) WHITE MEDIUM STAR
+2B55 ; emoji ; L1 ; none ; j # V5.2 (â­•) HEAVY LARGE CIRCLE
+3030 ; text ; L1 ; none ; j # V1.1 (〰) WAVY DASH
+303D ; text ; L1 ; none ; j # V3.2 (〽) PART ALTERNATION MARK
+3297 ; text ; L1 ; none ; j # V1.1 (㊗) CIRCLED IDEOGRAPH CONGRATULATION
+3299 ; text ; L1 ; none ; a j # V1.1 (㊙) CIRCLED IDEOGRAPH SECRET
+1F004 ; emoji ; L1 ; none ; j # V5.1 (🀄) MAHJONG TILE RED DRAGON
+1F0CF ; emoji ; L1 ; none ; j # V6.0 (ðŸƒ) PLAYING CARD BLACK JOKER
+1F170 ; text ; L1 ; none ; j # V6.0 (🅰) NEGATIVE SQUARED LATIN CAPITAL LETTER A
+1F171 ; text ; L1 ; none ; j # V6.0 (🅱) NEGATIVE SQUARED LATIN CAPITAL LETTER B
+1F17E ; text ; L1 ; none ; j # V6.0 (🅾) NEGATIVE SQUARED LATIN CAPITAL LETTER O
+1F17F ; text ; L1 ; none ; a j # V5.2 (🅿) NEGATIVE SQUARED LATIN CAPITAL LETTER P
+1F18E ; emoji ; L1 ; none ; j # V6.0 (🆎) NEGATIVE SQUARED AB
+1F191 ; emoji ; L1 ; none ; j # V6.0 (🆑) SQUARED CL
+1F192 ; emoji ; L1 ; none ; j # V6.0 (🆒) SQUARED COOL
+1F193 ; emoji ; L1 ; none ; j # V6.0 (🆓) SQUARED FREE
+1F194 ; emoji ; L1 ; none ; j # V6.0 (🆔) SQUARED ID
+1F195 ; emoji ; L1 ; none ; j # V6.0 (🆕) SQUARED NEW
+1F196 ; emoji ; L1 ; none ; j # V6.0 (🆖) SQUARED NG
+1F197 ; emoji ; L1 ; none ; j # V6.0 (🆗) SQUARED OK
+1F198 ; emoji ; L1 ; none ; j # V6.0 (🆘) SQUARED SOS
+1F199 ; emoji ; L1 ; none ; j # V6.0 (🆙) SQUARED UP WITH EXCLAMATION MARK
+1F19A ; emoji ; L1 ; none ; j # V6.0 (🆚) SQUARED VS
+1F201 ; emoji ; L1 ; none ; j # V6.0 (ðŸˆ) SQUARED KATAKANA KOKO
+1F202 ; text ; L1 ; none ; j # V6.0 (🈂) SQUARED KATAKANA SA
+1F21A ; emoji ; L1 ; none ; a j # V5.2 (🈚) SQUARED CJK UNIFIED IDEOGRAPH-7121
+1F22F ; emoji ; L1 ; none ; a j # V5.2 (🈯) SQUARED CJK UNIFIED IDEOGRAPH-6307
+1F232 ; emoji ; L1 ; none ; j # V6.0 (🈲) SQUARED CJK UNIFIED IDEOGRAPH-7981
+1F233 ; emoji ; L1 ; none ; j # V6.0 (🈳) SQUARED CJK UNIFIED IDEOGRAPH-7A7A
+1F234 ; emoji ; L1 ; none ; j # V6.0 (🈴) SQUARED CJK UNIFIED IDEOGRAPH-5408
+1F235 ; emoji ; L1 ; none ; j # V6.0 (🈵) SQUARED CJK UNIFIED IDEOGRAPH-6E80
+1F236 ; emoji ; L1 ; none ; j # V6.0 (🈶) SQUARED CJK UNIFIED IDEOGRAPH-6709
+1F237 ; text ; L1 ; none ; j # V6.0 (🈷) SQUARED CJK UNIFIED IDEOGRAPH-6708
+1F238 ; emoji ; L1 ; none ; j # V6.0 (🈸) SQUARED CJK UNIFIED IDEOGRAPH-7533
+1F239 ; emoji ; L1 ; none ; j # V6.0 (🈹) SQUARED CJK UNIFIED IDEOGRAPH-5272
+1F23A ; emoji ; L1 ; none ; j # V6.0 (🈺) SQUARED CJK UNIFIED IDEOGRAPH-55B6
+1F250 ; emoji ; L1 ; none ; j # V6.0 (ðŸ‰) CIRCLED IDEOGRAPH ADVANTAGE
+1F251 ; emoji ; L1 ; none ; j # V6.0 (🉑) CIRCLED IDEOGRAPH ACCEPT
+1F300 ; emoji ; L1 ; none ; j # V6.0 (🌀) CYCLONE
+1F301 ; emoji ; L1 ; none ; j # V6.0 (ðŸŒ) FOGGY
+1F302 ; emoji ; L1 ; none ; j # V6.0 (🌂) CLOSED UMBRELLA
+1F303 ; emoji ; L1 ; none ; j # V6.0 (🌃) NIGHT WITH STARS
+1F304 ; emoji ; L1 ; none ; j # V6.0 (🌄) SUNRISE OVER MOUNTAINS
+1F305 ; emoji ; L1 ; none ; j # V6.0 (🌅) SUNRISE
+1F306 ; emoji ; L1 ; none ; j # V6.0 (🌆) CITYSCAPE AT DUSK
+1F307 ; emoji ; L1 ; none ; j # V6.0 (🌇) SUNSET OVER BUILDINGS
+1F308 ; emoji ; L1 ; none ; j # V6.0 (🌈) RAINBOW
+1F309 ; emoji ; L1 ; none ; j # V6.0 (🌉) BRIDGE AT NIGHT
+1F30A ; emoji ; L1 ; none ; j # V6.0 (🌊) WATER WAVE
+1F30B ; emoji ; L1 ; none ; j # V6.0 (🌋) VOLCANO
+1F30C ; emoji ; L1 ; none ; j # V6.0 (🌌) MILKY WAY
+1F30D ; emoji ; L1 ; none ; w # V6.0 (ðŸŒ) EARTH GLOBE EUROPE-AFRICA
+1F30E ; emoji ; L1 ; none ; w # V6.0 (🌎) EARTH GLOBE AMERICAS
+1F30F ; emoji ; L1 ; none ; j w # V6.0 (ðŸŒ) EARTH GLOBE ASIA-AUSTRALIA
+1F310 ; emoji ; L1 ; none ; x # V6.0 (ðŸŒ) GLOBE WITH MERIDIANS
+1F311 ; emoji ; L1 ; none ; j # V6.0 (🌑) NEW MOON SYMBOL
+1F312 ; emoji ; L1 ; none ; x # V6.0 (🌒) WAXING CRESCENT MOON SYMBOL
+1F313 ; emoji ; L1 ; none ; j # V6.0 (🌓) FIRST QUARTER MOON SYMBOL
+1F314 ; emoji ; L1 ; none ; j # V6.0 (🌔) WAXING GIBBOUS MOON SYMBOL
+1F315 ; emoji ; L1 ; none ; j w # V6.0 (🌕) FULL MOON SYMBOL
+1F316 ; emoji ; L1 ; none ; x # V6.0 (🌖) WANING GIBBOUS MOON SYMBOL
+1F317 ; emoji ; L1 ; none ; x # V6.0 (🌗) LAST QUARTER MOON SYMBOL
+1F318 ; emoji ; L1 ; none ; x # V6.0 (🌘) WANING CRESCENT MOON SYMBOL
+1F319 ; emoji ; L1 ; none ; j # V6.0 (🌙) CRESCENT MOON
+1F31A ; emoji ; L1 ; none ; x # V6.0 (🌚) NEW MOON WITH FACE
+1F31B ; emoji ; L1 ; none ; j # V6.0 (🌛) FIRST QUARTER MOON WITH FACE
+1F31C ; emoji ; L1 ; none ; w # V6.0 (🌜) LAST QUARTER MOON WITH FACE
+1F31D ; emoji ; L1 ; none ; x # V6.0 (ðŸŒ) FULL MOON WITH FACE
+1F31E ; emoji ; L1 ; none ; x # V6.0 (🌞) SUN WITH FACE
+1F31F ; emoji ; L1 ; none ; j # V6.0 (🌟) GLOWING STAR
+1F320 ; emoji ; L1 ; none ; j # V6.0 (🌠) SHOOTING STAR
+1F321 ; text ; L2 ; none ; w # V7.0 (🌡) THERMOMETER
+1F324 ; text ; L2 ; none ; w # V7.0 (🌤) WHITE SUN WITH SMALL CLOUD
+1F325 ; text ; L2 ; none ; w # V7.0 (🌥) WHITE SUN BEHIND CLOUD
+1F326 ; text ; L2 ; none ; w # V7.0 (🌦) WHITE SUN BEHIND CLOUD WITH RAIN
+1F327 ; text ; L2 ; none ; w # V7.0 (🌧) CLOUD WITH RAIN
+1F328 ; text ; L2 ; none ; w # V7.0 (🌨) CLOUD WITH SNOW
+1F329 ; text ; L2 ; none ; w # V7.0 (🌩) CLOUD WITH LIGHTNING
+1F32A ; text ; L2 ; none ; w # V7.0 (🌪) CLOUD WITH TORNADO
+1F32B ; text ; L2 ; none ; w # V7.0 (🌫) FOG
+1F32C ; text ; L2 ; none ; w # V7.0 (🌬) WIND BLOWING FACE
+1F32D ; emoji ; L2 ; none ; x # V8.0 (🌭) HOT DOG
+1F32E ; emoji ; L2 ; none ; x # V8.0 (🌮) TACO
+1F32F ; emoji ; L2 ; none ; x # V8.0 (🌯) BURRITO
+1F330 ; emoji ; L1 ; none ; j # V6.0 (🌰) CHESTNUT
+1F331 ; emoji ; L1 ; none ; j # V6.0 (🌱) SEEDLING
+1F332 ; emoji ; L1 ; none ; x # V6.0 (🌲) EVERGREEN TREE
+1F333 ; emoji ; L1 ; none ; x # V6.0 (🌳) DECIDUOUS TREE
+1F334 ; emoji ; L1 ; none ; j # V6.0 (🌴) PALM TREE
+1F335 ; emoji ; L1 ; none ; j # V6.0 (🌵) CACTUS
+1F336 ; text ; L2 ; none ; w # V7.0 (🌶) HOT PEPPER
+1F337 ; emoji ; L1 ; none ; j # V6.0 (🌷) TULIP
+1F338 ; emoji ; L1 ; none ; j # V6.0 (🌸) CHERRY BLOSSOM
+1F339 ; emoji ; L1 ; none ; j # V6.0 (🌹) ROSE
+1F33A ; emoji ; L1 ; none ; j # V6.0 (🌺) HIBISCUS
+1F33B ; emoji ; L1 ; none ; j # V6.0 (🌻) SUNFLOWER
+1F33C ; emoji ; L1 ; none ; j # V6.0 (🌼) BLOSSOM
+1F33D ; emoji ; L1 ; none ; j # V6.0 (🌽) EAR OF MAIZE
+1F33E ; emoji ; L1 ; none ; j # V6.0 (🌾) EAR OF RICE
+1F33F ; emoji ; L1 ; none ; j # V6.0 (🌿) HERB
+1F340 ; emoji ; L1 ; none ; j # V6.0 (ðŸ€) FOUR LEAF CLOVER
+1F341 ; emoji ; L1 ; none ; j # V6.0 (ðŸ) MAPLE LEAF
+1F342 ; emoji ; L1 ; none ; j # V6.0 (ðŸ‚) FALLEN LEAF
+1F343 ; emoji ; L1 ; none ; j # V6.0 (ðŸƒ) LEAF FLUTTERING IN WIND
+1F344 ; emoji ; L1 ; none ; j # V6.0 (ðŸ„) MUSHROOM
+1F345 ; emoji ; L1 ; none ; j # V6.0 (ðŸ…) TOMATO
+1F346 ; emoji ; L1 ; none ; j # V6.0 (ðŸ†) AUBERGINE
+1F347 ; emoji ; L1 ; none ; j # V6.0 (ðŸ‡) GRAPES
+1F348 ; emoji ; L1 ; none ; j # V6.0 (ðŸˆ) MELON
+1F349 ; emoji ; L1 ; none ; j # V6.0 (ðŸ‰) WATERMELON
+1F34A ; emoji ; L1 ; none ; j # V6.0 (ðŸŠ) TANGERINE
+1F34B ; emoji ; L1 ; none ; x # V6.0 (ðŸ‹) LEMON
+1F34C ; emoji ; L1 ; none ; j # V6.0 (ðŸŒ) BANANA
+1F34D ; emoji ; L1 ; none ; j # V6.0 (ðŸ) PINEAPPLE
+1F34E ; emoji ; L1 ; none ; j # V6.0 (ðŸŽ) RED APPLE
+1F34F ; emoji ; L1 ; none ; j # V6.0 (ðŸ) GREEN APPLE
+1F350 ; emoji ; L1 ; none ; x # V6.0 (ðŸ) PEAR
+1F351 ; emoji ; L1 ; none ; j # V6.0 (ðŸ‘) PEACH
+1F352 ; emoji ; L1 ; none ; j # V6.0 (ðŸ’) CHERRIES
+1F353 ; emoji ; L1 ; none ; j # V6.0 (ðŸ“) STRAWBERRY
+1F354 ; emoji ; L1 ; none ; j # V6.0 (ðŸ”) HAMBURGER
+1F355 ; emoji ; L1 ; none ; j # V6.0 (ðŸ•) SLICE OF PIZZA
+1F356 ; emoji ; L1 ; none ; j # V6.0 (ðŸ–) MEAT ON BONE
+1F357 ; emoji ; L1 ; none ; j # V6.0 (ðŸ—) POULTRY LEG
+1F358 ; emoji ; L1 ; none ; j # V6.0 (ðŸ˜) RICE CRACKER
+1F359 ; emoji ; L1 ; none ; j # V6.0 (ðŸ™) RICE BALL
+1F35A ; emoji ; L1 ; none ; j # V6.0 (ðŸš) COOKED RICE
+1F35B ; emoji ; L1 ; none ; j # V6.0 (ðŸ›) CURRY AND RICE
+1F35C ; emoji ; L1 ; none ; j # V6.0 (ðŸœ) STEAMING BOWL
+1F35D ; emoji ; L1 ; none ; j # V6.0 (ðŸ) SPAGHETTI
+1F35E ; emoji ; L1 ; none ; j # V6.0 (ðŸž) BREAD
+1F35F ; emoji ; L1 ; none ; j # V6.0 (ðŸŸ) FRENCH FRIES
+1F360 ; emoji ; L1 ; none ; j # V6.0 (ðŸ ) ROASTED SWEET POTATO
+1F361 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¡) DANGO
+1F362 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¢) ODEN
+1F363 ; emoji ; L1 ; none ; j # V6.0 (ðŸ£) SUSHI
+1F364 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¤) FRIED SHRIMP
+1F365 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¥) FISH CAKE WITH SWIRL DESIGN
+1F366 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¦) SOFT ICE CREAM
+1F367 ; emoji ; L1 ; none ; j # V6.0 (ðŸ§) SHAVED ICE
+1F368 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¨) ICE CREAM
+1F369 ; emoji ; L1 ; none ; j # V6.0 (ðŸ©) DOUGHNUT
+1F36A ; emoji ; L1 ; none ; j # V6.0 (ðŸª) COOKIE
+1F36B ; emoji ; L1 ; none ; j # V6.0 (ðŸ«) CHOCOLATE BAR
+1F36C ; emoji ; L1 ; none ; j # V6.0 (ðŸ¬) CANDY
+1F36D ; emoji ; L1 ; none ; j # V6.0 (ðŸ­) LOLLIPOP
+1F36E ; emoji ; L1 ; none ; j # V6.0 (ðŸ®) CUSTARD
+1F36F ; emoji ; L1 ; none ; j # V6.0 (ðŸ¯) HONEY POT
+1F370 ; emoji ; L1 ; none ; j # V6.0 (ðŸ°) SHORTCAKE
+1F371 ; emoji ; L1 ; none ; j # V6.0 (ðŸ±) BENTO BOX
+1F372 ; emoji ; L1 ; none ; j # V6.0 (ðŸ²) POT OF FOOD
+1F373 ; emoji ; L1 ; none ; j # V6.0 (ðŸ³) COOKING
+1F374 ; emoji ; L1 ; none ; j # V6.0 (ðŸ´) FORK AND KNIFE
+1F375 ; emoji ; L1 ; none ; j # V6.0 (ðŸµ) TEACUP WITHOUT HANDLE
+1F376 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¶) SAKE BOTTLE AND CUP
+1F377 ; emoji ; L1 ; none ; j # V6.0 (ðŸ·) WINE GLASS
+1F378 ; emoji ; L1 ; none ; j w # V6.0 (ðŸ¸) COCKTAIL GLASS
+1F379 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¹) TROPICAL DRINK
+1F37A ; emoji ; L1 ; none ; j # V6.0 (ðŸº) BEER MUG
+1F37B ; emoji ; L1 ; none ; j # V6.0 (ðŸ») CLINKING BEER MUGS
+1F37C ; emoji ; L1 ; none ; x # V6.0 (ðŸ¼) BABY BOTTLE
+1F37D ; text ; L2 ; none ; w # V7.0 (ðŸ½) FORK AND KNIFE WITH PLATE
+1F37E ; emoji ; L2 ; none ; x # V8.0 (ðŸ¾) BOTTLE WITH POPPING CORK
+1F37F ; emoji ; L2 ; none ; x # V8.0 (ðŸ¿) POPCORN
+1F380 ; emoji ; L1 ; none ; j # V6.0 (🎀) RIBBON
+1F381 ; emoji ; L1 ; none ; j # V6.0 (ðŸŽ) WRAPPED PRESENT
+1F382 ; emoji ; L1 ; none ; j # V6.0 (🎂) BIRTHDAY CAKE
+1F383 ; emoji ; L1 ; none ; j # V6.0 (🎃) JACK-O-LANTERN
+1F384 ; emoji ; L1 ; none ; j # V6.0 (🎄) CHRISTMAS TREE
+1F385 ; emoji ; L1 ; primary ; j # V6.0 (🎅) FATHER CHRISTMAS
+1F386 ; emoji ; L1 ; none ; j # V6.0 (🎆) FIREWORKS
+1F387 ; emoji ; L1 ; none ; j # V6.0 (🎇) FIREWORK SPARKLER
+1F388 ; emoji ; L1 ; none ; j # V6.0 (🎈) BALLOON
+1F389 ; emoji ; L1 ; none ; j # V6.0 (🎉) PARTY POPPER
+1F38A ; emoji ; L1 ; none ; j # V6.0 (🎊) CONFETTI BALL
+1F38B ; emoji ; L1 ; none ; j # V6.0 (🎋) TANABATA TREE
+1F38C ; emoji ; L1 ; none ; j # V6.0 (🎌) CROSSED FLAGS
+1F38D ; emoji ; L1 ; none ; j # V6.0 (ðŸŽ) PINE DECORATION
+1F38E ; emoji ; L1 ; none ; j # V6.0 (🎎) JAPANESE DOLLS
+1F38F ; emoji ; L1 ; none ; j # V6.0 (ðŸŽ) CARP STREAMER
+1F390 ; emoji ; L1 ; none ; j # V6.0 (ðŸŽ) WIND CHIME
+1F391 ; emoji ; L1 ; none ; j # V6.0 (🎑) MOON VIEWING CEREMONY
+1F392 ; emoji ; L1 ; none ; j # V6.0 (🎒) SCHOOL SATCHEL
+1F393 ; emoji ; L1 ; none ; j w # V6.0 (🎓) GRADUATION CAP
+1F396 ; text ; L2 ; none ; w # V7.0 (🎖) MILITARY MEDAL
+1F397 ; text ; L2 ; none ; w # V7.0 (🎗) REMINDER RIBBON
+1F399 ; text ; L2 ; none ; w # V7.0 (🎙) STUDIO MICROPHONE
+1F39A ; text ; L2 ; none ; w # V7.0 (🎚) LEVEL SLIDER
+1F39B ; text ; L2 ; none ; w # V7.0 (🎛) CONTROL KNOBS
+1F39E ; text ; L2 ; none ; w # V7.0 (🎞) FILM FRAMES
+1F39F ; text ; L2 ; none ; w # V7.0 (🎟) ADMISSION TICKETS
+1F3A0 ; emoji ; L1 ; none ; j # V6.0 (🎠) CAROUSEL HORSE
+1F3A1 ; emoji ; L1 ; none ; j # V6.0 (🎡) FERRIS WHEEL
+1F3A2 ; emoji ; L1 ; none ; j # V6.0 (🎢) ROLLER COASTER
+1F3A3 ; emoji ; L1 ; none ; j # V6.0 (🎣) FISHING POLE AND FISH
+1F3A4 ; emoji ; L1 ; none ; j # V6.0 (🎤) MICROPHONE
+1F3A5 ; emoji ; L1 ; none ; j # V6.0 (🎥) MOVIE CAMERA
+1F3A6 ; emoji ; L1 ; none ; j # V6.0 (🎦) CINEMA
+1F3A7 ; emoji ; L1 ; none ; j w # V6.0 (🎧) HEADPHONE
+1F3A8 ; emoji ; L1 ; none ; j # V6.0 (🎨) ARTIST PALETTE
+1F3A9 ; emoji ; L1 ; none ; j # V6.0 (🎩) TOP HAT
+1F3AA ; emoji ; L1 ; none ; j # V6.0 (🎪) CIRCUS TENT
+1F3AB ; emoji ; L1 ; none ; j # V6.0 (🎫) TICKET
+1F3AC ; emoji ; L1 ; none ; j w # V6.0 (🎬) CLAPPER BOARD
+1F3AD ; emoji ; L1 ; none ; j w # V6.0 (🎭) PERFORMING ARTS
+1F3AE ; emoji ; L1 ; none ; j w # V6.0 (🎮) VIDEO GAME
+1F3AF ; emoji ; L1 ; none ; j # V6.0 (🎯) DIRECT HIT
+1F3B0 ; emoji ; L1 ; none ; j # V6.0 (🎰) SLOT MACHINE
+1F3B1 ; emoji ; L1 ; none ; j # V6.0 (🎱) BILLIARDS
+1F3B2 ; emoji ; L1 ; none ; j # V6.0 (🎲) GAME DIE
+1F3B3 ; emoji ; L1 ; none ; j # V6.0 (🎳) BOWLING
+1F3B4 ; emoji ; L1 ; none ; j # V6.0 (🎴) FLOWER PLAYING CARDS
+1F3B5 ; emoji ; L1 ; none ; j # V6.0 (🎵) MUSICAL NOTE
+1F3B6 ; emoji ; L1 ; none ; j # V6.0 (🎶) MULTIPLE MUSICAL NOTES
+1F3B7 ; emoji ; L1 ; none ; j # V6.0 (🎷) SAXOPHONE
+1F3B8 ; emoji ; L1 ; none ; j # V6.0 (🎸) GUITAR
+1F3B9 ; emoji ; L1 ; none ; j # V6.0 (🎹) MUSICAL KEYBOARD
+1F3BA ; emoji ; L1 ; none ; j # V6.0 (🎺) TRUMPET
+1F3BB ; emoji ; L1 ; none ; j # V6.0 (🎻) VIOLIN
+1F3BC ; emoji ; L1 ; none ; j # V6.0 (🎼) MUSICAL SCORE
+1F3BD ; emoji ; L1 ; none ; j # V6.0 (🎽) RUNNING SHIRT WITH SASH
+1F3BE ; emoji ; L1 ; none ; j # V6.0 (🎾) TENNIS RACQUET AND BALL
+1F3BF ; emoji ; L1 ; none ; j # V6.0 (🎿) SKI AND SKI BOOT
+1F3C0 ; emoji ; L1 ; none ; j # V6.0 (ðŸ€) BASKETBALL AND HOOP
+1F3C1 ; emoji ; L1 ; none ; j # V6.0 (ðŸ) CHEQUERED FLAG
+1F3C2 ; emoji ; L1 ; secondary ; j w # V6.0 (ðŸ‚) SNOWBOARDER
+1F3C3 ; emoji ; L1 ; secondary ; j # V6.0 (ðŸƒ) RUNNER
+1F3C4 ; emoji ; L1 ; secondary ; j w # V6.0 (ðŸ„) SURFER
+1F3C5 ; emoji ; L2 ; none ; x # V7.0 (ðŸ…) SPORTS MEDAL
+1F3C6 ; emoji ; L1 ; none ; j w # V6.0 (ðŸ†) TROPHY
+1F3C7 ; emoji ; L1 ; secondary ; x # V6.0 (ðŸ‡) HORSE RACING
+1F3C8 ; emoji ; L1 ; none ; j # V6.0 (ðŸˆ) AMERICAN FOOTBALL
+1F3C9 ; emoji ; L1 ; none ; x # V6.0 (ðŸ‰) RUGBY FOOTBALL
+1F3CA ; emoji ; L1 ; secondary ; j w # V6.0 (ðŸŠ) SWIMMER
+1F3CB ; text ; L2 ; none ; w # V7.0 (ðŸ‹) WEIGHT LIFTER
+1F3CC ; text ; L2 ; none ; w # V7.0 (ðŸŒ) GOLFER
+1F3CD ; text ; L2 ; none ; w # V7.0 (ðŸ) RACING MOTORCYCLE
+1F3CE ; text ; L2 ; none ; w # V7.0 (ðŸŽ) RACING CAR
+1F3CF ; emoji ; L2 ; none ; x # V8.0 (ðŸ) CRICKET BAT AND BALL
+1F3D0 ; emoji ; L2 ; none ; x # V8.0 (ðŸ) VOLLEYBALL
+1F3D1 ; emoji ; L2 ; none ; x # V8.0 (ðŸ‘) FIELD HOCKEY STICK AND BALL
+1F3D2 ; emoji ; L2 ; none ; x # V8.0 (ðŸ’) ICE HOCKEY STICK AND PUCK
+1F3D3 ; emoji ; L2 ; none ; x # V8.0 (ðŸ“) TABLE TENNIS PADDLE AND BALL
+1F3D4 ; text ; L2 ; none ; w # V7.0 (ðŸ”) SNOW CAPPED MOUNTAIN
+1F3D5 ; text ; L2 ; none ; w # V7.0 (ðŸ•) CAMPING
+1F3D6 ; text ; L2 ; none ; w # V7.0 (ðŸ–) BEACH WITH UMBRELLA
+1F3D7 ; text ; L2 ; none ; w # V7.0 (ðŸ—) BUILDING CONSTRUCTION
+1F3D8 ; text ; L2 ; none ; w # V7.0 (ðŸ˜) HOUSE BUILDINGS
+1F3D9 ; text ; L2 ; none ; w # V7.0 (ðŸ™) CITYSCAPE
+1F3DA ; text ; L2 ; none ; w # V7.0 (ðŸš) DERELICT HOUSE BUILDING
+1F3DB ; text ; L2 ; none ; w # V7.0 (ðŸ›) CLASSICAL BUILDING
+1F3DC ; text ; L2 ; none ; w # V7.0 (ðŸœ) DESERT
+1F3DD ; text ; L2 ; none ; w # V7.0 (ðŸ) DESERT ISLAND
+1F3DE ; text ; L2 ; none ; w # V7.0 (ðŸž) NATIONAL PARK
+1F3DF ; text ; L2 ; none ; w # V7.0 (ðŸŸ) STADIUM
+1F3E0 ; emoji ; L1 ; none ; j w # V6.0 (ðŸ ) HOUSE BUILDING
+1F3E1 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¡) HOUSE WITH GARDEN
+1F3E2 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¢) OFFICE BUILDING
+1F3E3 ; emoji ; L1 ; none ; j # V6.0 (ðŸ£) JAPANESE POST OFFICE
+1F3E4 ; emoji ; L1 ; none ; x # V6.0 (ðŸ¤) EUROPEAN POST OFFICE
+1F3E5 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¥) HOSPITAL
+1F3E6 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¦) BANK
+1F3E7 ; emoji ; L1 ; none ; j # V6.0 (ðŸ§) AUTOMATED TELLER MACHINE
+1F3E8 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¨) HOTEL
+1F3E9 ; emoji ; L1 ; none ; j # V6.0 (ðŸ©) LOVE HOTEL
+1F3EA ; emoji ; L1 ; none ; j # V6.0 (ðŸª) CONVENIENCE STORE
+1F3EB ; emoji ; L1 ; none ; j # V6.0 (ðŸ«) SCHOOL
+1F3EC ; emoji ; L1 ; none ; j # V6.0 (ðŸ¬) DEPARTMENT STORE
+1F3ED ; emoji ; L1 ; none ; j w # V6.0 (ðŸ­) FACTORY
+1F3EE ; emoji ; L1 ; none ; j # V6.0 (ðŸ®) IZAKAYA LANTERN
+1F3EF ; emoji ; L1 ; none ; j # V6.0 (ðŸ¯) JAPANESE CASTLE
+1F3F0 ; emoji ; L1 ; none ; j # V6.0 (ðŸ°) EUROPEAN CASTLE
+1F3F3 ; text ; L2 ; none ; w # V7.0 (ðŸ³) WAVING WHITE FLAG
+1F3F4 ; emoji ; L2 ; none ; x # V7.0 (ðŸ´) WAVING BLACK FLAG
+1F3F5 ; text ; L2 ; none ; w # V7.0 (ðŸµ) ROSETTE
+1F3F7 ; text ; L2 ; none ; w # V7.0 (ðŸ·) LABEL
+1F3F8 ; emoji ; L2 ; none ; x # V8.0 (ðŸ¸) BADMINTON RACQUET AND SHUTTLECOCK
+1F3F9 ; emoji ; L2 ; none ; x # V8.0 (ðŸ¹) BOW AND ARROW
+1F3FA ; emoji ; L2 ; none ; x # V8.0 (ðŸº) AMPHORA
+1F3FB ; emoji ; L2 ; modifier ; x # V8.0 (ðŸ») EMOJI MODIFIER FITZPATRICK TYPE-1-2
+1F3FC ; emoji ; L2 ; modifier ; x # V8.0 (ðŸ¼) EMOJI MODIFIER FITZPATRICK TYPE-3
+1F3FD ; emoji ; L2 ; modifier ; x # V8.0 (ðŸ½) EMOJI MODIFIER FITZPATRICK TYPE-4
+1F3FE ; emoji ; L2 ; modifier ; x # V8.0 (ðŸ¾) EMOJI MODIFIER FITZPATRICK TYPE-5
+1F3FF ; emoji ; L2 ; modifier ; x # V8.0 (ðŸ¿) EMOJI MODIFIER FITZPATRICK TYPE-6
+1F400 ; emoji ; L1 ; none ; x # V6.0 (ðŸ€) RAT
+1F401 ; emoji ; L1 ; none ; x # V6.0 (ðŸ) MOUSE
+1F402 ; emoji ; L1 ; none ; x # V6.0 (ðŸ‚) OX
+1F403 ; emoji ; L1 ; none ; x # V6.0 (ðŸƒ) WATER BUFFALO
+1F404 ; emoji ; L1 ; none ; x # V6.0 (ðŸ„) COW
+1F405 ; emoji ; L1 ; none ; x # V6.0 (ðŸ…) TIGER
+1F406 ; emoji ; L1 ; none ; x # V6.0 (ðŸ†) LEOPARD
+1F407 ; emoji ; L1 ; none ; x # V6.0 (ðŸ‡) RABBIT
+1F408 ; emoji ; L1 ; none ; w # V6.0 (ðŸˆ) CAT
+1F409 ; emoji ; L1 ; none ; x # V6.0 (ðŸ‰) DRAGON
+1F40A ; emoji ; L1 ; none ; x # V6.0 (ðŸŠ) CROCODILE
+1F40B ; emoji ; L1 ; none ; x # V6.0 (ðŸ‹) WHALE
+1F40C ; emoji ; L1 ; none ; j # V6.0 (ðŸŒ) SNAIL
+1F40D ; emoji ; L1 ; none ; j # V6.0 (ðŸ) SNAKE
+1F40E ; emoji ; L1 ; none ; j # V6.0 (ðŸŽ) HORSE
+1F40F ; emoji ; L1 ; none ; x # V6.0 (ðŸ) RAM
+1F410 ; emoji ; L1 ; none ; x # V6.0 (ðŸ) GOAT
+1F411 ; emoji ; L1 ; none ; j # V6.0 (ðŸ‘) SHEEP
+1F412 ; emoji ; L1 ; none ; j # V6.0 (ðŸ’) MONKEY
+1F413 ; emoji ; L1 ; none ; x # V6.0 (ðŸ“) ROOSTER
+1F414 ; emoji ; L1 ; none ; j # V6.0 (ðŸ”) CHICKEN
+1F415 ; emoji ; L1 ; none ; w # V6.0 (ðŸ•) DOG
+1F416 ; emoji ; L1 ; none ; x # V6.0 (ðŸ–) PIG
+1F417 ; emoji ; L1 ; none ; j # V6.0 (ðŸ—) BOAR
+1F418 ; emoji ; L1 ; none ; j # V6.0 (ðŸ˜) ELEPHANT
+1F419 ; emoji ; L1 ; none ; j # V6.0 (ðŸ™) OCTOPUS
+1F41A ; emoji ; L1 ; none ; j # V6.0 (ðŸš) SPIRAL SHELL
+1F41B ; emoji ; L1 ; none ; j # V6.0 (ðŸ›) BUG
+1F41C ; emoji ; L1 ; none ; j # V6.0 (ðŸœ) ANT
+1F41D ; emoji ; L1 ; none ; j # V6.0 (ðŸ) HONEYBEE
+1F41E ; emoji ; L1 ; none ; j # V6.0 (ðŸž) LADY BEETLE
+1F41F ; emoji ; L1 ; none ; j w # V6.0 (ðŸŸ) FISH
+1F420 ; emoji ; L1 ; none ; j # V6.0 (ðŸ ) TROPICAL FISH
+1F421 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¡) BLOWFISH
+1F422 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¢) TURTLE
+1F423 ; emoji ; L1 ; none ; j # V6.0 (ðŸ£) HATCHING CHICK
+1F424 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¤) BABY CHICK
+1F425 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¥) FRONT-FACING BABY CHICK
+1F426 ; emoji ; L1 ; none ; j w # V6.0 (ðŸ¦) BIRD
+1F427 ; emoji ; L1 ; none ; j # V6.0 (ðŸ§) PENGUIN
+1F428 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¨) KOALA
+1F429 ; emoji ; L1 ; none ; j # V6.0 (ðŸ©) POODLE
+1F42A ; emoji ; L1 ; none ; x # V6.0 (ðŸª) DROMEDARY CAMEL
+1F42B ; emoji ; L1 ; none ; j # V6.0 (ðŸ«) BACTRIAN CAMEL
+1F42C ; emoji ; L1 ; none ; j # V6.0 (ðŸ¬) DOLPHIN
+1F42D ; emoji ; L1 ; none ; j # V6.0 (ðŸ­) MOUSE FACE
+1F42E ; emoji ; L1 ; none ; j # V6.0 (ðŸ®) COW FACE
+1F42F ; emoji ; L1 ; none ; j # V6.0 (ðŸ¯) TIGER FACE
+1F430 ; emoji ; L1 ; none ; j # V6.0 (ðŸ°) RABBIT FACE
+1F431 ; emoji ; L1 ; none ; j # V6.0 (ðŸ±) CAT FACE
+1F432 ; emoji ; L1 ; none ; j # V6.0 (ðŸ²) DRAGON FACE
+1F433 ; emoji ; L1 ; none ; j # V6.0 (ðŸ³) SPOUTING WHALE
+1F434 ; emoji ; L1 ; none ; j # V6.0 (ðŸ´) HORSE FACE
+1F435 ; emoji ; L1 ; none ; j # V6.0 (ðŸµ) MONKEY FACE
+1F436 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¶) DOG FACE
+1F437 ; emoji ; L1 ; none ; j # V6.0 (ðŸ·) PIG FACE
+1F438 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¸) FROG FACE
+1F439 ; emoji ; L1 ; none ; j # V6.0 (ðŸ¹) HAMSTER FACE
+1F43A ; emoji ; L1 ; none ; j # V6.0 (ðŸº) WOLF FACE
+1F43B ; emoji ; L1 ; none ; j # V6.0 (ðŸ») BEAR FACE
+1F43C ; emoji ; L1 ; none ; j # V6.0 (ðŸ¼) PANDA FACE
+1F43D ; emoji ; L1 ; none ; j # V6.0 (ðŸ½) PIG NOSE
+1F43E ; emoji ; L1 ; none ; j # V6.0 (ðŸ¾) PAW PRINTS
+1F43F ; text ; L2 ; none ; w # V7.0 (ðŸ¿) CHIPMUNK
+1F440 ; emoji ; L1 ; none ; j # V6.0 (👀) EYES
+1F441 ; text ; L2 ; none ; w # V7.0 (ðŸ‘) EYE
+1F442 ; emoji ; L1 ; secondary ; j w # V6.0 (👂) EAR
+1F443 ; emoji ; L1 ; secondary ; j # V6.0 (👃) NOSE
+1F444 ; emoji ; L1 ; none ; j # V6.0 (👄) MOUTH
+1F445 ; emoji ; L1 ; none ; j # V6.0 (👅) TONGUE
+1F446 ; emoji ; L1 ; secondary ; j w # V6.0 (👆) WHITE UP POINTING BACKHAND INDEX
+1F447 ; emoji ; L1 ; secondary ; j w # V6.0 (👇) WHITE DOWN POINTING BACKHAND INDEX
+1F448 ; emoji ; L1 ; secondary ; j w # V6.0 (👈) WHITE LEFT POINTING BACKHAND INDEX
+1F449 ; emoji ; L1 ; secondary ; j w # V6.0 (👉) WHITE RIGHT POINTING BACKHAND INDEX
+1F44A ; emoji ; L1 ; secondary ; j # V6.0 (👊) FISTED HAND SIGN
+1F44B ; emoji ; L1 ; secondary ; j # V6.0 (👋) WAVING HAND SIGN
+1F44C ; emoji ; L1 ; secondary ; j # V6.0 (👌) OK HAND SIGN
+1F44D ; emoji ; L1 ; secondary ; j w # V6.0 (ðŸ‘) THUMBS UP SIGN
+1F44E ; emoji ; L1 ; secondary ; j w # V6.0 (👎) THUMBS DOWN SIGN
+1F44F ; emoji ; L1 ; secondary ; j # V6.0 (ðŸ‘) CLAPPING HANDS SIGN
+1F450 ; emoji ; L1 ; secondary ; j # V6.0 (ðŸ‘) OPEN HANDS SIGN
+1F451 ; emoji ; L1 ; none ; j # V6.0 (👑) CROWN
+1F452 ; emoji ; L1 ; none ; j # V6.0 (👒) WOMANS HAT
+1F453 ; emoji ; L1 ; none ; j w # V6.0 (👓) EYEGLASSES
+1F454 ; emoji ; L1 ; none ; j # V6.0 (👔) NECKTIE
+1F455 ; emoji ; L1 ; none ; j # V6.0 (👕) T-SHIRT
+1F456 ; emoji ; L1 ; none ; j # V6.0 (👖) JEANS
+1F457 ; emoji ; L1 ; none ; j # V6.0 (👗) DRESS
+1F458 ; emoji ; L1 ; none ; j # V6.0 (👘) KIMONO
+1F459 ; emoji ; L1 ; none ; j # V6.0 (👙) BIKINI
+1F45A ; emoji ; L1 ; none ; j # V6.0 (👚) WOMANS CLOTHES
+1F45B ; emoji ; L1 ; none ; j # V6.0 (👛) PURSE
+1F45C ; emoji ; L1 ; none ; j # V6.0 (👜) HANDBAG
+1F45D ; emoji ; L1 ; none ; j # V6.0 (ðŸ‘) POUCH
+1F45E ; emoji ; L1 ; none ; j # V6.0 (👞) MANS SHOE
+1F45F ; emoji ; L1 ; none ; j # V6.0 (👟) ATHLETIC SHOE
+1F460 ; emoji ; L1 ; none ; j # V6.0 (👠) HIGH-HEELED SHOE
+1F461 ; emoji ; L1 ; none ; j # V6.0 (👡) WOMANS SANDAL
+1F462 ; emoji ; L1 ; none ; j # V6.0 (👢) WOMANS BOOTS
+1F463 ; emoji ; L1 ; none ; j # V6.0 (👣) FOOTPRINTS
+1F464 ; emoji ; L1 ; none ; j # V6.0 (👤) BUST IN SILHOUETTE
+1F465 ; emoji ; L1 ; none ; x # V6.0 (👥) BUSTS IN SILHOUETTE
+1F466 ; emoji ; L1 ; primary ; j # V6.0 (👦) BOY
+1F467 ; emoji ; L1 ; primary ; j # V6.0 (👧) GIRL
+1F468 ; emoji ; L1 ; primary ; j # V6.0 (👨) MAN
+1F469 ; emoji ; L1 ; primary ; j # V6.0 (👩) WOMAN
+1F46A ; emoji ; L1 ; none ; j w # V6.0 (👪) FAMILY
+1F46B ; emoji ; L1 ; none ; j # V6.0 (👫) MAN AND WOMAN HOLDING HANDS
+1F46C ; emoji ; L1 ; none ; x # V6.0 (👬) TWO MEN HOLDING HANDS
+1F46D ; emoji ; L1 ; none ; x # V6.0 (👭) TWO WOMEN HOLDING HANDS
+1F46E ; emoji ; L1 ; primary ; j # V6.0 (👮) POLICE OFFICER
+1F46F ; emoji ; L1 ; none ; j # V6.0 (👯) WOMAN WITH BUNNY EARS
+1F470 ; emoji ; L1 ; primary ; j # V6.0 (👰) BRIDE WITH VEIL
+1F471 ; emoji ; L1 ; primary ; j # V6.0 (👱) PERSON WITH BLOND HAIR
+1F472 ; emoji ; L1 ; primary ; j # V6.0 (👲) MAN WITH GUA PI MAO
+1F473 ; emoji ; L1 ; primary ; j # V6.0 (👳) MAN WITH TURBAN
+1F474 ; emoji ; L1 ; primary ; j # V6.0 (👴) OLDER MAN
+1F475 ; emoji ; L1 ; primary ; j # V6.0 (👵) OLDER WOMAN
+1F476 ; emoji ; L1 ; primary ; j # V6.0 (👶) BABY
+1F477 ; emoji ; L1 ; primary ; j # V6.0 (👷) CONSTRUCTION WORKER
+1F478 ; emoji ; L1 ; primary ; j # V6.0 (👸) PRINCESS
+1F479 ; emoji ; L1 ; none ; j # V6.0 (👹) JAPANESE OGRE
+1F47A ; emoji ; L1 ; none ; j # V6.0 (👺) JAPANESE GOBLIN
+1F47B ; emoji ; L1 ; none ; j # V6.0 (👻) GHOST
+1F47C ; emoji ; L1 ; primary ; j # V6.0 (👼) BABY ANGEL
+1F47D ; emoji ; L1 ; none ; j w # V6.0 (👽) EXTRATERRESTRIAL ALIEN
+1F47E ; emoji ; L1 ; none ; j # V6.0 (👾) ALIEN MONSTER
+1F47F ; emoji ; L1 ; secondary ; j # V6.0 (👿) IMP
+1F480 ; emoji ; L1 ; none ; j # V6.0 (💀) SKULL
+1F481 ; emoji ; L1 ; primary ; j # V6.0 (ðŸ’) INFORMATION DESK PERSON
+1F482 ; emoji ; L1 ; primary ; j # V6.0 (💂) GUARDSMAN
+1F483 ; emoji ; L1 ; secondary ; j # V6.0 (💃) DANCER
+1F484 ; emoji ; L1 ; none ; j # V6.0 (💄) LIPSTICK
+1F485 ; emoji ; L1 ; secondary ; j # V6.0 (💅) NAIL POLISH
+1F486 ; emoji ; L1 ; primary ; j # V6.0 (💆) FACE MASSAGE
+1F487 ; emoji ; L1 ; primary ; j # V6.0 (💇) HAIRCUT
+1F488 ; emoji ; L1 ; none ; j # V6.0 (💈) BARBER POLE
+1F489 ; emoji ; L1 ; none ; j # V6.0 (💉) SYRINGE
+1F48A ; emoji ; L1 ; none ; j # V6.0 (💊) PILL
+1F48B ; emoji ; L1 ; none ; j # V6.0 (💋) KISS MARK
+1F48C ; emoji ; L1 ; none ; j # V6.0 (💌) LOVE LETTER
+1F48D ; emoji ; L1 ; none ; j # V6.0 (ðŸ’) RING
+1F48E ; emoji ; L1 ; none ; j # V6.0 (💎) GEM STONE
+1F48F ; emoji ; L1 ; none ; j # V6.0 (ðŸ’) KISS
+1F490 ; emoji ; L1 ; none ; j # V6.0 (ðŸ’) BOUQUET
+1F491 ; emoji ; L1 ; none ; j # V6.0 (💑) COUPLE WITH HEART
+1F492 ; emoji ; L1 ; none ; j # V6.0 (💒) WEDDING
+1F493 ; emoji ; L1 ; none ; j # V6.0 (💓) BEATING HEART
+1F494 ; emoji ; L1 ; none ; j # V6.0 (💔) BROKEN HEART
+1F495 ; emoji ; L1 ; none ; j # V6.0 (💕) TWO HEARTS
+1F496 ; emoji ; L1 ; none ; j # V6.0 (💖) SPARKLING HEART
+1F497 ; emoji ; L1 ; none ; j # V6.0 (💗) GROWING HEART
+1F498 ; emoji ; L1 ; none ; j # V6.0 (💘) HEART WITH ARROW
+1F499 ; emoji ; L1 ; none ; j # V6.0 (💙) BLUE HEART
+1F49A ; emoji ; L1 ; none ; j # V6.0 (💚) GREEN HEART
+1F49B ; emoji ; L1 ; none ; j # V6.0 (💛) YELLOW HEART
+1F49C ; emoji ; L1 ; none ; j # V6.0 (💜) PURPLE HEART
+1F49D ; emoji ; L1 ; none ; j # V6.0 (ðŸ’) HEART WITH RIBBON
+1F49E ; emoji ; L1 ; none ; j # V6.0 (💞) REVOLVING HEARTS
+1F49F ; emoji ; L1 ; none ; j # V6.0 (💟) HEART DECORATION
+1F4A0 ; emoji ; L1 ; none ; j # V6.0 (💠) DIAMOND SHAPE WITH A DOT INSIDE
+1F4A1 ; emoji ; L1 ; none ; j # V6.0 (💡) ELECTRIC LIGHT BULB
+1F4A2 ; emoji ; L1 ; none ; j # V6.0 (💢) ANGER SYMBOL
+1F4A3 ; emoji ; L1 ; none ; j w # V6.0 (💣) BOMB
+1F4A4 ; emoji ; L1 ; none ; j # V6.0 (💤) SLEEPING SYMBOL
+1F4A5 ; emoji ; L1 ; none ; j # V6.0 (💥) COLLISION SYMBOL
+1F4A6 ; emoji ; L1 ; none ; j # V6.0 (💦) SPLASHING SWEAT SYMBOL
+1F4A7 ; emoji ; L1 ; none ; j # V6.0 (💧) DROPLET
+1F4A8 ; emoji ; L1 ; none ; j # V6.0 (💨) DASH SYMBOL
+1F4A9 ; emoji ; L1 ; none ; j # V6.0 (💩) PILE OF POO
+1F4AA ; emoji ; L1 ; secondary ; j # V6.0 (💪) FLEXED BICEPS
+1F4AB ; emoji ; L1 ; none ; j # V6.0 (💫) DIZZY SYMBOL
+1F4AC ; emoji ; L1 ; none ; j # V6.0 (💬) SPEECH BALLOON
+1F4AD ; emoji ; L1 ; none ; x # V6.0 (💭) THOUGHT BALLOON
+1F4AE ; emoji ; L1 ; none ; j # V6.0 (💮) WHITE FLOWER
+1F4AF ; emoji ; L1 ; none ; j # V6.0 (💯) HUNDRED POINTS SYMBOL
+1F4B0 ; emoji ; L1 ; none ; j w # V6.0 (💰) MONEY BAG
+1F4B1 ; emoji ; L1 ; none ; j # V6.0 (💱) CURRENCY EXCHANGE
+1F4B2 ; emoji ; L1 ; none ; j # V6.0 (💲) HEAVY DOLLAR SIGN
+1F4B3 ; emoji ; L1 ; none ; j w # V6.0 (💳) CREDIT CARD
+1F4B4 ; emoji ; L1 ; none ; j # V6.0 (💴) BANKNOTE WITH YEN SIGN
+1F4B5 ; emoji ; L1 ; none ; j # V6.0 (💵) BANKNOTE WITH DOLLAR SIGN
+1F4B6 ; emoji ; L1 ; none ; x # V6.0 (💶) BANKNOTE WITH EURO SIGN
+1F4B7 ; emoji ; L1 ; none ; x # V6.0 (💷) BANKNOTE WITH POUND SIGN
+1F4B8 ; emoji ; L1 ; none ; j # V6.0 (💸) MONEY WITH WINGS
+1F4B9 ; emoji ; L1 ; none ; j # V6.0 (💹) CHART WITH UPWARDS TREND AND YEN SIGN
+1F4BA ; emoji ; L1 ; none ; j # V6.0 (💺) SEAT
+1F4BB ; emoji ; L1 ; none ; j w # V6.0 (💻) PERSONAL COMPUTER
+1F4BC ; emoji ; L1 ; none ; j # V6.0 (💼) BRIEFCASE
+1F4BD ; emoji ; L1 ; none ; j # V6.0 (💽) MINIDISC
+1F4BE ; emoji ; L1 ; none ; j # V6.0 (💾) FLOPPY DISK
+1F4BF ; emoji ; L1 ; none ; j w # V6.0 (💿) OPTICAL DISC
+1F4C0 ; emoji ; L1 ; none ; j # V6.0 (📀) DVD
+1F4C1 ; emoji ; L1 ; none ; j # V6.0 (ðŸ“) FILE FOLDER
+1F4C2 ; emoji ; L1 ; none ; j # V6.0 (📂) OPEN FILE FOLDER
+1F4C3 ; emoji ; L1 ; none ; j # V6.0 (📃) PAGE WITH CURL
+1F4C4 ; emoji ; L1 ; none ; j # V6.0 (📄) PAGE FACING UP
+1F4C5 ; emoji ; L1 ; none ; j # V6.0 (📅) CALENDAR
+1F4C6 ; emoji ; L1 ; none ; j # V6.0 (📆) TEAR-OFF CALENDAR
+1F4C7 ; emoji ; L1 ; none ; j # V6.0 (📇) CARD INDEX
+1F4C8 ; emoji ; L1 ; none ; j # V6.0 (📈) CHART WITH UPWARDS TREND
+1F4C9 ; emoji ; L1 ; none ; j # V6.0 (📉) CHART WITH DOWNWARDS TREND
+1F4CA ; emoji ; L1 ; none ; j # V6.0 (📊) BAR CHART
+1F4CB ; emoji ; L1 ; none ; j w # V6.0 (📋) CLIPBOARD
+1F4CC ; emoji ; L1 ; none ; j # V6.0 (📌) PUSHPIN
+1F4CD ; emoji ; L1 ; none ; j # V6.0 (ðŸ“) ROUND PUSHPIN
+1F4CE ; emoji ; L1 ; none ; j # V6.0 (📎) PAPERCLIP
+1F4CF ; emoji ; L1 ; none ; j # V6.0 (ðŸ“) STRAIGHT RULER
+1F4D0 ; emoji ; L1 ; none ; j # V6.0 (ðŸ“) TRIANGULAR RULER
+1F4D1 ; emoji ; L1 ; none ; j # V6.0 (📑) BOOKMARK TABS
+1F4D2 ; emoji ; L1 ; none ; j # V6.0 (📒) LEDGER
+1F4D3 ; emoji ; L1 ; none ; j # V6.0 (📓) NOTEBOOK
+1F4D4 ; emoji ; L1 ; none ; j # V6.0 (📔) NOTEBOOK WITH DECORATIVE COVER
+1F4D5 ; emoji ; L1 ; none ; j # V6.0 (📕) CLOSED BOOK
+1F4D6 ; emoji ; L1 ; none ; j # V6.0 (📖) OPEN BOOK
+1F4D7 ; emoji ; L1 ; none ; j # V6.0 (📗) GREEN BOOK
+1F4D8 ; emoji ; L1 ; none ; j # V6.0 (📘) BLUE BOOK
+1F4D9 ; emoji ; L1 ; none ; j # V6.0 (📙) ORANGE BOOK
+1F4DA ; emoji ; L1 ; none ; j w # V6.0 (📚) BOOKS
+1F4DB ; emoji ; L1 ; none ; j # V6.0 (📛) NAME BADGE
+1F4DC ; emoji ; L1 ; none ; j # V6.0 (📜) SCROLL
+1F4DD ; emoji ; L1 ; none ; j # V6.0 (ðŸ“) MEMO
+1F4DE ; emoji ; L1 ; none ; j # V6.0 (📞) TELEPHONE RECEIVER
+1F4DF ; emoji ; L1 ; none ; j w # V6.0 (📟) PAGER
+1F4E0 ; emoji ; L1 ; none ; j # V6.0 (📠) FAX MACHINE
+1F4E1 ; emoji ; L1 ; none ; j # V6.0 (📡) SATELLITE ANTENNA
+1F4E2 ; emoji ; L1 ; none ; j # V6.0 (📢) PUBLIC ADDRESS LOUDSPEAKER
+1F4E3 ; emoji ; L1 ; none ; j # V6.0 (📣) CHEERING MEGAPHONE
+1F4E4 ; emoji ; L1 ; none ; j w # V6.0 (📤) OUTBOX TRAY
+1F4E5 ; emoji ; L1 ; none ; j w # V6.0 (📥) INBOX TRAY
+1F4E6 ; emoji ; L1 ; none ; j w # V6.0 (📦) PACKAGE
+1F4E7 ; emoji ; L1 ; none ; j # V6.0 (📧) E-MAIL SYMBOL
+1F4E8 ; emoji ; L1 ; none ; j # V6.0 (📨) INCOMING ENVELOPE
+1F4E9 ; emoji ; L1 ; none ; j # V6.0 (📩) ENVELOPE WITH DOWNWARDS ARROW ABOVE
+1F4EA ; emoji ; L1 ; none ; j w # V6.0 (📪) CLOSED MAILBOX WITH LOWERED FLAG
+1F4EB ; emoji ; L1 ; none ; j w # V6.0 (📫) CLOSED MAILBOX WITH RAISED FLAG
+1F4EC ; emoji ; L1 ; none ; w # V6.0 (📬) OPEN MAILBOX WITH RAISED FLAG
+1F4ED ; emoji ; L1 ; none ; w # V6.0 (📭) OPEN MAILBOX WITH LOWERED FLAG
+1F4EE ; emoji ; L1 ; none ; j # V6.0 (📮) POSTBOX
+1F4EF ; emoji ; L1 ; none ; x # V6.0 (📯) POSTAL HORN
+1F4F0 ; emoji ; L1 ; none ; j # V6.0 (📰) NEWSPAPER
+1F4F1 ; emoji ; L1 ; none ; j # V6.0 (📱) MOBILE PHONE
+1F4F2 ; emoji ; L1 ; none ; j # V6.0 (📲) MOBILE PHONE WITH RIGHTWARDS ARROW AT LEFT
+1F4F3 ; emoji ; L1 ; none ; j # V6.0 (📳) VIBRATION MODE
+1F4F4 ; emoji ; L1 ; none ; j # V6.0 (📴) MOBILE PHONE OFF
+1F4F5 ; emoji ; L1 ; none ; x # V6.0 (📵) NO MOBILE PHONES
+1F4F6 ; emoji ; L1 ; none ; j # V6.0 (📶) ANTENNA WITH BARS
+1F4F7 ; emoji ; L1 ; none ; j w # V6.0 (📷) CAMERA
+1F4F8 ; emoji ; L2 ; none ; x # V7.0 (📸) CAMERA WITH FLASH
+1F4F9 ; emoji ; L1 ; none ; j w # V6.0 (📹) VIDEO CAMERA
+1F4FA ; emoji ; L1 ; none ; j w # V6.0 (📺) TELEVISION
+1F4FB ; emoji ; L1 ; none ; j w # V6.0 (📻) RADIO
+1F4FC ; emoji ; L1 ; none ; j # V6.0 (📼) VIDEOCASSETTE
+1F4FD ; text ; L2 ; none ; w # V7.0 (📽) FILM PROJECTOR
+1F4FF ; emoji ; L2 ; none ; x # V8.0 (📿) PRAYER BEADS
+1F500 ; emoji ; L1 ; none ; x # V6.0 (🔀) TWISTED RIGHTWARDS ARROWS
+1F501 ; emoji ; L1 ; none ; x # V6.0 (ðŸ”) CLOCKWISE RIGHTWARDS AND LEFTWARDS OPEN CIRCLE ARROWS
+1F502 ; emoji ; L1 ; none ; x # V6.0 (🔂) CLOCKWISE RIGHTWARDS AND LEFTWARDS OPEN CIRCLE ARROWS WITH CIRCLED ONE OVERLAY
+1F503 ; emoji ; L1 ; none ; j # V6.0 (🔃) CLOCKWISE DOWNWARDS AND UPWARDS OPEN CIRCLE ARROWS
+1F504 ; emoji ; L1 ; none ; x # V6.0 (🔄) ANTICLOCKWISE DOWNWARDS AND UPWARDS OPEN CIRCLE ARROWS
+1F505 ; emoji ; L1 ; none ; x # V6.0 (🔅) LOW BRIGHTNESS SYMBOL
+1F506 ; emoji ; L1 ; none ; x # V6.0 (🔆) HIGH BRIGHTNESS SYMBOL
+1F507 ; emoji ; L1 ; none ; x # V6.0 (🔇) SPEAKER WITH CANCELLATION STROKE
+1F508 ; emoji ; L1 ; none ; w # V6.0 (🔈) SPEAKER
+1F509 ; emoji ; L1 ; none ; x # V6.0 (🔉) SPEAKER WITH ONE SOUND WAVE
+1F50A ; emoji ; L1 ; none ; j # V6.0 (🔊) SPEAKER WITH THREE SOUND WAVES
+1F50B ; emoji ; L1 ; none ; j # V6.0 (🔋) BATTERY
+1F50C ; emoji ; L1 ; none ; j # V6.0 (🔌) ELECTRIC PLUG
+1F50D ; emoji ; L1 ; none ; j w # V6.0 (ðŸ”) LEFT-POINTING MAGNIFYING GLASS
+1F50E ; emoji ; L1 ; none ; j # V6.0 (🔎) RIGHT-POINTING MAGNIFYING GLASS
+1F50F ; emoji ; L1 ; none ; j # V6.0 (ðŸ”) LOCK WITH INK PEN
+1F510 ; emoji ; L1 ; none ; j # V6.0 (ðŸ”) CLOSED LOCK WITH KEY
+1F511 ; emoji ; L1 ; none ; j # V6.0 (🔑) KEY
+1F512 ; emoji ; L1 ; none ; j w # V6.0 (🔒) LOCK
+1F513 ; emoji ; L1 ; none ; j w # V6.0 (🔓) OPEN LOCK
+1F514 ; emoji ; L1 ; none ; j # V6.0 (🔔) BELL
+1F515 ; emoji ; L1 ; none ; x # V6.0 (🔕) BELL WITH CANCELLATION STROKE
+1F516 ; emoji ; L1 ; none ; j # V6.0 (🔖) BOOKMARK
+1F517 ; emoji ; L1 ; none ; j # V6.0 (🔗) LINK SYMBOL
+1F518 ; emoji ; L1 ; none ; j # V6.0 (🔘) RADIO BUTTON
+1F519 ; emoji ; L1 ; none ; j # V6.0 (🔙) BACK WITH LEFTWARDS ARROW ABOVE
+1F51A ; emoji ; L1 ; none ; j # V6.0 (🔚) END WITH LEFTWARDS ARROW ABOVE
+1F51B ; emoji ; L1 ; none ; j # V6.0 (🔛) ON WITH EXCLAMATION MARK WITH LEFT RIGHT ARROW ABOVE
+1F51C ; emoji ; L1 ; none ; j # V6.0 (🔜) SOON WITH RIGHTWARDS ARROW ABOVE
+1F51D ; emoji ; L1 ; none ; j # V6.0 (ðŸ”) TOP WITH UPWARDS ARROW ABOVE
+1F51E ; emoji ; L1 ; none ; j # V6.0 (🔞) NO ONE UNDER EIGHTEEN SYMBOL
+1F51F ; emoji ; L1 ; none ; j # V6.0 (🔟) KEYCAP TEN
+1F520 ; emoji ; L1 ; none ; j # V6.0 (🔠) INPUT SYMBOL FOR LATIN CAPITAL LETTERS
+1F521 ; emoji ; L1 ; none ; j # V6.0 (🔡) INPUT SYMBOL FOR LATIN SMALL LETTERS
+1F522 ; emoji ; L1 ; none ; j # V6.0 (🔢) INPUT SYMBOL FOR NUMBERS
+1F523 ; emoji ; L1 ; none ; j # V6.0 (🔣) INPUT SYMBOL FOR SYMBOLS
+1F524 ; emoji ; L1 ; none ; j # V6.0 (🔤) INPUT SYMBOL FOR LATIN LETTERS
+1F525 ; emoji ; L1 ; none ; j # V6.0 (🔥) FIRE
+1F526 ; emoji ; L1 ; none ; j # V6.0 (🔦) ELECTRIC TORCH
+1F527 ; emoji ; L1 ; none ; j # V6.0 (🔧) WRENCH
+1F528 ; emoji ; L1 ; none ; j # V6.0 (🔨) HAMMER
+1F529 ; emoji ; L1 ; none ; j # V6.0 (🔩) NUT AND BOLT
+1F52A ; emoji ; L1 ; none ; j # V6.0 (🔪) HOCHO
+1F52B ; emoji ; L1 ; none ; j # V6.0 (🔫) PISTOL
+1F52C ; emoji ; L1 ; none ; x # V6.0 (🔬) MICROSCOPE
+1F52D ; emoji ; L1 ; none ; x # V6.0 (🔭) TELESCOPE
+1F52E ; emoji ; L1 ; none ; j # V6.0 (🔮) CRYSTAL BALL
+1F52F ; emoji ; L1 ; none ; j # V6.0 (🔯) SIX POINTED STAR WITH MIDDLE DOT
+1F530 ; emoji ; L1 ; none ; j # V6.0 (🔰) JAPANESE SYMBOL FOR BEGINNER
+1F531 ; emoji ; L1 ; none ; j # V6.0 (🔱) TRIDENT EMBLEM
+1F532 ; emoji ; L1 ; none ; j # V6.0 (🔲) BLACK SQUARE BUTTON
+1F533 ; emoji ; L1 ; none ; j # V6.0 (🔳) WHITE SQUARE BUTTON
+1F534 ; emoji ; L1 ; none ; j # V6.0 (🔴) LARGE RED CIRCLE
+1F535 ; emoji ; L1 ; none ; j # V6.0 (🔵) LARGE BLUE CIRCLE
+1F536 ; emoji ; L1 ; none ; j # V6.0 (🔶) LARGE ORANGE DIAMOND
+1F537 ; emoji ; L1 ; none ; j # V6.0 (🔷) LARGE BLUE DIAMOND
+1F538 ; emoji ; L1 ; none ; j # V6.0 (🔸) SMALL ORANGE DIAMOND
+1F539 ; emoji ; L1 ; none ; j # V6.0 (🔹) SMALL BLUE DIAMOND
+1F53A ; emoji ; L1 ; none ; j # V6.0 (🔺) UP-POINTING RED TRIANGLE
+1F53B ; emoji ; L1 ; none ; j # V6.0 (🔻) DOWN-POINTING RED TRIANGLE
+1F53C ; emoji ; L1 ; none ; j # V6.0 (🔼) UP-POINTING SMALL RED TRIANGLE
+1F53D ; emoji ; L1 ; none ; j # V6.0 (🔽) DOWN-POINTING SMALL RED TRIANGLE
+1F549 ; text ; L2 ; none ; w # V7.0 (🕉) OM SYMBOL
+1F54A ; text ; L2 ; none ; w # V7.0 (🕊) DOVE OF PEACE
+1F54B ; emoji ; L2 ; none ; x # V8.0 (🕋) KAABA
+1F54C ; emoji ; L2 ; none ; x # V8.0 (🕌) MOSQUE
+1F54D ; emoji ; L2 ; none ; x # V8.0 (ðŸ•) SYNAGOGUE
+1F54E ; emoji ; L2 ; none ; x # V8.0 (🕎) MENORAH WITH NINE BRANCHES
+1F550 ; emoji ; L1 ; none ; j w # V6.0 (ðŸ•) CLOCK FACE ONE OCLOCK
+1F551 ; emoji ; L1 ; none ; j w # V6.0 (🕑) CLOCK FACE TWO OCLOCK
+1F552 ; emoji ; L1 ; none ; j w # V6.0 (🕒) CLOCK FACE THREE OCLOCK
+1F553 ; emoji ; L1 ; none ; j w # V6.0 (🕓) CLOCK FACE FOUR OCLOCK
+1F554 ; emoji ; L1 ; none ; j w # V6.0 (🕔) CLOCK FACE FIVE OCLOCK
+1F555 ; emoji ; L1 ; none ; j w # V6.0 (🕕) CLOCK FACE SIX OCLOCK
+1F556 ; emoji ; L1 ; none ; j w # V6.0 (🕖) CLOCK FACE SEVEN OCLOCK
+1F557 ; emoji ; L1 ; none ; j w # V6.0 (🕗) CLOCK FACE EIGHT OCLOCK
+1F558 ; emoji ; L1 ; none ; j w # V6.0 (🕘) CLOCK FACE NINE OCLOCK
+1F559 ; emoji ; L1 ; none ; j w # V6.0 (🕙) CLOCK FACE TEN OCLOCK
+1F55A ; emoji ; L1 ; none ; j w # V6.0 (🕚) CLOCK FACE ELEVEN OCLOCK
+1F55B ; emoji ; L1 ; none ; j w # V6.0 (🕛) CLOCK FACE TWELVE OCLOCK
+1F55C ; emoji ; L1 ; none ; w # V6.0 (🕜) CLOCK FACE ONE-THIRTY
+1F55D ; emoji ; L1 ; none ; w # V6.0 (ðŸ•) CLOCK FACE TWO-THIRTY
+1F55E ; emoji ; L1 ; none ; w # V6.0 (🕞) CLOCK FACE THREE-THIRTY
+1F55F ; emoji ; L1 ; none ; w # V6.0 (🕟) CLOCK FACE FOUR-THIRTY
+1F560 ; emoji ; L1 ; none ; w # V6.0 (🕠) CLOCK FACE FIVE-THIRTY
+1F561 ; emoji ; L1 ; none ; w # V6.0 (🕡) CLOCK FACE SIX-THIRTY
+1F562 ; emoji ; L1 ; none ; w # V6.0 (🕢) CLOCK FACE SEVEN-THIRTY
+1F563 ; emoji ; L1 ; none ; w # V6.0 (🕣) CLOCK FACE EIGHT-THIRTY
+1F564 ; emoji ; L1 ; none ; w # V6.0 (🕤) CLOCK FACE NINE-THIRTY
+1F565 ; emoji ; L1 ; none ; w # V6.0 (🕥) CLOCK FACE TEN-THIRTY
+1F566 ; emoji ; L1 ; none ; w # V6.0 (🕦) CLOCK FACE ELEVEN-THIRTY
+1F567 ; emoji ; L1 ; none ; w # V6.0 (🕧) CLOCK FACE TWELVE-THIRTY
+1F56F ; text ; L2 ; none ; w # V7.0 (🕯) CANDLE
+1F570 ; text ; L2 ; none ; w # V7.0 (🕰) MANTELPIECE CLOCK
+1F573 ; text ; L2 ; none ; w # V7.0 (🕳) HOLE
+1F574 ; text ; L2 ; none ; w # V7.0 (🕴) MAN IN BUSINESS SUIT LEVITATING
+1F575 ; text ; L2 ; none ; w # V7.0 (🕵) SLEUTH OR SPY
+1F576 ; text ; L2 ; none ; w # V7.0 (🕶) DARK SUNGLASSES
+1F577 ; text ; L2 ; none ; w # V7.0 (🕷) SPIDER
+1F578 ; text ; L2 ; none ; w # V7.0 (🕸) SPIDER WEB
+1F579 ; text ; L2 ; none ; w # V7.0 (🕹) JOYSTICK
+1F587 ; text ; L2 ; none ; w # V7.0 (🖇) LINKED PAPERCLIPS
+1F58A ; text ; L2 ; none ; w # V7.0 (🖊) LOWER LEFT BALLPOINT PEN
+1F58B ; text ; L2 ; none ; w # V7.0 (🖋) LOWER LEFT FOUNTAIN PEN
+1F58C ; text ; L2 ; none ; w # V7.0 (🖌) LOWER LEFT PAINTBRUSH
+1F58D ; text ; L2 ; none ; w # V7.0 (ðŸ–) LOWER LEFT CRAYON
+1F590 ; text ; L2 ; secondary ; w # V7.0 (ðŸ–) RAISED HAND WITH FINGERS SPLAYED
+1F595 ; emoji ; L2 ; secondary ; x # V7.0 (🖕) REVERSED HAND WITH MIDDLE FINGER EXTENDED
+1F596 ; emoji ; L2 ; secondary ; x # V7.0 (🖖) RAISED HAND WITH PART BETWEEN MIDDLE AND RING FINGERS
+1F5A5 ; text ; L2 ; none ; w # V7.0 (🖥) DESKTOP COMPUTER
+1F5A8 ; text ; L2 ; none ; w # V7.0 (🖨) PRINTER
+1F5B1 ; text ; L2 ; none ; w # V7.0 (🖱) THREE BUTTON MOUSE
+1F5B2 ; text ; L2 ; none ; w # V7.0 (🖲) TRACKBALL
+1F5BC ; text ; L2 ; none ; w # V7.0 (🖼) FRAME WITH PICTURE
+1F5C2 ; text ; L2 ; none ; w # V7.0 (🗂) CARD INDEX DIVIDERS
+1F5C3 ; text ; L2 ; none ; w # V7.0 (🗃) CARD FILE BOX
+1F5C4 ; text ; L2 ; none ; w # V7.0 (🗄) FILE CABINET
+1F5D1 ; text ; L2 ; none ; w # V7.0 (🗑) WASTEBASKET
+1F5D2 ; text ; L2 ; none ; w # V7.0 (🗒) SPIRAL NOTE PAD
+1F5D3 ; text ; L2 ; none ; w # V7.0 (🗓) SPIRAL CALENDAR PAD
+1F5DC ; text ; L2 ; none ; w # V7.0 (🗜) COMPRESSION
+1F5DD ; text ; L2 ; none ; w # V7.0 (ðŸ—) OLD KEY
+1F5DE ; text ; L2 ; none ; w # V7.0 (🗞) ROLLED-UP NEWSPAPER
+1F5E1 ; text ; L2 ; none ; w # V7.0 (🗡) DAGGER KNIFE
+1F5E3 ; text ; L2 ; none ; w # V7.0 (🗣) SPEAKING HEAD IN SILHOUETTE
+1F5EF ; text ; L2 ; none ; w # V7.0 (🗯) RIGHT ANGER BUBBLE
+1F5F3 ; text ; L2 ; none ; w # V7.0 (🗳) BALLOT BOX WITH BALLOT
+1F5FA ; text ; L2 ; none ; w # V7.0 (🗺) WORLD MAP
+1F5FB ; emoji ; L1 ; none ; j # V6.0 (🗻) MOUNT FUJI
+1F5FC ; emoji ; L1 ; none ; j # V6.0 (🗼) TOKYO TOWER
+1F5FD ; emoji ; L1 ; none ; j # V6.0 (🗽) STATUE OF LIBERTY
+1F5FE ; emoji ; L1 ; none ; j # V6.0 (🗾) SILHOUETTE OF JAPAN
+1F5FF ; emoji ; L1 ; none ; j # V6.0 (🗿) MOYAI
+1F600 ; emoji ; L1 ; secondary ; x # V6.1 (😀) GRINNING FACE
+1F601 ; emoji ; L1 ; secondary ; j # V6.0 (ðŸ˜) GRINNING FACE WITH SMILING EYES
+1F602 ; emoji ; L1 ; secondary ; j # V6.0 (😂) FACE WITH TEARS OF JOY
+1F603 ; emoji ; L1 ; secondary ; j # V6.0 (😃) SMILING FACE WITH OPEN MOUTH
+1F604 ; emoji ; L1 ; secondary ; j # V6.0 (😄) SMILING FACE WITH OPEN MOUTH AND SMILING EYES
+1F605 ; emoji ; L1 ; secondary ; j # V6.0 (😅) SMILING FACE WITH OPEN MOUTH AND COLD SWEAT
+1F606 ; emoji ; L1 ; secondary ; j # V6.0 (😆) SMILING FACE WITH OPEN MOUTH AND TIGHTLY-CLOSED EYES
+1F607 ; emoji ; L1 ; secondary ; x # V6.0 (😇) SMILING FACE WITH HALO
+1F608 ; emoji ; L1 ; secondary ; x # V6.0 (😈) SMILING FACE WITH HORNS
+1F609 ; emoji ; L1 ; secondary ; j # V6.0 (😉) WINKING FACE
+1F60A ; emoji ; L1 ; secondary ; j # V6.0 (😊) SMILING FACE WITH SMILING EYES
+1F60B ; emoji ; L1 ; secondary ; j # V6.0 (😋) FACE SAVOURING DELICIOUS FOOD
+1F60C ; emoji ; L1 ; secondary ; j # V6.0 (😌) RELIEVED FACE
+1F60D ; emoji ; L1 ; secondary ; j # V6.0 (ðŸ˜) SMILING FACE WITH HEART-SHAPED EYES
+1F60E ; emoji ; L1 ; secondary ; x # V6.0 (😎) SMILING FACE WITH SUNGLASSES
+1F60F ; emoji ; L1 ; secondary ; j # V6.0 (ðŸ˜) SMIRKING FACE
+1F610 ; emoji ; L1 ; secondary ; w # V6.0 (ðŸ˜) NEUTRAL FACE
+1F611 ; emoji ; L1 ; secondary ; x # V6.1 (😑) EXPRESSIONLESS FACE
+1F612 ; emoji ; L1 ; secondary ; j # V6.0 (😒) UNAMUSED FACE
+1F613 ; emoji ; L1 ; secondary ; j # V6.0 (😓) FACE WITH COLD SWEAT
+1F614 ; emoji ; L1 ; secondary ; j # V6.0 (😔) PENSIVE FACE
+1F615 ; emoji ; L1 ; secondary ; x # V6.1 (😕) CONFUSED FACE
+1F616 ; emoji ; L1 ; secondary ; j # V6.0 (😖) CONFOUNDED FACE
+1F617 ; emoji ; L1 ; secondary ; x # V6.1 (😗) KISSING FACE
+1F618 ; emoji ; L1 ; secondary ; j # V6.0 (😘) FACE THROWING A KISS
+1F619 ; emoji ; L1 ; secondary ; x # V6.1 (😙) KISSING FACE WITH SMILING EYES
+1F61A ; emoji ; L1 ; secondary ; j # V6.0 (😚) KISSING FACE WITH CLOSED EYES
+1F61B ; emoji ; L1 ; secondary ; x # V6.1 (😛) FACE WITH STUCK-OUT TONGUE
+1F61C ; emoji ; L1 ; secondary ; j # V6.0 (😜) FACE WITH STUCK-OUT TONGUE AND WINKING EYE
+1F61D ; emoji ; L1 ; secondary ; j # V6.0 (ðŸ˜) FACE WITH STUCK-OUT TONGUE AND TIGHTLY-CLOSED EYES
+1F61E ; emoji ; L1 ; secondary ; j # V6.0 (😞) DISAPPOINTED FACE
+1F61F ; emoji ; L1 ; secondary ; x # V6.1 (😟) WORRIED FACE
+1F620 ; emoji ; L1 ; secondary ; j # V6.0 (😠) ANGRY FACE
+1F621 ; emoji ; L1 ; secondary ; j # V6.0 (😡) POUTING FACE
+1F622 ; emoji ; L1 ; secondary ; j # V6.0 (😢) CRYING FACE
+1F623 ; emoji ; L1 ; secondary ; j # V6.0 (😣) PERSEVERING FACE
+1F624 ; emoji ; L1 ; secondary ; j # V6.0 (😤) FACE WITH LOOK OF TRIUMPH
+1F625 ; emoji ; L1 ; secondary ; j # V6.0 (😥) DISAPPOINTED BUT RELIEVED FACE
+1F626 ; emoji ; L1 ; secondary ; x # V6.1 (😦) FROWNING FACE WITH OPEN MOUTH
+1F627 ; emoji ; L1 ; secondary ; x # V6.1 (😧) ANGUISHED FACE
+1F628 ; emoji ; L1 ; secondary ; j # V6.0 (😨) FEARFUL FACE
+1F629 ; emoji ; L1 ; secondary ; j # V6.0 (😩) WEARY FACE
+1F62A ; emoji ; L1 ; secondary ; j # V6.0 (😪) SLEEPY FACE
+1F62B ; emoji ; L1 ; secondary ; j # V6.0 (😫) TIRED FACE
+1F62C ; emoji ; L1 ; secondary ; x # V6.1 (😬) GRIMACING FACE
+1F62D ; emoji ; L1 ; secondary ; j # V6.0 (😭) LOUDLY CRYING FACE
+1F62E ; emoji ; L1 ; secondary ; x # V6.1 (😮) FACE WITH OPEN MOUTH
+1F62F ; emoji ; L1 ; secondary ; x # V6.1 (😯) HUSHED FACE
+1F630 ; emoji ; L1 ; secondary ; j # V6.0 (😰) FACE WITH OPEN MOUTH AND COLD SWEAT
+1F631 ; emoji ; L1 ; secondary ; j # V6.0 (😱) FACE SCREAMING IN FEAR
+1F632 ; emoji ; L1 ; secondary ; j # V6.0 (😲) ASTONISHED FACE
+1F633 ; emoji ; L1 ; secondary ; j # V6.0 (😳) FLUSHED FACE
+1F634 ; emoji ; L1 ; secondary ; x # V6.1 (😴) SLEEPING FACE
+1F635 ; emoji ; L1 ; secondary ; j # V6.0 (😵) DIZZY FACE
+1F636 ; emoji ; L1 ; secondary ; x # V6.0 (😶) FACE WITHOUT MOUTH
+1F637 ; emoji ; L1 ; secondary ; j # V6.0 (😷) FACE WITH MEDICAL MASK
+1F638 ; emoji ; L1 ; none ; j # V6.0 (😸) GRINNING CAT FACE WITH SMILING EYES
+1F639 ; emoji ; L1 ; none ; j # V6.0 (😹) CAT FACE WITH TEARS OF JOY
+1F63A ; emoji ; L1 ; none ; j # V6.0 (😺) SMILING CAT FACE WITH OPEN MOUTH
+1F63B ; emoji ; L1 ; none ; j # V6.0 (😻) SMILING CAT FACE WITH HEART-SHAPED EYES
+1F63C ; emoji ; L1 ; none ; j # V6.0 (😼) CAT FACE WITH WRY SMILE
+1F63D ; emoji ; L1 ; none ; j # V6.0 (😽) KISSING CAT FACE WITH CLOSED EYES
+1F63E ; emoji ; L1 ; none ; j # V6.0 (😾) POUTING CAT FACE
+1F63F ; emoji ; L1 ; none ; j # V6.0 (😿) CRYING CAT FACE
+1F640 ; emoji ; L1 ; none ; j # V6.0 (🙀) WEARY CAT FACE
+1F641 ; emoji ; L2 ; secondary ; x # V7.0 (ðŸ™) SLIGHTLY FROWNING FACE
+1F642 ; emoji ; L2 ; secondary ; x # V7.0 (🙂) SLIGHTLY SMILING FACE
+1F643 ; emoji ; L2 ; secondary ; x # V8.0 (🙃) UPSIDE-DOWN FACE
+1F644 ; emoji ; L2 ; secondary ; x # V8.0 (🙄) FACE WITH ROLLING EYES
+1F645 ; emoji ; L1 ; primary ; j # V6.0 (🙅) FACE WITH NO GOOD GESTURE
+1F646 ; emoji ; L1 ; primary ; j # V6.0 (🙆) FACE WITH OK GESTURE
+1F647 ; emoji ; L1 ; primary ; j # V6.0 (🙇) PERSON BOWING DEEPLY
+1F648 ; emoji ; L1 ; none ; j # V6.0 (🙈) SEE-NO-EVIL MONKEY
+1F649 ; emoji ; L1 ; none ; j # V6.0 (🙉) HEAR-NO-EVIL MONKEY
+1F64A ; emoji ; L1 ; none ; j # V6.0 (🙊) SPEAK-NO-EVIL MONKEY
+1F64B ; emoji ; L1 ; primary ; j # V6.0 (🙋) HAPPY PERSON RAISING ONE HAND
+1F64C ; emoji ; L1 ; secondary ; j # V6.0 (🙌) PERSON RAISING BOTH HANDS IN CELEBRATION
+1F64D ; emoji ; L1 ; primary ; j # V6.0 (ðŸ™) PERSON FROWNING
+1F64E ; emoji ; L1 ; primary ; j # V6.0 (🙎) PERSON WITH POUTING FACE
+1F64F ; emoji ; L1 ; secondary ; j # V6.0 (ðŸ™) PERSON WITH FOLDED HANDS
+1F680 ; emoji ; L1 ; none ; j # V6.0 (🚀) ROCKET
+1F681 ; emoji ; L1 ; none ; x # V6.0 (ðŸš) HELICOPTER
+1F682 ; emoji ; L1 ; none ; x # V6.0 (🚂) STEAM LOCOMOTIVE
+1F683 ; emoji ; L1 ; none ; j # V6.0 (🚃) RAILWAY CAR
+1F684 ; emoji ; L1 ; none ; j # V6.0 (🚄) HIGH-SPEED TRAIN
+1F685 ; emoji ; L1 ; none ; j # V6.0 (🚅) HIGH-SPEED TRAIN WITH BULLET NOSE
+1F686 ; emoji ; L1 ; none ; x # V6.0 (🚆) TRAIN
+1F687 ; emoji ; L1 ; none ; j w # V6.0 (🚇) METRO
+1F688 ; emoji ; L1 ; none ; x # V6.0 (🚈) LIGHT RAIL
+1F689 ; emoji ; L1 ; none ; j # V6.0 (🚉) STATION
+1F68A ; emoji ; L1 ; none ; x # V6.0 (🚊) TRAM
+1F68B ; emoji ; L1 ; none ; x # V6.0 (🚋) TRAM CAR
+1F68C ; emoji ; L1 ; none ; j # V6.0 (🚌) BUS
+1F68D ; emoji ; L1 ; none ; w # V6.0 (ðŸš) ONCOMING BUS
+1F68E ; emoji ; L1 ; none ; x # V6.0 (🚎) TROLLEYBUS
+1F68F ; emoji ; L1 ; none ; j # V6.0 (ðŸš) BUS STOP
+1F690 ; emoji ; L1 ; none ; x # V6.0 (ðŸš) MINIBUS
+1F691 ; emoji ; L1 ; none ; j w # V6.0 (🚑) AMBULANCE
+1F692 ; emoji ; L1 ; none ; j # V6.0 (🚒) FIRE ENGINE
+1F693 ; emoji ; L1 ; none ; j # V6.0 (🚓) POLICE CAR
+1F694 ; emoji ; L1 ; none ; w # V6.0 (🚔) ONCOMING POLICE CAR
+1F695 ; emoji ; L1 ; none ; j # V6.0 (🚕) TAXI
+1F696 ; emoji ; L1 ; none ; x # V6.0 (🚖) ONCOMING TAXI
+1F697 ; emoji ; L1 ; none ; j # V6.0 (🚗) AUTOMOBILE
+1F698 ; emoji ; L1 ; none ; w # V6.0 (🚘) ONCOMING AUTOMOBILE
+1F699 ; emoji ; L1 ; none ; j # V6.0 (🚙) RECREATIONAL VEHICLE
+1F69A ; emoji ; L1 ; none ; j # V6.0 (🚚) DELIVERY TRUCK
+1F69B ; emoji ; L1 ; none ; x # V6.0 (🚛) ARTICULATED LORRY
+1F69C ; emoji ; L1 ; none ; x # V6.0 (🚜) TRACTOR
+1F69D ; emoji ; L1 ; none ; x # V6.0 (ðŸš) MONORAIL
+1F69E ; emoji ; L1 ; none ; x # V6.0 (🚞) MOUNTAIN RAILWAY
+1F69F ; emoji ; L1 ; none ; x # V6.0 (🚟) SUSPENSION RAILWAY
+1F6A0 ; emoji ; L1 ; none ; x # V6.0 (🚠) MOUNTAIN CABLEWAY
+1F6A1 ; emoji ; L1 ; none ; x # V6.0 (🚡) AERIAL TRAMWAY
+1F6A2 ; emoji ; L1 ; none ; j # V6.0 (🚢) SHIP
+1F6A3 ; emoji ; L1 ; secondary ; x # V6.0 (🚣) ROWBOAT
+1F6A4 ; emoji ; L1 ; none ; j # V6.0 (🚤) SPEEDBOAT
+1F6A5 ; emoji ; L1 ; none ; j # V6.0 (🚥) HORIZONTAL TRAFFIC LIGHT
+1F6A6 ; emoji ; L1 ; none ; x # V6.0 (🚦) VERTICAL TRAFFIC LIGHT
+1F6A7 ; emoji ; L1 ; none ; j # V6.0 (🚧) CONSTRUCTION SIGN
+1F6A8 ; emoji ; L1 ; none ; j # V6.0 (🚨) POLICE CARS REVOLVING LIGHT
+1F6A9 ; emoji ; L1 ; none ; j # V6.0 (🚩) TRIANGULAR FLAG ON POST
+1F6AA ; emoji ; L1 ; none ; j # V6.0 (🚪) DOOR
+1F6AB ; emoji ; L1 ; none ; j # V6.0 (🚫) NO ENTRY SIGN
+1F6AC ; emoji ; L1 ; none ; j # V6.0 (🚬) SMOKING SYMBOL
+1F6AD ; emoji ; L1 ; none ; j w # V6.0 (🚭) NO SMOKING SYMBOL
+1F6AE ; emoji ; L1 ; none ; x # V6.0 (🚮) PUT LITTER IN ITS PLACE SYMBOL
+1F6AF ; emoji ; L1 ; none ; x # V6.0 (🚯) DO NOT LITTER SYMBOL
+1F6B0 ; emoji ; L1 ; none ; x # V6.0 (🚰) POTABLE WATER SYMBOL
+1F6B1 ; emoji ; L1 ; none ; x # V6.0 (🚱) NON-POTABLE WATER SYMBOL
+1F6B2 ; emoji ; L1 ; none ; j w # V6.0 (🚲) BICYCLE
+1F6B3 ; emoji ; L1 ; none ; x # V6.0 (🚳) NO BICYCLES
+1F6B4 ; emoji ; L1 ; secondary ; x # V6.0 (🚴) BICYCLIST
+1F6B5 ; emoji ; L1 ; secondary ; x # V6.0 (🚵) MOUNTAIN BICYCLIST
+1F6B6 ; emoji ; L1 ; secondary ; j # V6.0 (🚶) PEDESTRIAN
+1F6B7 ; emoji ; L1 ; none ; x # V6.0 (🚷) NO PEDESTRIANS
+1F6B8 ; emoji ; L1 ; none ; x # V6.0 (🚸) CHILDREN CROSSING
+1F6B9 ; emoji ; L1 ; none ; j w # V6.0 (🚹) MENS SYMBOL
+1F6BA ; emoji ; L1 ; none ; j w # V6.0 (🚺) WOMENS SYMBOL
+1F6BB ; emoji ; L1 ; none ; j # V6.0 (🚻) RESTROOM
+1F6BC ; emoji ; L1 ; none ; j w # V6.0 (🚼) BABY SYMBOL
+1F6BD ; emoji ; L1 ; none ; j # V6.0 (🚽) TOILET
+1F6BE ; emoji ; L1 ; none ; j # V6.0 (🚾) WATER CLOSET
+1F6BF ; emoji ; L1 ; none ; x # V6.0 (🚿) SHOWER
+1F6C0 ; emoji ; L1 ; secondary ; j # V6.0 (🛀) BATH
+1F6C1 ; emoji ; L1 ; none ; x # V6.0 (ðŸ›) BATHTUB
+1F6C2 ; emoji ; L1 ; none ; x # V6.0 (🛂) PASSPORT CONTROL
+1F6C3 ; emoji ; L1 ; none ; x # V6.0 (🛃) CUSTOMS
+1F6C4 ; emoji ; L1 ; none ; x # V6.0 (🛄) BAGGAGE CLAIM
+1F6C5 ; emoji ; L1 ; none ; x # V6.0 (🛅) LEFT LUGGAGE
+1F6CB ; text ; L2 ; none ; w # V7.0 (🛋) COUCH AND LAMP
+1F6CC ; emoji ; L2 ; none ; x # V7.0 (🛌) SLEEPING ACCOMMODATION
+1F6CD ; text ; L2 ; none ; w # V7.0 (ðŸ›) SHOPPING BAGS
+1F6CE ; text ; L2 ; none ; w # V7.0 (🛎) BELLHOP BELL
+1F6CF ; text ; L2 ; none ; w # V7.0 (ðŸ›) BED
+1F6D0 ; emoji ; L2 ; none ; x # V8.0 (ðŸ›) PLACE OF WORSHIP
+1F6E0 ; text ; L2 ; none ; w # V7.0 (🛠) HAMMER AND WRENCH
+1F6E1 ; text ; L2 ; none ; w # V7.0 (🛡) SHIELD
+1F6E2 ; text ; L2 ; none ; w # V7.0 (🛢) OIL DRUM
+1F6E3 ; text ; L2 ; none ; w # V7.0 (🛣) MOTORWAY
+1F6E4 ; text ; L2 ; none ; w # V7.0 (🛤) RAILWAY TRACK
+1F6E5 ; text ; L2 ; none ; w # V7.0 (🛥) MOTOR BOAT
+1F6E9 ; text ; L2 ; none ; w # V7.0 (🛩) SMALL AIRPLANE
+1F6EB ; emoji ; L2 ; none ; x # V7.0 (🛫) AIRPLANE DEPARTURE
+1F6EC ; emoji ; L2 ; none ; x # V7.0 (🛬) AIRPLANE ARRIVING
+1F6F0 ; text ; L2 ; none ; w # V7.0 (🛰) SATELLITE
+1F6F3 ; text ; L2 ; none ; w # V7.0 (🛳) PASSENGER SHIP
+1F910 ; emoji ; L2 ; secondary ; x # V8.0 (ðŸ¤) ZIPPER-MOUTH FACE
+1F911 ; emoji ; L2 ; secondary ; x # V8.0 (🤑) MONEY-MOUTH FACE
+1F912 ; emoji ; L2 ; secondary ; x # V8.0 (🤒) FACE WITH THERMOMETER
+1F913 ; emoji ; L2 ; secondary ; x # V8.0 (🤓) NERD FACE
+1F914 ; emoji ; L2 ; secondary ; x # V8.0 (🤔) THINKING FACE
+1F915 ; emoji ; L2 ; secondary ; x # V8.0 (🤕) FACE WITH HEAD-BANDAGE
+1F916 ; emoji ; L2 ; none ; x # V8.0 (🤖) ROBOT FACE
+1F917 ; emoji ; L2 ; secondary ; x # V8.0 (🤗) HUGGING FACE
+1F918 ; emoji ; L2 ; secondary ; x # V8.0 (🤘) SIGN OF THE HORNS
+1F980 ; emoji ; L2 ; none ; x # V8.0 (🦀) CRAB
+1F981 ; emoji ; L2 ; none ; x # V8.0 (ðŸ¦) LION FACE
+1F982 ; emoji ; L2 ; none ; x # V8.0 (🦂) SCORPION
+1F983 ; emoji ; L2 ; none ; x # V8.0 (🦃) TURKEY
+1F984 ; emoji ; L2 ; none ; x # V8.0 (🦄) UNICORN FACE
+1F9C0 ; emoji ; L2 ; none ; x # V8.0 (🧀) CHEESE WEDGE
+0023 20E3 ; text ; L1 ; none ; j # V3.0 (#⃣) keycap NUMBER SIGN
+002A 20E3 ; text ; L2 ; none ; x # V3.0 (*⃣) keycap ASTERISK
+0030 20E3 ; text ; L1 ; none ; j # V3.0 (0⃣) keycap DIGIT ZERO
+0031 20E3 ; text ; L1 ; none ; j # V3.0 (1⃣) keycap DIGIT ONE
+0032 20E3 ; text ; L1 ; none ; j # V3.0 (2⃣) keycap DIGIT TWO
+0033 20E3 ; text ; L1 ; none ; j # V3.0 (3⃣) keycap DIGIT THREE
+0034 20E3 ; text ; L1 ; none ; j # V3.0 (4⃣) keycap DIGIT FOUR
+0035 20E3 ; text ; L1 ; none ; j # V3.0 (5⃣) keycap DIGIT FIVE
+0036 20E3 ; text ; L1 ; none ; j # V3.0 (6⃣) keycap DIGIT SIX
+0037 20E3 ; text ; L1 ; none ; j # V3.0 (7⃣) keycap DIGIT SEVEN
+0038 20E3 ; text ; L1 ; none ; j # V3.0 (8⃣) keycap DIGIT EIGHT
+0039 20E3 ; text ; L1 ; none ; j # V3.0 (9⃣) keycap DIGIT NINE
+1F1E6 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇦🇨) flag for Ascension Island
+1F1E6 1F1E9 ; emoji ; L2 ; none ; x # V6.0 (🇦🇩) flag for Andorra
+1F1E6 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇦🇪) flag for United Arab Emirates
+1F1E6 1F1EB ; emoji ; L2 ; none ; x # V6.0 (🇦🇫) flag for Afghanistan
+1F1E6 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇦🇬) flag for Antigua & Barbuda
+1F1E6 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇦🇮) flag for Anguilla
+1F1E6 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇦🇱) flag for Albania
+1F1E6 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇦🇲) flag for Armenia
+1F1E6 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇦🇴) flag for Angola
+1F1E6 1F1F6 ; emoji ; L2 ; none ; x # V6.0 (🇦🇶) flag for Antarctica
+1F1E6 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇦🇷) flag for Argentina
+1F1E6 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇦🇸) flag for American Samoa
+1F1E6 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇦🇹) flag for Austria
+1F1E6 1F1FA ; emoji ; L2 ; none ; x # V6.0 (🇦🇺) flag for Australia
+1F1E6 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇦🇼) flag for Aruba
+1F1E6 1F1FD ; emoji ; L2 ; none ; x # V6.0 (🇦🇽) flag for Åland Islands
+1F1E6 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇦🇿) flag for Azerbaijan
+1F1E7 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇧🇦) flag for Bosnia & Herzegovina
+1F1E7 1F1E7 ; emoji ; L2 ; none ; x # V6.0 (🇧🇧) flag for Barbados
+1F1E7 1F1E9 ; emoji ; L2 ; none ; x # V6.0 (🇧🇩) flag for Bangladesh
+1F1E7 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇧🇪) flag for Belgium
+1F1E7 1F1EB ; emoji ; L2 ; none ; x # V6.0 (🇧🇫) flag for Burkina Faso
+1F1E7 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇧🇬) flag for Bulgaria
+1F1E7 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇧🇭) flag for Bahrain
+1F1E7 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇧🇮) flag for Burundi
+1F1E7 1F1EF ; emoji ; L2 ; none ; x # V6.0 (🇧🇯) flag for Benin
+1F1E7 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇧🇱) flag for St. Barthélemy
+1F1E7 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇧🇲) flag for Bermuda
+1F1E7 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇧🇳) flag for Brunei
+1F1E7 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇧🇴) flag for Bolivia
+1F1E7 1F1F6 ; emoji ; L2 ; none ; x # V6.0 (🇧🇶) flag for Caribbean Netherlands
+1F1E7 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇧🇷) flag for Brazil
+1F1E7 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇧🇸) flag for Bahamas
+1F1E7 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇧🇹) flag for Bhutan
+1F1E7 1F1FB ; emoji ; L2 ; none ; x # V6.0 (🇧🇻) flag for Bouvet Island
+1F1E7 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇧🇼) flag for Botswana
+1F1E7 1F1FE ; emoji ; L2 ; none ; x # V6.0 (🇧🇾) flag for Belarus
+1F1E7 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇧🇿) flag for Belize
+1F1E8 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇨🇦) flag for Canada
+1F1E8 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇨🇨) flag for Cocos Islands
+1F1E8 1F1E9 ; emoji ; L2 ; none ; x # V6.0 (🇨🇩) flag for Congo - Kinshasa
+1F1E8 1F1EB ; emoji ; L2 ; none ; x # V6.0 (🇨🇫) flag for Central African Republic
+1F1E8 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇨🇬) flag for Congo - Brazzaville
+1F1E8 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇨🇭) flag for Switzerland
+1F1E8 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇨🇮) flag for Côte d’Ivoire
+1F1E8 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇨🇰) flag for Cook Islands
+1F1E8 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇨🇱) flag for Chile
+1F1E8 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇨🇲) flag for Cameroon
+1F1E8 1F1F3 ; emoji ; L1 ; none ; j # V6.0 (🇨🇳) flag for China
+1F1E8 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇨🇴) flag for Colombia
+1F1E8 1F1F5 ; emoji ; L2 ; none ; x # V6.0 (🇨🇵) flag for Clipperton Island
+1F1E8 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇨🇷) flag for Costa Rica
+1F1E8 1F1FA ; emoji ; L2 ; none ; x # V6.0 (🇨🇺) flag for Cuba
+1F1E8 1F1FB ; emoji ; L2 ; none ; x # V6.0 (🇨🇻) flag for Cape Verde
+1F1E8 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇨🇼) flag for Curaçao
+1F1E8 1F1FD ; emoji ; L2 ; none ; x # V6.0 (🇨🇽) flag for Christmas Island
+1F1E8 1F1FE ; emoji ; L2 ; none ; x # V6.0 (🇨🇾) flag for Cyprus
+1F1E8 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇨🇿) flag for Czech Republic
+1F1E9 1F1EA ; emoji ; L1 ; none ; j # V6.0 (🇩🇪) flag for Germany
+1F1E9 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇩🇬) flag for Diego Garcia
+1F1E9 1F1EF ; emoji ; L2 ; none ; x # V6.0 (🇩🇯) flag for Djibouti
+1F1E9 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇩🇰) flag for Denmark
+1F1E9 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇩🇲) flag for Dominica
+1F1E9 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇩🇴) flag for Dominican Republic
+1F1E9 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇩🇿) flag for Algeria
+1F1EA 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇪🇦) flag for Ceuta & Melilla
+1F1EA 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇪🇨) flag for Ecuador
+1F1EA 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇪🇪) flag for Estonia
+1F1EA 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇪🇬) flag for Egypt
+1F1EA 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇪🇭) flag for Western Sahara
+1F1EA 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇪🇷) flag for Eritrea
+1F1EA 1F1F8 ; emoji ; L1 ; none ; j # V6.0 (🇪🇸) flag for Spain
+1F1EA 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇪🇹) flag for Ethiopia
+1F1EA 1F1FA ; emoji ; L2 ; none ; x # V6.0 (🇪🇺) flag for European Union
+1F1EB 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇫🇮) flag for Finland
+1F1EB 1F1EF ; emoji ; L2 ; none ; x # V6.0 (🇫🇯) flag for Fiji
+1F1EB 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇫🇰) flag for Falkland Islands
+1F1EB 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇫🇲) flag for Micronesia
+1F1EB 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇫🇴) flag for Faroe Islands
+1F1EB 1F1F7 ; emoji ; L1 ; none ; j # V6.0 (🇫🇷) flag for France
+1F1EC 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇬🇦) flag for Gabon
+1F1EC 1F1E7 ; emoji ; L1 ; none ; j # V6.0 (🇬🇧) flag for United Kingdom
+1F1EC 1F1E9 ; emoji ; L2 ; none ; x # V6.0 (🇬🇩) flag for Grenada
+1F1EC 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇬🇪) flag for Georgia
+1F1EC 1F1EB ; emoji ; L2 ; none ; x # V6.0 (🇬🇫) flag for French Guiana
+1F1EC 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇬🇬) flag for Guernsey
+1F1EC 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇬🇭) flag for Ghana
+1F1EC 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇬🇮) flag for Gibraltar
+1F1EC 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇬🇱) flag for Greenland
+1F1EC 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇬🇲) flag for Gambia
+1F1EC 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇬🇳) flag for Guinea
+1F1EC 1F1F5 ; emoji ; L2 ; none ; x # V6.0 (🇬🇵) flag for Guadeloupe
+1F1EC 1F1F6 ; emoji ; L2 ; none ; x # V6.0 (🇬🇶) flag for Equatorial Guinea
+1F1EC 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇬🇷) flag for Greece
+1F1EC 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇬🇸) flag for South Georgia & South Sandwich Islands
+1F1EC 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇬🇹) flag for Guatemala
+1F1EC 1F1FA ; emoji ; L2 ; none ; x # V6.0 (🇬🇺) flag for Guam
+1F1EC 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇬🇼) flag for Guinea-Bissau
+1F1EC 1F1FE ; emoji ; L2 ; none ; x # V6.0 (🇬🇾) flag for Guyana
+1F1ED 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇭🇰) flag for Hong Kong
+1F1ED 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇭🇲) flag for Heard & McDonald Islands
+1F1ED 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇭🇳) flag for Honduras
+1F1ED 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇭🇷) flag for Croatia
+1F1ED 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇭🇹) flag for Haiti
+1F1ED 1F1FA ; emoji ; L2 ; none ; x # V6.0 (🇭🇺) flag for Hungary
+1F1EE 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇮🇨) flag for Canary Islands
+1F1EE 1F1E9 ; emoji ; L2 ; none ; x # V6.0 (🇮🇩) flag for Indonesia
+1F1EE 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇮🇪) flag for Ireland
+1F1EE 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇮🇱) flag for Israel
+1F1EE 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇮🇲) flag for Isle of Man
+1F1EE 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇮🇳) flag for India
+1F1EE 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇮🇴) flag for British Indian Ocean Territory
+1F1EE 1F1F6 ; emoji ; L2 ; none ; x # V6.0 (🇮🇶) flag for Iraq
+1F1EE 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇮🇷) flag for Iran
+1F1EE 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇮🇸) flag for Iceland
+1F1EE 1F1F9 ; emoji ; L1 ; none ; j # V6.0 (🇮🇹) flag for Italy
+1F1EF 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇯🇪) flag for Jersey
+1F1EF 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇯🇲) flag for Jamaica
+1F1EF 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇯🇴) flag for Jordan
+1F1EF 1F1F5 ; emoji ; L1 ; none ; j # V6.0 (🇯🇵) flag for Japan
+1F1F0 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇰🇪) flag for Kenya
+1F1F0 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇰🇬) flag for Kyrgyzstan
+1F1F0 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇰🇭) flag for Cambodia
+1F1F0 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇰🇮) flag for Kiribati
+1F1F0 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇰🇲) flag for Comoros
+1F1F0 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇰🇳) flag for St. Kitts & Nevis
+1F1F0 1F1F5 ; emoji ; L2 ; none ; x # V6.0 (🇰🇵) flag for North Korea
+1F1F0 1F1F7 ; emoji ; L1 ; none ; j # V6.0 (🇰🇷) flag for South Korea
+1F1F0 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇰🇼) flag for Kuwait
+1F1F0 1F1FE ; emoji ; L2 ; none ; x # V6.0 (🇰🇾) flag for Cayman Islands
+1F1F0 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇰🇿) flag for Kazakhstan
+1F1F1 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇱🇦) flag for Laos
+1F1F1 1F1E7 ; emoji ; L2 ; none ; x # V6.0 (🇱🇧) flag for Lebanon
+1F1F1 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇱🇨) flag for St. Lucia
+1F1F1 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇱🇮) flag for Liechtenstein
+1F1F1 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇱🇰) flag for Sri Lanka
+1F1F1 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇱🇷) flag for Liberia
+1F1F1 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇱🇸) flag for Lesotho
+1F1F1 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇱🇹) flag for Lithuania
+1F1F1 1F1FA ; emoji ; L2 ; none ; x # V6.0 (🇱🇺) flag for Luxembourg
+1F1F1 1F1FB ; emoji ; L2 ; none ; x # V6.0 (🇱🇻) flag for Latvia
+1F1F1 1F1FE ; emoji ; L2 ; none ; x # V6.0 (🇱🇾) flag for Libya
+1F1F2 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇲🇦) flag for Morocco
+1F1F2 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇲🇨) flag for Monaco
+1F1F2 1F1E9 ; emoji ; L2 ; none ; x # V6.0 (🇲🇩) flag for Moldova
+1F1F2 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇲🇪) flag for Montenegro
+1F1F2 1F1EB ; emoji ; L2 ; none ; x # V6.0 (🇲🇫) flag for St. Martin
+1F1F2 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇲🇬) flag for Madagascar
+1F1F2 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇲🇭) flag for Marshall Islands
+1F1F2 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇲🇰) flag for Macedonia
+1F1F2 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇲🇱) flag for Mali
+1F1F2 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇲🇲) flag for Myanmar
+1F1F2 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇲🇳) flag for Mongolia
+1F1F2 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇲🇴) flag for Macau
+1F1F2 1F1F5 ; emoji ; L2 ; none ; x # V6.0 (🇲🇵) flag for Northern Mariana Islands
+1F1F2 1F1F6 ; emoji ; L2 ; none ; x # V6.0 (🇲🇶) flag for Martinique
+1F1F2 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇲🇷) flag for Mauritania
+1F1F2 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇲🇸) flag for Montserrat
+1F1F2 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇲🇹) flag for Malta
+1F1F2 1F1FA ; emoji ; L2 ; none ; x # V6.0 (🇲🇺) flag for Mauritius
+1F1F2 1F1FB ; emoji ; L2 ; none ; x # V6.0 (🇲🇻) flag for Maldives
+1F1F2 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇲🇼) flag for Malawi
+1F1F2 1F1FD ; emoji ; L2 ; none ; x # V6.0 (🇲🇽) flag for Mexico
+1F1F2 1F1FE ; emoji ; L2 ; none ; x # V6.0 (🇲🇾) flag for Malaysia
+1F1F2 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇲🇿) flag for Mozambique
+1F1F3 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇳🇦) flag for Namibia
+1F1F3 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇳🇨) flag for New Caledonia
+1F1F3 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇳🇪) flag for Niger
+1F1F3 1F1EB ; emoji ; L2 ; none ; x # V6.0 (🇳🇫) flag for Norfolk Island
+1F1F3 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇳🇬) flag for Nigeria
+1F1F3 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇳🇮) flag for Nicaragua
+1F1F3 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇳🇱) flag for Netherlands
+1F1F3 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇳🇴) flag for Norway
+1F1F3 1F1F5 ; emoji ; L2 ; none ; x # V6.0 (🇳🇵) flag for Nepal
+1F1F3 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇳🇷) flag for Nauru
+1F1F3 1F1FA ; emoji ; L2 ; none ; x # V6.0 (🇳🇺) flag for Niue
+1F1F3 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇳🇿) flag for New Zealand
+1F1F4 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇴🇲) flag for Oman
+1F1F5 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇵🇦) flag for Panama
+1F1F5 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇵🇪) flag for Peru
+1F1F5 1F1EB ; emoji ; L2 ; none ; x # V6.0 (🇵🇫) flag for French Polynesia
+1F1F5 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇵🇬) flag for Papua New Guinea
+1F1F5 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇵🇭) flag for Philippines
+1F1F5 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇵🇰) flag for Pakistan
+1F1F5 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇵🇱) flag for Poland
+1F1F5 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇵🇲) flag for St. Pierre & Miquelon
+1F1F5 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇵🇳) flag for Pitcairn Islands
+1F1F5 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇵🇷) flag for Puerto Rico
+1F1F5 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇵🇸) flag for Palestinian Territories
+1F1F5 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇵🇹) flag for Portugal
+1F1F5 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇵🇼) flag for Palau
+1F1F5 1F1FE ; emoji ; L2 ; none ; x # V6.0 (🇵🇾) flag for Paraguay
+1F1F6 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇶🇦) flag for Qatar
+1F1F7 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇷🇪) flag for Réunion
+1F1F7 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇷🇴) flag for Romania
+1F1F7 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇷🇸) flag for Serbia
+1F1F7 1F1FA ; emoji ; L1 ; none ; j # V6.0 (🇷🇺) flag for Russia
+1F1F7 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇷🇼) flag for Rwanda
+1F1F8 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇸🇦) flag for Saudi Arabia
+1F1F8 1F1E7 ; emoji ; L2 ; none ; x # V6.0 (🇸🇧) flag for Solomon Islands
+1F1F8 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇸🇨) flag for Seychelles
+1F1F8 1F1E9 ; emoji ; L2 ; none ; x # V6.0 (🇸🇩) flag for Sudan
+1F1F8 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇸🇪) flag for Sweden
+1F1F8 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇸🇬) flag for Singapore
+1F1F8 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇸🇭) flag for St. Helena
+1F1F8 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇸🇮) flag for Slovenia
+1F1F8 1F1EF ; emoji ; L2 ; none ; x # V6.0 (🇸🇯) flag for Svalbard & Jan Mayen
+1F1F8 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇸🇰) flag for Slovakia
+1F1F8 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇸🇱) flag for Sierra Leone
+1F1F8 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇸🇲) flag for San Marino
+1F1F8 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇸🇳) flag for Senegal
+1F1F8 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇸🇴) flag for Somalia
+1F1F8 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇸🇷) flag for Suriname
+1F1F8 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇸🇸) flag for South Sudan
+1F1F8 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇸🇹) flag for São Tomé & Príncipe
+1F1F8 1F1FB ; emoji ; L2 ; none ; x # V6.0 (🇸🇻) flag for El Salvador
+1F1F8 1F1FD ; emoji ; L2 ; none ; x # V6.0 (🇸🇽) flag for Sint Maarten
+1F1F8 1F1FE ; emoji ; L2 ; none ; x # V6.0 (🇸🇾) flag for Syria
+1F1F8 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇸🇿) flag for Swaziland
+1F1F9 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇹🇦) flag for Tristan da Cunha
+1F1F9 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇹🇨) flag for Turks & Caicos Islands
+1F1F9 1F1E9 ; emoji ; L2 ; none ; x # V6.0 (🇹🇩) flag for Chad
+1F1F9 1F1EB ; emoji ; L2 ; none ; x # V6.0 (🇹🇫) flag for French Southern Territories
+1F1F9 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇹🇬) flag for Togo
+1F1F9 1F1ED ; emoji ; L2 ; none ; x # V6.0 (🇹🇭) flag for Thailand
+1F1F9 1F1EF ; emoji ; L2 ; none ; x # V6.0 (🇹🇯) flag for Tajikistan
+1F1F9 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇹🇰) flag for Tokelau
+1F1F9 1F1F1 ; emoji ; L2 ; none ; x # V6.0 (🇹🇱) flag for Timor-Leste
+1F1F9 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇹🇲) flag for Turkmenistan
+1F1F9 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇹🇳) flag for Tunisia
+1F1F9 1F1F4 ; emoji ; L2 ; none ; x # V6.0 (🇹🇴) flag for Tonga
+1F1F9 1F1F7 ; emoji ; L2 ; none ; x # V6.0 (🇹🇷) flag for Turkey
+1F1F9 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇹🇹) flag for Trinidad & Tobago
+1F1F9 1F1FB ; emoji ; L2 ; none ; x # V6.0 (🇹🇻) flag for Tuvalu
+1F1F9 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇹🇼) flag for Taiwan
+1F1F9 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇹🇿) flag for Tanzania
+1F1FA 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇺🇦) flag for Ukraine
+1F1FA 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇺🇬) flag for Uganda
+1F1FA 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇺🇲) flag for U.S. Outlying Islands
+1F1FA 1F1F8 ; emoji ; L1 ; none ; j # V6.0 (🇺🇸) flag for United States
+1F1FA 1F1FE ; emoji ; L2 ; none ; x # V6.0 (🇺🇾) flag for Uruguay
+1F1FA 1F1FF ; emoji ; L2 ; none ; x # V6.0 (🇺🇿) flag for Uzbekistan
+1F1FB 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇻🇦) flag for Vatican City
+1F1FB 1F1E8 ; emoji ; L2 ; none ; x # V6.0 (🇻🇨) flag for St. Vincent & Grenadines
+1F1FB 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇻🇪) flag for Venezuela
+1F1FB 1F1EC ; emoji ; L2 ; none ; x # V6.0 (🇻🇬) flag for British Virgin Islands
+1F1FB 1F1EE ; emoji ; L2 ; none ; x # V6.0 (🇻🇮) flag for U.S. Virgin Islands
+1F1FB 1F1F3 ; emoji ; L2 ; none ; x # V6.0 (🇻🇳) flag for Vietnam
+1F1FB 1F1FA ; emoji ; L2 ; none ; x # V6.0 (🇻🇺) flag for Vanuatu
+1F1FC 1F1EB ; emoji ; L2 ; none ; x # V6.0 (🇼🇫) flag for Wallis & Futuna
+1F1FC 1F1F8 ; emoji ; L2 ; none ; x # V6.0 (🇼🇸) flag for Samoa
+1F1FD 1F1F0 ; emoji ; L2 ; none ; x # V6.0 (🇽🇰) flag for Kosovo
+1F1FE 1F1EA ; emoji ; L2 ; none ; x # V6.0 (🇾🇪) flag for Yemen
+1F1FE 1F1F9 ; emoji ; L2 ; none ; x # V6.0 (🇾🇹) flag for Mayotte
+1F1FF 1F1E6 ; emoji ; L2 ; none ; x # V6.0 (🇿🇦) flag for South Africa
+1F1FF 1F1F2 ; emoji ; L2 ; none ; x # V6.0 (🇿🇲) flag for Zambia
+1F1FF 1F1FC ; emoji ; L2 ; none ; x # V6.0 (🇿🇼) flag for Zimbabwe
diff --git a/plugins/emoji/emoji.plugin.zsh b/plugins/emoji/emoji.plugin.zsh
new file mode 100644
index 000000000..7876f1c89
--- /dev/null
+++ b/plugins/emoji/emoji.plugin.zsh
@@ -0,0 +1,288 @@
+# emoji plugin
+#
+# Makes emoji support available within ZSH
+#
+# See the README for documentation.
+
+_omz_emoji_plugin_dir="${0:h}"
+
+() {
+
+local LC_ALL=en_US.UTF-8
+
+typeset -gAH emoji_groups
+typeset -gAH emoji_con
+typeset -gAH emoji2
+typeset -gAH emoji_skintone
+
+source "$_omz_emoji_plugin_dir/emoji-char-definitions.zsh"
+unset _omz_emoji_plugin_dir
+
+# These additional emoji are not in the definition file, but are useful in conjunction with it
+
+# This is a combinin character that can be placed after any other character to surround
+# it in a "keycap" symbol.
+# The digits 0-9 are already in the emoji table as keycap_digit_<N>, keycap_ten, etc.
+# It's unclear whether this should be in the $emoji array, because those characters are all ones
+# which can be displayed on their own.
+#emoji[combining_enclosing_keycap]="\U20E3"
+
+emoji[regional_indicator_symbol_letter_d_regional_indicator_symbol_letter_e]=$'\xF0\x9F\x87\xA9\xF0\x9F\x87\xAA'
+emoji[regional_indicator_symbol_letter_g_regional_indicator_symbol_letter_b]=$'\xF0\x9F\x87\xAC\xF0\x9F\x87\xA7'
+emoji[regional_indicator_symbol_letter_c_regional_indicator_symbol_letter_n]=$'\xF0\x9F\x87\xA8\xF0\x9F\x87\xB3'
+emoji[regional_indicator_symbol_letter_j_regional_indicator_symbol_letter_p]=$'\xF0\x9F\x87\xAF\xF0\x9F\x87\xB5'
+emoji[regional_indicator_symbol_letter_k_regional_indicator_symbol_letter_r]=$'\xF0\x9F\x87\xB0\xF0\x9F\x87\xB7'
+emoji[regional_indicator_symbol_letter_f_regional_indicator_symbol_letter_r]=$'\xF0\x9F\x87\xAB\xF0\x9F\x87\xB7'
+emoji[regional_indicator_symbol_letter_e_regional_indicator_symbol_letter_s]=$'\xF0\x9F\x87\xAA\xF0\x9F\x87\xB8'
+emoji[regional_indicator_symbol_letter_i_regional_indicator_symbol_letter_t]=$'\xF0\x9F\x87\xAE\xF0\x9F\x87\xB9'
+emoji[regional_indicator_symbol_letter_u_regional_indicator_symbol_letter_s]=$'\xF0\x9F\x87\xBA\xF0\x9F\x87\xB8'
+emoji[regional_indicator_symbol_letter_r_regional_indicator_symbol_letter_u]=$'\xF0\x9F\x87\xB7\xF0\x9F\x87\xBA'
+
+# Nonstandard alias names
+emoji[vulcan_salute]=$'\U1F596'
+
+
+# Emoji combining and auxiliary characters
+
+# "Variation Selectors" for controlling text vs emoji style presentation
+# These apply to the immediately preceding character
+emoji2[text_style]=$'\UFE0E'
+emoji2[emoji_style]=$'\UFE0F'
+# Joiner that indicates a single combined-form glyph (ligature) should be used
+emoji2[zero_width_joiner]=$'\U200D'
+# Skin tone modifiers
+emoji2[emoji_modifier_fitzpatrick_type_1_2]=$'\U1F3FB'
+emoji2[emoji_modifier_fitzpatrick_type_3]=$'\U1F3FC'
+emoji2[emoji_modifier_fitzpatrick_type_4]=$'\U1F3FD'
+emoji2[emoji_modifier_fitzpatrick_type_5]=$'\U1F3FE'
+emoji2[emoji_modifier_fitzpatrick_type_6]=$'\U1F3FF'
+# Various other combining characters. (Incomplete list; I selected ones that sound useful)
+emoji2[combining_enclosing_circle]=$'\U20DD'
+emoji2[combining_enclosing_square]=$'\U20DE'
+emoji2[combining_enclosing_diamond]=$'\U20DF'
+emoji2[combining_enclosing_circle_backslash]=$'\U20E0'
+emoji2[combining_enclosing_screen]=$'\U20E2'
+emoji2[combining_enclosing_keycap]=$'\U20E3'
+emoji2[combining_enclosing_upward_pointing_triangle]=$'\U20E4'
+
+# Easier access to skin tone modifiers
+emoji_skintone[1_2]=$'\U1F3FB'
+emoji_skintone[3]=$'\U1F3FC'
+emoji_skintone[4]=$'\U1F3FD'
+emoji_skintone[5]=$'\U1F3FE'
+emoji_skintone[6]=$'\U1F3FF'
+
+# Emoji groups
+# These are stored in a single associative array, $emoji_groups, to avoid cluttering up the global
+# namespace, and to allow adding additional group definitions at run time.
+# The keys are the group names, and the values are whitespace-separated lists of emoji character names.
+
+emoji_groups[fruits]="
+ tomato
+ aubergine
+ grapes
+ melon
+ watermelon
+ tangerine
+ banana
+ pineapple
+ red_apple
+ green_apple
+ peach
+ cherries
+ strawberry
+ lemon
+ pear
+"
+
+emoji_groups[vehicles]="
+ airplane
+ rocket
+ railway_car
+ high_speed_train
+ high_speed_train_with_bullet_nose
+ bus
+ ambulance
+ fire_engine
+ police_car
+ taxi
+ automobile
+ recreational_vehicle
+ delivery_truck
+ ship
+ speedboat
+ bicycle
+ helicopter
+ steam_locomotive
+ train
+ light_rail
+ tram
+ oncoming_bus
+ trolleybus
+ minibus
+ oncoming_police_car
+ oncoming_taxi
+ oncoming_automobile
+ articulated_lorry
+ tractor
+ monorail
+ mountain_railway
+ suspension_railway
+ mountain_cableway
+ aerial_tramway
+ rowboat
+ bicyclist
+ mountain_bicyclist
+ sailboat
+"
+
+emoji_groups[animals]="
+ snail
+ snake
+ horse
+ sheep
+ monkey
+ chicken
+ boar
+ elephant
+ octopus
+ spiral_shell
+ bug
+ ant
+ honeybee
+ lady_beetle
+ fish
+ tropical_fish
+ blowfish
+ turtle
+ hatching_chick
+ baby_chick
+ front_facing_baby_chick
+ bird
+ penguin
+ koala
+ poodle
+ bactrian_camel
+ dolphin
+ mouse_face
+ cow_face
+ tiger_face
+ rabbit_face
+ cat_face
+ dragon_face
+ spouting_whale
+ horse_face
+ monkey_face
+ dog_face
+ pig_face
+ frog_face
+ hamster_face
+ wolf_face
+ bear_face
+ panda_face
+ rat
+ mouse
+ ox
+ water_buffalo
+ cow
+ tiger
+ leopard
+ rabbit
+ cat
+ dragon
+ crocodile
+ whale
+ ram
+ goat
+ rooster
+ dog
+ pig
+ dromedary_camel
+"
+
+emoji_groups[faces]="
+ grinning_face_with_smiling_eyes
+ face_with_tears_of_joy
+ smiling_face_with_open_mouth
+ smiling_face_with_open_mouth_and_smiling_eyes
+ smiling_face_with_open_mouth_and_cold_sweat
+ smiling_face_with_open_mouth_and_tightly_closed_eyes
+ winking_face
+ smiling_face_with_smiling_eyes
+ face_savouring_delicious_food
+ relieved_face
+ smiling_face_with_heart_shaped_eyes
+ smirking_face
+ unamused_face
+ face_with_cold_sweat
+ pensive_face
+ confounded_face
+ face_throwing_a_kiss
+ kissing_face_with_closed_eyes
+ face_with_stuck_out_tongue_and_winking_eye
+ face_with_stuck_out_tongue_and_tightly_closed_eyes
+ disappointed_face
+ angry_face
+ pouting_face
+ crying_face
+ persevering_face
+ face_with_look_of_triumph
+ disappointed_but_relieved_face
+ fearful_face
+ weary_face
+ sleepy_face
+ tired_face
+ loudly_crying_face
+ face_with_open_mouth_and_cold_sweat
+ face_screaming_in_fear
+ astonished_face
+ flushed_face
+ dizzy_face
+ face_with_medical_mask
+"
+
+}
+
+# Prints a random emoji character
+#
+# random_emoji [group]
+#
+function random_emoji() {
+ local group=$1
+ local names
+ if [[ -z "$group" || "$group" == "all" ]]; then
+ names=(${(k)emoji})
+ else
+ names=(${=emoji_groups[$group]})
+ fi
+ local list_size=${#names}
+ [[ $list_size -eq 0 ]] && return 1
+ local random_index=$(( ( RANDOM % $list_size ) + 1 ))
+ local name=${names[$random_index]}
+ echo ${emoji[$name]}
+}
+
+# Displays a listing of emoji with their names
+#
+# display_emoji [group]
+#
+function display_emoji() {
+ local group=$1
+ local names
+ if [[ -z "$group" || "$group" == "all" ]]; then
+ names=(${(k)emoji})
+ else
+ names=(${=emoji_groups[$group]})
+ fi
+ # The extra spaces in output here are a hack for readability, since some
+ # terminals treat these emoji chars as single-width.
+ for i in $names; do
+ printf '%s ' "$emoji[$i]"
+ done
+ print
+ for i in $names; do
+ echo "${emoji[$i]} = $i"
+ done
+}
+
+
diff --git a/plugins/emoji/update_emoji.pl b/plugins/emoji/update_emoji.pl
new file mode 100644
index 000000000..04f3ce8e7
--- /dev/null
+++ b/plugins/emoji/update_emoji.pl
@@ -0,0 +1,113 @@
+#!/usr/bin/perl -w
+#
+# update_emoji.pl
+#
+# This script generates the emoji.plugin.zsh emoji definitions from the Unicode
+# character data for the emoji characters.
+#
+# The data file can be found at http://unicode.org/Public/emoji/latest/emoji-data.txt
+# as referenced in Unicode TR51 (http://www.unicode.org/reports/tr51/index.html).
+#
+# This is known to work with the data file from version 1.0. It may not work with later
+# versions if the format changes. In particular, this reads line comments to get the
+# emoji character name and unicode version.
+#
+# Country names have punctuation and other non-letter characters removed from their name,
+# to avoid possible complications with having to escape the strings when using them as
+# array subscripts. The definition file seems to use some combining characters like accents
+# that get stripped during this process.
+
+use strict;
+use warnings;
+use 5.010;
+use autodie;
+
+use Path::Class;
+use File::Copy;
+
+# Parse definitions out of the data file and convert
+sub process_emoji_data_file {
+ my ( $infile, $outfilename ) = @_;
+ my $file = file($infile);
+ my $outfile = file($outfilename);
+ my $outfilebase = $outfile->basename();
+ my $tempfilename = "$outfilename.tmp";
+ my $tempfile = file($tempfilename);
+ my $outfh = $tempfile->openw();
+ $outfh->print("
+# $outfilebase - Emoji character definitions for oh-my-zsh emoji plugin
+#
+# This file is auto-generated by update_emoji.pl. Do not edit it manually.
+#
+# This contains the definition for:
+# \$emoji - which maps character names to Unicode characters
+# \$emoji_flags - maps country names to Unicode flag characters using region indicators
+
+# Main emoji
+typeset -gAH emoji
+# National flags
+typeset -gAH emoji_flags
+# Combining modifiers
+typeset -gAH emoji_mod
+
+");
+
+ my $fh = $file->openr();
+ my $line_num = 0;
+ while ( my $line = $fh->getline() ) {
+ $line_num++;
+ $_ = $line;
+ # Skip all-comment lines (from the header) and blank lines
+ # (But don't strip comments on normal lines; we need to parse those for
+ # the emoji names.)
+ next if /^\s*#/ or /^\s*$/;
+
+ if (/^(\S.*?\S)\s*;\s*(\w+)\s*;\s*(\w+)\s*;\s*(\w+)\s*;\s*(\w.*?)\s*#\s*V(\S+)\s\(.*?\)\s*(\w.*\S)\s*$/) {
+ my ($code, $style, $level, $modifier_status, $sources, $version, $keycap_name)
+ = ($1, $2, $3, $4, $5, $6, $7);
+ #print "code=$code style=$style level=$level modifier_status=$modifier_status sources=$sources version=$version name=$keycap_name\n";
+ my @code_points = split /\s+/, $code;
+ my @sources = split /\s+/, $sources;
+
+ my $flag_country = "";
+ if ( $keycap_name =~ /^flag for (\S.*?)\s*$/) {
+ $flag_country = $1;
+ }
+
+ my $zsh_code = join '', map { "\\U$_" } @code_points;
+ # Convert keycap names to valid associative array names that do not require any
+ # quoting. Works fine for most stuff, but is clumsy for flags.
+ my $omz_name = lc($keycap_name);
+ $omz_name =~ s/[^A-Za-z0-9]/_/g;
+ my $zsh_flag_country = $flag_country;
+ $zsh_flag_country =~ s/[^\p{Letter}]/_/g;
+ if ($flag_country) {
+ $outfh->print("emoji_flags[$zsh_flag_country]=\$'$zsh_code'\n");
+ } else {
+ $outfh->print("emoji[$omz_name]=\$'$zsh_code'\n");
+ }
+ # Modifiers are included in both the main set and their separate map,
+ # because they have a standalone representation as a color swatch.
+ if ( $modifier_status eq "modifier" ) {
+ $outfh->print("emoji_mod[$omz_name]=\$'$zsh_code'\n");
+ }
+ } else {
+ die "Failed parsing line $line_num: '$_'";
+ }
+ }
+ $fh->close();
+ $outfh->print("\n");
+ $outfh->close();
+
+ move($tempfilename, $outfilename)
+ or die "Failed moving temp file to $outfilename: $!";
+}
+
+my $datafile = "emoji-data.txt";
+my $zsh_def_file = "emoji-char-definitions.zsh";
+process_emoji_data_file($datafile, $zsh_def_file);
+
+print "Updated definition file $zsh_def_file\n";
+
+
+
diff --git a/plugins/emotty/emotty.plugin.zsh b/plugins/emotty/emotty.plugin.zsh
new file mode 100644
index 000000000..b32dd1a4c
--- /dev/null
+++ b/plugins/emotty/emotty.plugin.zsh
@@ -0,0 +1,43 @@
+# ------------------------------------------------------------------------------
+# FILE: emotty.plugin.zsh
+# DESCRIPTION: Return an emoji for the current $TTY number.
+# AUTHOR: Alexis Hildebrandt (afh[at]surryhill.net)
+# VERSION: 1.0.0
+# DEPENDS: emoji plugin
+#
+# There are different sets of emoji characters available, to choose a different
+# set export emotty_set to the name of the set you would like to use, e.g.:
+# % export emotty_set=nature
+# ------------------------------------------------------------------------------
+
+typeset -gAH _emotty_sets
+local _emotty_plugin_dir="${0:h}"
+source "$_emotty_plugin_dir/emotty_stellar_set.zsh"
+source "$_emotty_plugin_dir/emotty_floral_set.zsh"
+source "$_emotty_plugin_dir/emotty_zodiac_set.zsh"
+source "$_emotty_plugin_dir/emotty_nature_set.zsh"
+source "$_emotty_plugin_dir/emotty_emoji_set.zsh"
+source "$_emotty_plugin_dir/emotty_love_set.zsh"
+unset _emotty_plugin_dir
+
+emotty_default_set=emoji
+
+function emotty() {
+ # Use emotty set defined by user, fallback to default
+ local emotty=${_emotty_sets[${emotty_set:-$emotty_default_set}]}
+ # Parse $TTY number, normalizing it to an emotty set index
+ (( tty = (${TTY##/dev/ttys} % ${#${=emotty}}) + 1 ))
+ local character_name=${${=emotty}[tty]}
+ echo "${emoji[${character_name}]}${emoji2[emoji_style]}"
+}
+
+function display_emotty() {
+ local name=$1
+ for i in ${=_emotty_sets[$name]}; do
+ printf "${emoji[$i]}${emoji2[emoji_style]} "
+ done
+ print
+ for i in ${=_emotty_sets[$name]}; do
+ print "${emoji[$i]}${emoji2[emoji_style]} = $i"
+ done
+}
diff --git a/plugins/emotty/emotty_emoji_set.zsh b/plugins/emotty/emotty_emoji_set.zsh
new file mode 100644
index 000000000..00e317131
--- /dev/null
+++ b/plugins/emotty/emotty_emoji_set.zsh
@@ -0,0 +1,24 @@
+#!/usr/bin/env zsh
+# vim:ft=zsh ts=2 sw=2 sts=2
+
+_emotty_sets[emoji]="
+ crystal_ball
+ ghost
+ jack_o_lantern
+ see_no_evil_monkey
+ hear_no_evil_monkey
+ speak_no_evil_monkey
+ smiling_cat_face_with_open_mouth
+ extraterrestrial_alien
+ rocket
+ billiards
+ bomb
+ pill
+ japanese_symbol_for_beginner
+ direct_hit
+ cyclone
+ diamond_shape_with_a_dot_inside
+ sparkle
+ eight_spoked_asterisk
+ eight_pointed_black_star
+ "
diff --git a/plugins/emotty/emotty_floral_set.zsh b/plugins/emotty/emotty_floral_set.zsh
new file mode 100644
index 000000000..f761feae6
--- /dev/null
+++ b/plugins/emotty/emotty_floral_set.zsh
@@ -0,0 +1,18 @@
+#!/usr/bin/env zsh
+# vim:ft=zsh ts=2 sw=2 sts=2
+
+_emotty_sets[floral]="
+ hibiscus
+ cherry_blossom
+ blossom
+ sunflower
+ bouquet
+ tulip
+ rose
+ four_leaf_clover
+ seedling
+ herb
+ palm_tree
+ evergreen_tree
+ deciduous_tree
+ "
diff --git a/plugins/emotty/emotty_love_set.zsh b/plugins/emotty/emotty_love_set.zsh
new file mode 100644
index 000000000..8f19e6902
--- /dev/null
+++ b/plugins/emotty/emotty_love_set.zsh
@@ -0,0 +1,34 @@
+#!/usr/bin/env zsh
+# vim:ft=zsh ts=2 sw=2 sts=2
+
+# Note: The heavy_black_heart emoji requires $emoji2[emoji_style]
+# to be rendered as the emoji red heart.
+_emotty_sets[love]="
+ green_heart
+ blue_heart
+ purple_heart
+ yellow_heart
+ heavy_black_heart
+ broken_heart
+ heart_with_arrow
+ heart_with_ribbon
+ sparkling_heart
+ two_hearts
+ revolving_hearts
+ growing_heart
+ beating_heart
+ heart_decoration
+ couple_with_heart
+ kiss
+ man_and_woman_holding_hands
+ two_women_holding_hands
+ two_men_holding_hands
+ kiss_mark
+ smiling_face_with_heart_shaped_eyes
+ kissing_face
+ face_throwing_a_kiss
+ kissing_face_with_smiling_eyes
+ kissing_face_with_closed_eyes
+ smiling_cat_face_with_heart_shaped_eyes
+ kissing_cat_face_with_closed_eyes
+ "
diff --git a/plugins/emotty/emotty_nature_set.zsh b/plugins/emotty/emotty_nature_set.zsh
new file mode 100644
index 000000000..8dab4c1ba
--- /dev/null
+++ b/plugins/emotty/emotty_nature_set.zsh
@@ -0,0 +1,58 @@
+#!/usr/bin/env zsh
+# vim:ft=zsh ts=2 sw=2 sts=2
+
+_emotty_sets[nature]="
+ mouse_face
+ hamster_face
+ rabbit_face
+ dog_face
+ cat_face
+ tiger_face
+ bear_face
+ monkey_face
+ koala
+ panda_face
+ chicken
+ baby_chick
+ bird
+ penguin
+ cow_face
+ pig_face
+ frog_face
+ boar
+ wolf_face
+ horse_face
+ snail
+ bug
+ ant
+ honeybee
+ lady_beetle
+ spouting_whale
+ dolphin
+ octopus
+ fish
+ tropical_fish
+ snake
+ turtle
+ lemon
+ tangerine
+ peach
+ mushroom
+ tomato
+ strawberry
+ red_apple
+ cherries
+ grapes
+ aubergine
+ watermelon
+ banana
+ pineapple
+ melon
+ pear
+ green_apple
+ ear_of_maize
+ sunflower
+ seedling
+ herb
+ four_leaf_clover
+ "
diff --git a/plugins/emotty/emotty_stellar_set.zsh b/plugins/emotty/emotty_stellar_set.zsh
new file mode 100644
index 000000000..8e7e61068
--- /dev/null
+++ b/plugins/emotty/emotty_stellar_set.zsh
@@ -0,0 +1,25 @@
+#!/usr/bin/env zsh
+# vim:ft=zsh ts=2 sw=2 sts=2
+
+# NOTE: The following emoji show as $'character' in the title
+# white_medium_star
+# sparkles
+# dizzy_symbol
+
+_emotty_sets[stellar]="
+ full_moon_symbol
+ waning_gibbous_moon_symbol
+ waning_crescent_moon_symbol
+ last_quarter_moon_symbol
+ new_moon_symbol
+ new_moon_with_face
+ waxing_crescent_moon_symbol
+ first_quarter_moon_symbol
+ waxing_gibbous_moon_symbol
+ full_moon_with_face
+ sun_with_face
+ glowing_star
+ crescent_moon
+ first_quarter_moon_with_face
+ last_quarter_moon_with_face
+ "
diff --git a/plugins/emotty/emotty_zodiac_set.zsh b/plugins/emotty/emotty_zodiac_set.zsh
new file mode 100644
index 000000000..bde6e3d2e
--- /dev/null
+++ b/plugins/emotty/emotty_zodiac_set.zsh
@@ -0,0 +1,29 @@
+#!/usr/bin/env zsh
+# vim:ft=zsh ts=2 sw=2 sts=2
+
+_emotty_sets[zodiac]="
+ aries
+ taurus
+ gemini
+ cancer
+ leo
+ virgo
+ libra
+ scorpius
+ sagittarius
+ capricorn
+ aquarius
+ pisces
+ rat
+ ox
+ tiger
+ rabbit
+ dragon
+ snake
+ horse
+ goat
+ monkey
+ rooster
+ dog
+ pig
+ "
diff --git a/plugins/encode64/encode64.plugin.zsh b/plugins/encode64/encode64.plugin.zsh
index 4dbd1b453..979e06742 100644
--- a/plugins/encode64/encode64.plugin.zsh
+++ b/plugins/encode64/encode64.plugin.zsh
@@ -1,4 +1,17 @@
-encode64(){ echo -n $1 | base64 }
-decode64(){ echo -n $1 | base64 --decode }
+encode64() {
+ if [[ $# -eq 0 ]]; then
+ cat | base64
+ else
+ printf '%s' $1 | base64
+ fi
+}
+
+decode64() {
+ if [[ $# -eq 0 ]]; then
+ cat | base64 --decode
+ else
+ printf '%s' $1 | base64 --decode
+ fi
+}
alias e64=encode64
alias d64=decode64
diff --git a/plugins/extract/_extract b/plugins/extract/_extract
index dca890954..387b344bc 100644
--- a/plugins/extract/_extract
+++ b/plugins/extract/_extract
@@ -3,6 +3,6 @@
_arguments \
'(-r --remove)'{-r,--remove}'[Remove archive.]' \
- "*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|rar|7z|deb)(-.)'" && return 0
+ "*::archive file:_files -g '(#i)*.(tar|tgz|tbz|tbz2|txz|tlz|gz|bz2|xz|lzma|Z|zip|ipsw|rar|7z|deb)(-.)'" && return 0
diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh
index 898d3d36e..5d0809e9a 100644
--- a/plugins/extract/extract.plugin.zsh
+++ b/plugins/extract/extract.plugin.zsh
@@ -23,7 +23,7 @@ function extract() {
remove_archive=1
if [[ "$1" == "-r" ]] || [[ "$1" == "--remove" ]]; then
- remove_archive=0
+ remove_archive=0
shift
fi
@@ -52,7 +52,7 @@ function extract() {
(*.xz) unxz "$1" ;;
(*.lzma) unlzma "$1" ;;
(*.Z) uncompress "$1" ;;
- (*.zip|*.war|*.jar|*.sublime-package) unzip "$1" -d $extract_dir ;;
+ (*.zip|*.war|*.jar|*.sublime-package|*.ipsw|*.xpi|*.apk) unzip "$1" -d $extract_dir ;;
(*.rar) unrar x -ad "$1" ;;
(*.7z) 7za x "$1" ;;
(*.deb)
@@ -64,10 +64,10 @@ function extract() {
cd ..; rm *.tar.gz debian-binary
cd ..
;;
- (*)
+ (*)
echo "extract: '$1' cannot be extracted" 1>&2
- success=1
- ;;
+ success=1
+ ;;
esac
(( success = $success > 0 ? $success : $? ))
diff --git a/plugins/fancy-ctrl-z/README.md b/plugins/fancy-ctrl-z/README.md
new file mode 100644
index 000000000..a7670fa2c
--- /dev/null
+++ b/plugins/fancy-ctrl-z/README.md
@@ -0,0 +1,14 @@
+# Use Ctrl-Z to switch back to Vim
+
+I frequently need to execute random command in my shell. To achieve it I pause
+Vim by pressing Ctrl-z, type command and press fg<Enter> to switch back to Vim.
+The fg part really hurt sme. I just wanted to hit Ctrl-z once again to get back
+to Vim. I could not find a solution, so I developed one on my own that
+works wonderfully with ZSH
+
+Source: http://sheerun.net/2014/03/21/how-to-boost-your-vim-productivity/
+
+Credits:
+- original idea by @sheerun
+- added to OMZ by @mbologna
+
diff --git a/plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh b/plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh
new file mode 100644
index 000000000..8ab297913
--- /dev/null
+++ b/plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh
@@ -0,0 +1,12 @@
+fancy-ctrl-z () {
+ if [[ $#BUFFER -eq 0 ]]; then
+ BUFFER="fg"
+ zle accept-line
+ else
+ zle push-input
+ zle clear-screen
+ fi
+}
+zle -N fancy-ctrl-z
+bindkey '^Z' fancy-ctrl-z
+
diff --git a/plugins/fasd/fasd.plugin.zsh b/plugins/fasd/fasd.plugin.zsh
index 8ad43fc23..b11f0b511 100644
--- a/plugins/fasd/fasd.plugin.zsh
+++ b/plugins/fasd/fasd.plugin.zsh
@@ -1,11 +1,11 @@
if [ $commands[fasd] ]; then # check if fasd is installed
- fasd_cache="$HOME/.fasd-init-cache"
+ fasd_cache="${ZSH_CACHE_DIR}/fasd-init-cache"
if [ "$(command -v fasd)" -nt "$fasd_cache" -o ! -s "$fasd_cache" ]; then
fasd --init auto >| "$fasd_cache"
fi
source "$fasd_cache"
unset fasd_cache
+
alias v='f -e vim'
- alias o='a -e open'
+ alias o='a -e open_command'
fi
-
diff --git a/plugins/fbterm/fbterm.plugin.zsh b/plugins/fbterm/fbterm.plugin.zsh
index 4f0456016..bc2532092 100644
--- a/plugins/fbterm/fbterm.plugin.zsh
+++ b/plugins/fbterm/fbterm.plugin.zsh
@@ -1,6 +1,7 @@
# start fbterm automatically in /dev/tty*
-if [[ $(tty|grep -o '/dev/tty') = /dev/tty ]] ; then
- fbterm
- exit
+if (( ${+commands[fbterm]} )); then
+ if [[ "$TTY" = /dev/tty* ]] ; then
+ fbterm && exit
+ fi
fi
diff --git a/plugins/fedora/README.md b/plugins/fedora/README.md
new file mode 100644
index 000000000..f384b0ffd
--- /dev/null
+++ b/plugins/fedora/README.md
@@ -0,0 +1,3 @@
+This is a plugin based on yum plugin, but using dnf as main frontend
+(from Fedora 22 onwards, yum is deprecated in favor of dnf).
+
diff --git a/plugins/fedora/fedora.plugin.zsh b/plugins/fedora/fedora.plugin.zsh
new file mode 100644
index 000000000..eddc3627b
--- /dev/null
+++ b/plugins/fedora/fedora.plugin.zsh
@@ -0,0 +1,16 @@
+## Aliases
+
+alias dnfs="dnf search" # search package
+alias dnfp="dnf info" # show package info
+alias dnfl="dnf list" # list packages
+alias dnfgl="dnf grouplist" # list package groups
+alias dnfli="dnf list installed" # print all installed packages
+alias dnfmc="dnf makecache" # rebuilds the dnf package list
+
+alias dnfu="sudo dnf upgrade" # upgrade packages
+alias dnfi="sudo dnf install" # install package
+alias dnfgi="sudo dnf groupinstall" # install package group
+alias dnfr="sudo dnf remove" # remove package
+alias dnfgr="sudo dnf groupremove" # remove pagage group
+alias dnfrl="sudo dnf remove --remove-leaves" # remove package and leaves
+alias dnfc="sudo dnf clean all" # clean cache
diff --git a/plugins/forklift/README.md b/plugins/forklift/README.md
new file mode 100644
index 000000000..6c5cbab23
--- /dev/null
+++ b/plugins/forklift/README.md
@@ -0,0 +1,15 @@
+## forklift
+
+Plugin for ForkLift, an FTP application for OS X.
+
+### Requirements
+
+* [ForkLift](http://www.binarynights.com/forklift/)
+
+### Usage
+
+<code>fl [*file_or_folder*]</code>
+
+* If `fl` is called without arguments then the current folder is opened in ForkLift. This is equivalent to `fl .`.
+
+* If `fl` is called with a directory as the argument, then that directory is opened in ForkLift. If called with a non-directory file as the argument, then the file's parent directory is opened.
diff --git a/plugins/frontend-search/README.md b/plugins/frontend-search/README.md
index 801d450f3..4d956e38f 100644
--- a/plugins/frontend-search/README.md
+++ b/plugins/frontend-search/README.md
@@ -1,74 +1,60 @@
-## Rationale ##
+## Introduction ##
-> Searches for your Frontend contents more easier
+> Searches for your frontend web development made easier
-## Instalation ##
+## Installation ##
+Open your `~/.zshrc` file and enable the `frontend-search` plugin:
-Open your `.zshrc` file and load `frontend-search` plugin
+```zsh
+
+plugins=( ... frontend-search)
-```bash
-...
-plugins=( <your-plugins-list>... frontend-search)
-...
```
-## Commands ##
-
-All command searches are accept only in format
-
-* `frontend <search-content> <search-term>`
-
-The search content are
-
-* `jquery <api.jquery.com>`
-* `mdn <developer.mozilla.org>`
-* `compass <compass-style.org>`
-* `html5please <html5please.com>`
-* `caniuse <caniuse.com>`
-* `aurajs <aurajs.com>`
-* `dartlang <api.dartlang.org/apidocs/channels/stable/dartdoc-viewer>`
-* `lodash <search>`
-* `qunit <api.qunitjs.com>`
-* `fontello <fontello.com>`
-* `bootsnipp <bootsnipp.com>`
-* `cssflow <cssflow.com>`
-* `codepen <codepen.io>`
-* `unheap <www.unheap.com>`
-* `bem <google.com/search?as_q=<search-term>&as_sitesearch=bem.info>`
-* `smacss <google.com/search?as_q=<search-term>&as_sitesearch=smacss.com>`
-* `angularjs <google.com/search?as_q=<search-term>&as_sitesearch=angularjs.org>`
-* `reactjs <google.com/search?as_q=<search-term>&as_sitesearch=facebook.github.io/react>`
-* `emberjs <emberjs.com>`
-* `stackoverflow <stackoverflow.com>`
-
-
-## Aliases ##
-
-There are a few aliases presented as well:
-
-* `jquery` A shorthand for `frontend jquery`
-* `mdn` A shorthand for `frontend mdn`
-* `compass` A shorthand for `frontend compass`
-* `html5please` A shorthand for `frontend html5please`
-* `caniuse` A shorthand for `frontend caniuse`
-* `aurajs` A shorthand for `frontend aurajs`
-* `dartlang` A shorthand for `frontend dartlang`
-* `lodash` A shorthand for `frontend lodash`
-* `qunit` A shorthand for `frontend qunit`
-* `fontello` A shorthand for `frontend fontello`
-* `bootsnipp` A shorthand for `frontend bootsnipp`
-* `cssflow` A shorthand for `frontend cssflow`
-* `codepen` A shorthand for `frontend codepen`
-* `unheap` A shorthand for `frontend unheap`
-* `bem` A shorthand for `frontend bem`
-* `smacss` A shorthand for `frontend smacss`
-* `angularjs` A shorthand for `frontend angularjs`
-* `reactjs` A shorthand for `frontend reactjs`
-* `emberjs` A shorthand for `frontend emberjs`
-* `stackoverflow` A shorthand for `frontend stackoverflow`
+## Usage ##
+
+You can use the frontend-search plugin in these two forms:
+
+* `frontend <context> <term> [more terms if you want]`
+* `<context> <term> [more terms if you want]`
+
+For example, these two are equivalent:
+
+```zsh
+$ frontend angularjs dependency injection
+$ angularjs dependency injection
+```
+
+Available search contexts are:
+
+| context | URL |
+|---------------|--------------------------------------------------------------------------|
+| angularjs | `https://google.com/search?as_sitesearch=angularjs.org&as_q=` |
+| aurajs | `http://aurajs.com/api/#stq=` |
+| bem | `https://google.com/search?as_sitesearch=bem.info&as_q=` |
+| bootsnipp | `http://bootsnipp.com/search?q=` |
+| caniuse | `http://caniuse.com/#search=` |
+| codepen | `http://codepen.io/search?q=` |
+| compassdoc | `http://compass-style.org/search?q=` |
+| cssflow | `http://www.cssflow.com/search?q=` |
+| dartlang | `https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart:` |
+| emberjs | `http://emberjs.com/api/#stp=1&stq=` |
+| fontello | `http://fontello.com/#search=` |
+| html5please | `http://html5please.com/#` |
+| jquery | `https://api.jquery.com/?s=` |
+| lodash | `https://devdocs.io/lodash/index#` |
+| mdn | `https://developer.mozilla.org/search?q=` |
+| npmjs | `https://www.npmjs.com/search?q=` |
+| qunit | `https://api.qunitjs.com/?s=` |
+| reactjs | `https://google.com/search?as_sitesearch=facebook.github.io/react&as_q=` |
+| smacss | `https://google.com/search?as_sitesearch=smacss.com&as_q=` |
+| stackoverflow | `http://stackoverflow.com/search?q=` |
+| unheap | `http://www.unheap.com/?s=` |
+
+If you want to have another context, open an Issue and tell us!
## Author
@@ -77,5 +63,3 @@ There are a few aliases presented as well:
+ <https://plus.google.com/+WilsonMendes>
+ <https://twitter.com/willmendesneto>
+ <http://github.com/willmendesneto>
-
-New features comming soon.
diff --git a/plugins/frontend-search/_frontend-search.sh b/plugins/frontend-search/_frontend-search.sh
index 252f21570..9aad76f76 100644
--- a/plugins/frontend-search/_frontend-search.sh
+++ b/plugins/frontend-search/_frontend-search.sh
@@ -19,7 +19,7 @@ function _frontend() {
commands=(
'jquery: Search in jQuery website'
'mdn: Search in MDN website'
- 'compass: Search in COMPASS website'
+ 'compassdoc: Search in COMPASS website'
'html5please: Search in HTML5 Please website'
'caniuse: Search in Can I Use website'
'aurajs: Search in AuraJs website'
@@ -37,6 +37,7 @@ function _frontend() {
'reactjs: Search in React website'
'emberjs: Search in Ember website'
'stackoverflow: Search in StackOverflow website'
+ 'npmjs: Search in NPMJS website'
)
_arguments -C \
@@ -56,7 +57,7 @@ function _frontend() {
mdn)
_describe -t points "Warp points" frontend_points && ret=0
;;
- compass)
+ compassdoc)
_describe -t points "Warp points" frontend_points && ret=0
;;
html5please)
@@ -110,6 +111,9 @@ function _frontend() {
stackoverflow)
_describe -t points "Warp points" frontend_points && ret=0
;;
+ npmjs)
+ _describe -t points "Warp points" frontend_points && ret=0
+ ;;
esac
;;
esac
diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh
index b9fb8634c..3fd49ab8e 100644
--- a/plugins/frontend-search/frontend-search.plugin.zsh
+++ b/plugins/frontend-search/frontend-search.plugin.zsh
@@ -1,158 +1,91 @@
-# frontend from terminal
+alias angularjs='frontend angularjs'
+alias aurajs='frontend aurajs'
+alias bem='frontend bem'
+alias bootsnipp='frontend bootsnipp'
+alias caniuse='frontend caniuse'
+alias codepen='frontend codepen'
+alias compassdoc='frontend compassdoc'
+alias cssflow='frontend cssflow'
+alias dartlang='frontend dartlang'
+alias emberjs='frontend emberjs'
+alias fontello='frontend fontello'
+alias html5please='frontend html5please'
+alias jquery='frontend jquery'
+alias lodash='frontend lodash'
+alias mdn='frontend mdn'
+alias npmjs='frontend npmjs'
+alias qunit='frontend qunit'
+alias reactjs='frontend reactjs'
+alias smacss='frontend smacss'
+alias stackoverflow='frontend stackoverflow'
+alias unheap='frontend unheap'
function frontend() {
-
- # get the open command
- local open_cmd
- if [[ $(uname -s) == 'Darwin' ]]; then
- open_cmd='open'
- else
- open_cmd='xdg-open'
- fi
-
- # no keyword provided, simply show how call methods
- if [[ $# -le 1 ]]; then
- echo "Please provide a search-content and a search-term for app.\nEx:\nfrontend <search-content> <search-term>\n"
- return 1
+ emulate -L zsh
+
+ # define search context URLS
+ typeset -A urls
+ urls=(
+ angularjs 'https://google.com/search?as_sitesearch=angularjs.org&as_q='
+ aurajs 'http://aurajs.com/api/#stq='
+ bem 'https://google.com/search?as_sitesearch=bem.info&as_q='
+ bootsnipp 'http://bootsnipp.com/search?q='
+ caniuse 'http://caniuse.com/#search='
+ codepen 'http://codepen.io/search?q='
+ compassdoc 'http://compass-style.org/search?q='
+ cssflow 'http://www.cssflow.com/search?q='
+ dartlang 'https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart:'
+ emberjs 'http://emberjs.com/api/#stp=1&stq='
+ fontello 'http://fontello.com/#search='
+ html5please 'http://html5please.com/#'
+ jquery 'https://api.jquery.com/?s='
+ lodash 'https://devdocs.io/lodash/index#'
+ mdn 'https://developer.mozilla.org/search?q='
+ npmjs 'https://www.npmjs.com/search?q='
+ qunit 'https://api.qunitjs.com/?s='
+ reactjs 'https://google.com/search?as_sitesearch=facebook.github.io/react&as_q='
+ smacss 'https://google.com/search?as_sitesearch=smacss.com&as_q='
+ stackoverflow 'http://stackoverflow.com/search?q='
+ unheap 'http://www.unheap.com/?s='
+ )
+
+ # show help for command list
+ if [[ $# -lt 2 ]]
+ then
+ print -P "Usage: frontend %Ucontext%u %Uterm%u [...%Umore%u] (or just: %Ucontext%u %Uterm%u [...%Umore%u])"
+ print -P ""
+ print -P "%Uterm%u and what follows is what will be searched for in the %Ucontext%u website,"
+ print -P "and %Ucontext%u is one of the following:"
+ print -P ""
+ print -P " angularjs, aurajs, bem, bootsnipp, caniuse, codepen, compassdoc, cssflow,"
+ print -P " dartlang, emberjs, fontello, html5please, jquery, lodash, mdn, npmjs,"
+ print -P " qunit, reactjs, smacss, stackoverflow, unheap"
+ print -P ""
+ print -P "For example: frontend npmjs mocha (or just: npmjs mocha)."
+ print -P ""
+ return 1
fi
- # check whether the search engine is supported
- if [[ ! $1 =~ '(jquery|mdn|compass|html5please|caniuse|aurajs|dartlang|qunit|fontello|bootsnipp|cssflow|codepen|unheap|bem|smacss|angularjs|reactjs|emberjs|stackoverflow)' ]];
+ # check whether the search context is supported
+ if [[ -z "$urls[$1]" ]]
then
- echo "Search valid search content $1 not supported."
- echo "Valid contents: (formats 'frontend <search-content>' or '<search-content>')"
- echo "* jquery"
- echo "* mdn"
- echo "* compass"
- echo "* html5please"
- echo "* caniuse"
- echo "* aurajs"
- echo "* dartlang"
- echo "* lodash"
- echo "* qunit"
- echo "* fontello"
- echo "* bootsnipp"
- echo "* cssflow"
- echo "* codepen"
- echo "* unheap"
- echo "* bem"
- echo "* smacss"
- echo "* angularjs"
- echo "* reactjs"
- echo "* emberjs"
- echo "* stackoverflow"
+ echo "Search context \"$1\" currently not supported."
+ echo ""
+ echo "Valid contexts are:"
+ echo ""
+ echo " angularjs, aurajs, bem, bootsnipp, caniuse, codepen, compassdoc, cssflow, "
+ echo " dartlang, emberjs, fontello, html5please, jquery, lodash, mdn, npmjs, "
+ echo " qunit, reactjs, smacss, stackoverflow, unheap"
echo ""
-
return 1
fi
- local url="http://"
- local query=""
-
- case "$1" in
- "jquery")
- url="${url}api.jquery.com"
- url="${url}/?s=$2" ;;
- "mdn")
- url="${url}developer.mozilla.org"
- url="${url}/search?q=$2" ;;
- "compass")
- url="${url}compass-style.org"
- url="${url}/search?q=$2" ;;
- "html5please")
- url="${url}html5please.com"
- url="${url}/#$2" ;;
- "caniuse")
- url="${url}caniuse.com"
- url="${url}/#search=$2" ;;
- "aurajs")
- url="${url}aurajs.com"
- url="${url}/api/#stq=$2" ;;
- "dartlang")
- url="${url}api.dartlang.org/apidocs/channels/stable/dartdoc-viewer"
- url="${url}/dart-$2" ;;
- "qunit")
- url="${url}api.qunitjs.com"
- url="${url}/?s=$2" ;;
- "fontello")
- url="${url}fontello.com"
- url="${url}/#search=$2" ;;
- "bootsnipp")
- url="${url}bootsnipp.com"
- url="${url}/search?q=$2" ;;
- "cssflow")
- url="${url}cssflow.com"
- url="${url}/search?q=$2" ;;
- "codepen")
- url="${url}codepen.io"
- url="${url}/search?q=$2" ;;
- "unheap")
- url="${url}www.unheap.com"
- url="${url}/?s=$2" ;;
- "bem")
- url="${url}google.com"
- url="${url}/search?as_q=$2&as_sitesearch=bem.info" ;;
- "smacss")
- url="${url}google.com"
- url="${url}/search?as_q=$2&as_sitesearch=smacss.com" ;;
- "angularjs")
- url="${url}google.com"
- url="${url}/search?as_q=$2&as_sitesearch=angularjs.org" ;;
- "reactjs")
- url="${url}google.com"
- url="${url}/search?as_q=$2&as_sitesearch=facebook.github.io/react" ;;
- "emberjs")
- url="${url}emberjs.com"
- url="${url}/api/#stq=$2&stp=1" ;;
- "stackoverflow")
- url="${url}stackoverflow.com"
- url="${url}/search?q=$2" ;;
- *) echo "INVALID PARAM!"
- return ;;
- esac
-
- echo "$url"
+ # build search url:
+ # join arguments passed with '+', then append to search context URL
+ # TODO substitute for proper urlencode method
+ url="${urls[$1]}${(j:+:)@[2,-1]}"
- $open_cmd "$url"
+ echo "Opening $url ..."
+ open_command "$url"
}
-
-# javascript
-alias jquery='frontend jquery'
-alias mdn='frontend mdn'
-
-# pre processors frameworks
-alias compassdoc='frontend compass'
-
-# important links
-alias html5please='frontend html5please'
-alias caniuse='frontend caniuse'
-
-# components and libraries
-alias aurajs='frontend aurajs'
-alias dartlang='frontend dartlang'
-alias lodash='frontend lodash'
-
-#tests
-alias qunit='frontend qunit'
-
-#fonts
-alias fontello='frontend fontello'
-
-# snippets
-alias bootsnipp='frontend bootsnipp'
-alias cssflow='frontend cssflow'
-alias codepen='frontend codepen'
-alias unheap='frontend unheap'
-
-# css architecture
-alias bem='frontend bem'
-alias smacss='frontend smacss'
-
-# frameworks
-alias angularjs='frontend angularjs'
-alias reactjs='frontend reactjs'
-alias emberjs='frontend emberjs'
-
-# search websites
-alias stackoverflow='frontend stackoverflow'
diff --git a/plugins/git-extras/README.md b/plugins/git-extras/README.md
new file mode 100644
index 000000000..8f12e297e
--- /dev/null
+++ b/plugins/git-extras/README.md
@@ -0,0 +1,11 @@
+# git-extras
+
+This plugin provides completion definitions for some of the commands defined by [git-extras](http://github.com/tj/git-extras).
+
+## Setup notes
+
+The completions work by augmenting the `_git` completion provided by `zsh`. This only works with the `zsh`-provided `_git`, not the `_git` provided by `git` itself. If you have both `zsh` and `git` installed, you need to make sure that the `zsh`-provided `_git` takes precedence.
+
+### OS X Homebrew Setup
+
+On OS X with Homebrew, you need to install `git` with `brew install git --without-completions`. Otherwise, `git`'s `_git` will take precedence, and you won't see the completions for `git-extras` commands.
diff --git a/plugins/git-extras/git-extras.plugin.zsh b/plugins/git-extras/git-extras.plugin.zsh
index 8419166ab..0dcd630e8 100644
--- a/plugins/git-extras/git-extras.plugin.zsh
+++ b/plugins/git-extras/git-extras.plugin.zsh
@@ -1,45 +1,62 @@
-#compdef git
# ------------------------------------------------------------------------------
# Description
# -----------
#
-# Completion script for git-extras (http://github.com/visionmedia/git-extras).
+# Completion script for git-extras (http://github.com/tj/git-extras).
+#
+# This depends on and reuses some of the internals of the _git completion
+# function that ships with zsh itself. It will not work with the _git that ships
+# with git.
#
# ------------------------------------------------------------------------------
# Authors
# -------
#
# * Alexis GRIMALDI (https://github.com/agrimaldi)
+# * spacewander (https://github.com/spacewander)
#
# ------------------------------------------------------------------------------
# Inspirations
# -----------
#
-# * git-extras (http://github.com/visionmedia/git-extras)
+# * git-extras (http://github.com/tj/git-extras)
# * git-flow-completion (http://github.com/bobthecow/git-flow-completion)
#
# ------------------------------------------------------------------------------
-__git_command_successful () {
- if (( ${#pipestatus:#0} > 0 )); then
- _message 'not a git repository'
- return 1
- fi
- return 0
+# Internal functions
+# These are a lot like their __git_* equivalents inside _git
+
+__gitex_command_successful () {
+ if (( ${#*:#0} > 0 )); then
+ _message 'not a git repository'
+ return 1
+ fi
+ return 0
}
+__gitex_commits() {
+ declare -A commits
+ git log --oneline -15 | sed 's/\([[:alnum:]]\{7\}\) /\1:/' | while read commit
+ do
+ hash=$(echo $commit | cut -d':' -f1)
+ commits[$hash]="$commit"
+ done
+ local ret=1
+ _describe -t commits commit commits && ret=0
+}
-__git_tag_names() {
+__gitex_tag_names() {
local expl
declare -a tag_names
- tag_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/tags 2>/dev/null)"}#refs/tags/})
+ tag_names=(${${(f)"$(_call_program tags git for-each-ref --format='"%(refname)"' refs/tags 2>/dev/null)"}#refs/tags/})
__git_command_successful || return
_wanted tag-names expl tag-name compadd $* - $tag_names
}
-__git_branch_names() {
+__gitex_branch_names() {
local expl
declare -a branch_names
branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads 2>/dev/null)"}#refs/heads/})
@@ -47,44 +64,36 @@ __git_branch_names() {
_wanted branch-names expl branch-name compadd $* - $branch_names
}
-
-__git_feature_branch_names() {
+__gitex_specific_branch_names() {
local expl
declare -a branch_names
- branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads/feature 2>/dev/null)"}#refs/heads/feature/})
+ branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads/"$1" 2>/dev/null)"}#refs/heads/$1/})
__git_command_successful || return
_wanted branch-names expl branch-name compadd $* - $branch_names
}
-
-__git_refactor_branch_names() {
- local expl
- declare -a branch_names
- branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads/refactor 2>/dev/null)"}#refs/heads/refactor/})
- __git_command_successful || return
- _wanted branch-names expl branch-name compadd $* - $branch_names
+__gitex_feature_branch_names() {
+ __gitex_specific_branch_names 'feature'
}
-
-__git_bug_branch_names() {
- local expl
- declare -a branch_names
- branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads/bug 2>/dev/null)"}#refs/heads/bug/})
- __git_command_successful || return
- _wanted branch-names expl branch-name compadd $* - $branch_names
+__gitex_refactor_branch_names() {
+ __gitex_specific_branch_names 'refactor'
}
+__gitex_bug_branch_names() {
+ __gitex_specific_branch_names 'bug'
+}
-__git_submodule_names() {
+__gitex_submodule_names() {
local expl
declare -a submodule_names
- submodule_names=(${(f)"$(_call_program branchrefs git submodule status | awk '{print $2}')"})
+ submodule_names=(${(f)"$(_call_program branchrefs git submodule status | awk '{print $2}')"}) # '
__git_command_successful || return
_wanted submodule-names expl submodule-name compadd $* - $submodule_names
}
-__git_author_names() {
+__gitex_author_names() {
local expl
declare -a author_names
author_names=(${(f)"$(_call_program branchrefs git log --format='%aN' | sort -u)"})
@@ -92,22 +101,46 @@ __git_author_names() {
_wanted author-names expl author-name compadd $* - $author_names
}
+# subcommands
-_git-changelog() {
- _arguments \
- '(-l --list)'{-l,--list}'[list commits]' \
+_git-bug() {
+ local curcontext=$curcontext state line ret=1
+ declare -A opt_args
+
+ _arguments -C \
+ ': :->command' \
+ '*:: :->option-or-argument' && ret=0
+
+ case $state in
+ (command)
+ declare -a commands
+ commands=(
+ 'finish:merge bug into the current branch'
+ )
+ _describe -t commands command commands && ret=0
+ ;;
+ (option-or-argument)
+ curcontext=${curcontext%:*}-$line[1]:
+ case $line[1] in
+ (finish)
+ _arguments -C \
+ ':branch-name:__gitex_bug_branch_names'
+ ;;
+ esac
+ esac
}
-_git-effort() {
+_git-changelog() {
_arguments \
- '--above[ignore file with less than x commits]' \
+ '(-l --list)'{-l,--list}'[list commits]' \
}
+
_git-contrib() {
_arguments \
- ':author:__git_author_names'
+ ':author:__gitex_author_names'
}
@@ -119,19 +152,25 @@ _git-count() {
_git-delete-branch() {
_arguments \
- ':branch-name:__git_branch_names'
+ ':branch-name:__gitex_branch_names'
}
_git-delete-submodule() {
_arguments \
- ':submodule-name:__git_submodule_names'
+ ':submodule-name:__gitex_submodule_names'
}
_git-delete-tag() {
_arguments \
- ':tag-name:__git_tag_names'
+ ':tag-name:__gitex_tag_names'
+}
+
+
+_git-effort() {
+ _arguments \
+ '--above[ignore file with less than x commits]'
}
@@ -154,20 +193,7 @@ _git-extras() {
esac
_arguments \
- '(-v --version)'{-v,--version}'[show current version]' \
-}
-
-
-_git-graft() {
- _arguments \
- ':src-branch-name:__git_branch_names' \
- ':dest-branch-name:__git_branch_names'
-}
-
-
-_git-squash() {
- _arguments \
- ':branch-name:__git_branch_names'
+ '(-v --version)'{-v,--version}'[show current version]'
}
@@ -192,13 +218,34 @@ _git-feature() {
case $line[1] in
(finish)
_arguments -C \
- ':branch-name:__git_feature_branch_names'
+ ':branch-name:__gitex_feature_branch_names'
;;
esac
esac
}
+_git-graft() {
+ _arguments \
+ ':src-branch-name:__gitex_branch_names' \
+ ':dest-branch-name:__gitex_branch_names'
+}
+
+
+_git-ignore() {
+ _arguments -C \
+ '(--local -l)'{--local,-l}'[show local gitignore]' \
+ '(--global -g)'{--global,-g}'[show global gitignore]'
+}
+
+
+_git-missing() {
+ _arguments \
+ ':first-branch-name:__gitex_branch_names' \
+ ':second-branch-name:__gitex_branch_names'
+}
+
+
_git-refactor() {
local curcontext=$curcontext state line ret=1
declare -A opt_args
@@ -220,66 +267,69 @@ _git-refactor() {
case $line[1] in
(finish)
_arguments -C \
- ':branch-name:__git_refactor_branch_names'
+ ':branch-name:__gitex_refactor_branch_names'
;;
esac
esac
}
-_git-bug() {
- local curcontext=$curcontext state line ret=1
- declare -A opt_args
-
- _arguments -C \
- ': :->command' \
- '*:: :->option-or-argument' && ret=0
+_git-squash() {
+ _arguments \
+ ':branch-name:__gitex_branch_names'
+}
- case $state in
- (command)
- declare -a commands
- commands=(
- 'finish:merge bug into the current branch'
- )
- _describe -t commands command commands && ret=0
- ;;
- (option-or-argument)
- curcontext=${curcontext%:*}-$line[1]:
- case $line[1] in
- (finish)
- _arguments -C \
- ':branch-name:__git_bug_branch_names'
- ;;
- esac
- esac
+_git-summary() {
+ _arguments '--line[summarize with lines rather than commits]'
+ __gitex_commits
}
+_git-undo(){
+ _arguments -C \
+ '(--soft -s)'{--soft,-s}'[only rolls back the commit but changes remain un-staged]' \
+ '(--hard -h)'{--hard,-h}'[wipes your commit(s)]'
+}
+
zstyle ':completion:*:*:git:*' user-commands \
+ alias:'define, search and show aliases' \
+ archive-file:'export the current HEAD of the git repository to a archive' \
+ back:'undo and stage latest commits' \
+ bug:'create a bug branch' \
changelog:'populate changelog file with commits since the previous tag' \
+ commits-since:'list commits since a given date' \
contrib:'display author contributions' \
count:'count commits' \
+ create-branch:'create local and remote branch' \
delete-branch:'delete local and remote branch' \
+ delete-merged-branches:'delete merged branches'\
delete-submodule:'delete submodule' \
delete-tag:'delete local and remote tag' \
+ effort:'display effort statistics' \
extras:'git-extras' \
- graft:'merge commits from source branch to destination branch' \
- squash:'merge commits from source branch into the current one as a single commit' \
feature:'create a feature branch' \
- refactor:'create a refactor branch' \
- bug:'create a bug branch' \
- summary:'repository summary' \
- effort:'display effort statistics' \
- repl:'read-eval-print-loop' \
- commits-since:'list commits since a given date' \
- release:'release commit with the given tag' \
- alias:'define, search and show aliases' \
+ fork:'fork a repo on github' \
+ fresh-branch:'create empty local branch' \
+ gh-pages:'create the GitHub Pages branch' \
+ graft:'merge commits from source branch to destination branch' \
ignore:'add patterns to .gitignore' \
info:'show info about the repository' \
- create-branch:'create local and remote branch' \
- fresh-branch:'create empty local branch' \
- undo:'remove the latest commit' \
+ local-commits:'list unpushed commits on the local branch' \
+ lock:'lock a file excluded from version control' \
+ locked:'ls files that have been locked' \
+ missing:'show commits missing from another branch' \
+ pr:'checks out a pull request locally' \
+ rebase-patch:'rebases a patch' \
+ refactor:'create a refactor branch' \
+ release:'commit, tag and push changes to the repository' \
+ rename-tag:'rename a tag' \
+ repl:'read-eval-print-loop' \
+ reset-file:'reset one file' \
+ root:'show path of root' \
setup:'setup a git repository' \
+ show-tree:'show branch tree of commit history' \
+ squash:'merge commits from source branch into the current one as a single commit' \
+ summary:'repository summary' \
touch:'one step creation of new files' \
- obliterate:'Completely remove a file from the repository, including past commits and tags' \
- local-commits:'list unpushed commits on the local branch' \
+ undo:'remove the latest commit' \
+ unlock:'unlock a file excluded from version control'
diff --git a/plugins/git-flow/git-flow.plugin.zsh b/plugins/git-flow/git-flow.plugin.zsh
index 4357c0895..a8386cb19 100644
--- a/plugins/git-flow/git-flow.plugin.zsh
+++ b/plugins/git-flow/git-flow.plugin.zsh
@@ -6,7 +6,7 @@
# To achieve git-flow completion nirvana:
#
# 0. Update your zsh's git-completion module to the newest version.
-# From here. http://zsh.git.sourceforge.net/git/gitweb.cgi?p=zsh/zsh;a=blob_plain;f=Completion/Unix/Command/_git;hb=HEAD
+# From here. https://raw.githubusercontent.com/zsh-users/zsh/master/Completion/Unix/Command/_git
#
# 1. Install this file. Either:
#
@@ -21,7 +21,7 @@
#
#Alias
-alias gf='git flow'
+alias gfl='git flow'
alias gcd='git checkout develop'
alias gch='git checkout hotfix'
alias gcr='git checkout release'
diff --git a/plugins/git-hubflow/git-hubflow.plugin.zsh b/plugins/git-hubflow/git-hubflow.plugin.zsh
index 4cf5b9177..b0157c7a1 100644
--- a/plugins/git-hubflow/git-hubflow.plugin.zsh
+++ b/plugins/git-hubflow/git-hubflow.plugin.zsh
@@ -20,6 +20,13 @@
# c. Or, use this file as an oh-my-zsh plugin.
#
+alias ghf='git hf'
+alias ghff='git hf feature'
+alias ghfr='git hf release'
+alias ghfh='git hf hotfix'
+alias ghfs='git hf support'
+alias ghfu='git hf update'
+
_git-hf ()
{
local curcontext="$curcontext" state line
diff --git a/plugins/git-prompt/git-prompt.plugin.zsh b/plugins/git-prompt/git-prompt.plugin.zsh
index d868a5fe1..5175bf70f 100644
--- a/plugins/git-prompt/git-prompt.plugin.zsh
+++ b/plugins/git-prompt/git-prompt.plugin.zsh
@@ -1,57 +1,92 @@
# ZSH Git Prompt Plugin from:
# http://github.com/olivierverdier/zsh-git-prompt
-#
-export __GIT_PROMPT_DIR=$ZSH/plugins/git-prompt
-# Allow for functions in the prompt.
-setopt PROMPT_SUBST
+__GIT_PROMPT_DIR="${0:A:h}"
-## Enable auto-execution of functions.
-typeset -ga preexec_functions
-typeset -ga precmd_functions
-typeset -ga chpwd_functions
-
-# Append git functions needed for prompt.
-preexec_functions+='preexec_update_git_vars'
-precmd_functions+='precmd_update_git_vars'
-chpwd_functions+='chpwd_update_git_vars'
+## Hook function definitions
+function chpwd_update_git_vars() {
+ update_current_git_vars
+}
-## Function definitions
function preexec_update_git_vars() {
case "$2" in
- git*)
+ git*|hub*|gh*|stg*)
__EXECUTED_GIT_COMMAND=1
;;
esac
}
function precmd_update_git_vars() {
- if [ -n "$__EXECUTED_GIT_COMMAND" ]; then
+ if [ -n "$__EXECUTED_GIT_COMMAND" ] || [ ! -n "$ZSH_THEME_GIT_PROMPT_CACHE" ]; then
update_current_git_vars
unset __EXECUTED_GIT_COMMAND
fi
}
-function chpwd_update_git_vars() {
- update_current_git_vars
-}
+chpwd_functions+=(chpwd_update_git_vars)
+precmd_functions+=(precmd_update_git_vars)
+preexec_functions+=(preexec_update_git_vars)
+
+## Function definitions
function update_current_git_vars() {
unset __CURRENT_GIT_STATUS
local gitstatus="$__GIT_PROMPT_DIR/gitstatus.py"
- _GIT_STATUS=`python ${gitstatus}`
- __CURRENT_GIT_STATUS=("${(f)_GIT_STATUS}")
+ _GIT_STATUS=$(python ${gitstatus} 2>/dev/null)
+ __CURRENT_GIT_STATUS=("${(@s: :)_GIT_STATUS}")
+ GIT_BRANCH=$__CURRENT_GIT_STATUS[1]
+ GIT_AHEAD=$__CURRENT_GIT_STATUS[2]
+ GIT_BEHIND=$__CURRENT_GIT_STATUS[3]
+ GIT_STAGED=$__CURRENT_GIT_STATUS[4]
+ GIT_CONFLICTS=$__CURRENT_GIT_STATUS[5]
+ GIT_CHANGED=$__CURRENT_GIT_STATUS[6]
+ GIT_UNTRACKED=$__CURRENT_GIT_STATUS[7]
}
-function prompt_git_info() {
+git_super_status() {
+ precmd_update_git_vars
if [ -n "$__CURRENT_GIT_STATUS" ]; then
- echo "(%{${fg[red]}%}$__CURRENT_GIT_STATUS[1]%{${fg[default]}%}$__CURRENT_GIT_STATUS[2]%{${fg[magenta]}%}$__CURRENT_GIT_STATUS[3]%{${fg[default]}%})"
+ STATUS="$ZSH_THEME_GIT_PROMPT_PREFIX$ZSH_THEME_GIT_PROMPT_BRANCH$GIT_BRANCH%{${reset_color}%}"
+ if [ "$GIT_BEHIND" -ne "0" ]; then
+ STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_BEHIND$GIT_BEHIND%{${reset_color}%}"
+ fi
+ if [ "$GIT_AHEAD" -ne "0" ]; then
+ STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_AHEAD$GIT_AHEAD%{${reset_color}%}"
+ fi
+ STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_SEPARATOR"
+ if [ "$GIT_STAGED" -ne "0" ]; then
+ STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_STAGED$GIT_STAGED%{${reset_color}%}"
+ fi
+ if [ "$GIT_CONFLICTS" -ne "0" ]; then
+ STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_CONFLICTS$GIT_CONFLICTS%{${reset_color}%}"
+ fi
+ if [ "$GIT_CHANGED" -ne "0" ]; then
+ STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_CHANGED$GIT_CHANGED%{${reset_color}%}"
+ fi
+ if [ "$GIT_UNTRACKED" -ne "0" ]; then
+ STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED%{${reset_color}%}"
+ fi
+ if [ "$GIT_CHANGED" -eq "0" ] && [ "$GIT_CONFLICTS" -eq "0" ] && [ "$GIT_STAGED" -eq "0" ] && [ "$GIT_UNTRACKED" -eq "0" ]; then
+ STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_CLEAN"
+ fi
+ STATUS="$STATUS%{${reset_color}%}$ZSH_THEME_GIT_PROMPT_SUFFIX"
+ echo "$STATUS"
fi
}
+# Default values for the appearance of the prompt.
+ZSH_THEME_GIT_PROMPT_PREFIX="("
+ZSH_THEME_GIT_PROMPT_SUFFIX=")"
+ZSH_THEME_GIT_PROMPT_SEPARATOR="|"
+ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg_bold[magenta]%}"
+ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[red]%}%{â—%G%}"
+ZSH_THEME_GIT_PROMPT_CONFLICTS="%{$fg[red]%}%{✖%G%}"
+ZSH_THEME_GIT_PROMPT_CHANGED="%{$fg[blue]%}%{✚%G%}"
+ZSH_THEME_GIT_PROMPT_BEHIND="%{↓%G%}"
+ZSH_THEME_GIT_PROMPT_AHEAD="%{↑%G%}"
+ZSH_THEME_GIT_PROMPT_UNTRACKED="%{…%G%}"
+ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}%{✔%G%}"
+
# Set the prompt.
-#PROMPT='%B%m%~%b$(prompt_git_info) %# '
-# for a right prompt:
-#RPROMPT='%b$(prompt_git_info)'
-RPROMPT='$(prompt_git_info)'
+RPROMPT='$(git_super_status)'
diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py
index 256841432..a8eb8284b 100644
--- a/plugins/git-prompt/gitstatus.py
+++ b/plugins/git-prompt/gitstatus.py
@@ -1,82 +1,84 @@
#!/usr/bin/env python
-# -*- coding: UTF-8 -*-
-from subprocess import Popen, PIPE
-import re
+from __future__ import print_function
-# change those symbols to whatever you prefer
-symbols = {
- 'ahead of': '↑',
- 'behind': '↓',
- 'staged': '♦',
- 'changed': '‣',
- 'untracked': '…',
- 'clean': 'âš¡',
- 'unmerged': '≠',
- 'sha1': ':'
-}
+import sys
+import re
+import shlex
+from subprocess import Popen, PIPE, check_output
-output, error = Popen(
- ['git', 'status'], stdout=PIPE, stderr=PIPE, universal_newlines=True).communicate()
-if error:
- import sys
- sys.exit(0)
-lines = output.splitlines()
+def get_tagname_or_hash():
+ """return tagname if exists else hash"""
+ cmd = 'git log -1 --format="%h%d"'
+ output = check_output(shlex.split(cmd)).decode('utf-8').strip()
+ hash_, tagname = None, None
+ # get hash
+ m = re.search('\(.*\)$', output)
+ if m:
+ hash_ = output[:m.start()-1]
+ # get tagname
+ m = re.search('tag: .*[,\)]', output)
+ if m:
+ tagname = 'tags/' + output[m.start()+len('tag: '): m.end()-1]
-behead_re = re.compile(
- r"^# Your branch is (ahead of|behind) '(.*)' by (\d+) commit")
-diverge_re = re.compile(r"^# and have (\d+) and (\d+) different")
+ if tagname:
+ return tagname
+ elif hash_:
+ return hash_
+ return None
-status = ''
-staged = re.compile(r'^# Changes to be committed:$', re.MULTILINE)
-changed = re.compile(r'^# Changed but not updated:$', re.MULTILINE)
-untracked = re.compile(r'^# Untracked files:$', re.MULTILINE)
-unmerged = re.compile(r'^# Unmerged paths:$', re.MULTILINE)
+# `git status --porcelain --branch` can collect all information
+# branch, remote_branch, untracked, staged, changed, conflicts, ahead, behind
+po = Popen(['git', 'status', '--porcelain', '--branch'], stdout=PIPE, stderr=PIPE)
+stdout, sterr = po.communicate()
+if po.returncode != 0:
+ sys.exit(0) # Not a git repository
-def execute(*command):
- out, err = Popen(stdout=PIPE, stderr=PIPE, *command).communicate()
- if not err:
- nb = len(out.splitlines())
+# collect git status information
+untracked, staged, changed, conflicts = [], [], [], []
+ahead, behind = 0, 0
+status = [(line[0], line[1], line[2:]) for line in stdout.decode('utf-8').splitlines()]
+for st in status:
+ if st[0] == '#' and st[1] == '#':
+ if re.search('Initial commit on', st[2]):
+ branch = st[2].split(' ')[-1]
+ elif re.search('no branch', st[2]): # detached status
+ branch = get_tagname_or_hash()
+ elif len(st[2].strip().split('...')) == 1:
+ branch = st[2].strip()
+ else:
+ # current and remote branch info
+ branch, rest = st[2].strip().split('...')
+ if len(rest.split(' ')) == 1:
+ # remote_branch = rest.split(' ')[0]
+ pass
+ else:
+ # ahead or behind
+ divergence = ' '.join(rest.split(' ')[1:])
+ divergence = divergence.lstrip('[').rstrip(']')
+ for div in divergence.split(', '):
+ if 'ahead' in div:
+ ahead = int(div[len('ahead '):].strip())
+ elif 'behind' in div:
+ behind = int(div[len('behind '):].strip())
+ elif st[0] == '?' and st[1] == '?':
+ untracked.append(st)
else:
- nb = '?'
- return nb
-
-if staged.search(output):
- nb = execute(
- ['git', 'diff', '--staged', '--name-only', '--diff-filter=ACDMRT'])
- status += '%s%s' % (symbols['staged'], nb)
-if unmerged.search(output):
- nb = execute(['git', 'diff', '--staged', '--name-only', '--diff-filter=U'])
- status += '%s%s' % (symbols['unmerged'], nb)
-if changed.search(output):
- nb = execute(['git', 'diff', '--name-only', '--diff-filter=ACDMRT'])
- status += '%s%s' % (symbols['changed'], nb)
-if untracked.search(output):
- status += symbols['untracked']
-if status == '':
- status = symbols['clean']
-
-remote = ''
-
-bline = lines[0]
-if bline.find('Not currently on any branch') != -1:
- branch = symbols['sha1'] + Popen([
- 'git',
- 'rev-parse',
- '--short',
- 'HEAD'], stdout=PIPE).communicate()[0][:-1]
-else:
- branch = bline.split(' ')[-1]
- bstatusline = lines[1]
- match = behead_re.match(bstatusline)
- if match:
- remote = symbols[match.groups()[0]]
- remote += match.groups()[2]
- elif lines[2:]:
- div_match = diverge_re.match(lines[2])
- if div_match:
- remote = "{behind}{1}{ahead of}{0}".format(
- *div_match.groups(), **symbols)
+ if st[1] == 'M':
+ changed.append(st)
+ if st[0] == 'U':
+ conflicts.append(st)
+ elif st[0] != ' ':
+ staged.append(st)
-print('\n'.join([branch, remote, status]))
+out = ' '.join([
+ branch,
+ str(ahead),
+ str(behind),
+ str(len(staged)),
+ str(len(conflicts)),
+ str(len(changed)),
+ str(len(untracked)),
+])
+print(out, end='')
diff --git a/plugins/git/README.md b/plugins/git/README.md
index 8462dda1c..76da2a8ae 100644
--- a/plugins/git/README.md
+++ b/plugins/git/README.md
@@ -1,4 +1,10 @@
## git
-**Maintainer:** [Stibbons](https://github.com/Stibbons)
-This plugin adds several git aliases and increase the completion function provided by zsh
+**Maintainer:** [@ncanceill](https://github.com/ncanceill)
+
+This plugin adds many useful aliases and functions.
+
+### Usage
+
+See the [wiki](https://github.com/robbyrussell/oh-my-zsh/wiki/Plugin:git) for a list of aliases and functions provided by the plugin.
+
diff --git a/plugins/git/_git-branch b/plugins/git/_git-branch
deleted file mode 100644
index 6b9c1a483..000000000
--- a/plugins/git/_git-branch
+++ /dev/null
@@ -1,83 +0,0 @@
-#compdef git-branch
-
-_git-branch ()
-{
- declare l c m d
-
- l='--color --no-color -r -a --all -v --verbose --abbrev --no-abbrev'
- c='-l -f --force -t --track --no-track --set-upstream --contains --merged --no-merged'
- m='-m -M'
- d='-d -D'
-
- declare -a dependent_creation_args
- if (( words[(I)-r] == 0 )); then
- dependent_creation_args=(
- "($l $m $d): :__git_branch_names"
- "::start-point:__git_revisions")
- fi
-
- declare -a dependent_deletion_args
- if (( words[(I)-d] || words[(I)-D] )); then
- dependent_creation_args=
- dependent_deletion_args=(
- '-r[delete only remote-tracking branches]')
- if (( words[(I)-r] )); then
- dependent_deletion_args+='*: :__git_ignore_line_inside_arguments __git_remote_branch_names'
- else
- dependent_deletion_args+='*: :__git_ignore_line_inside_arguments __git_branch_names'
- fi
- fi
-
- declare -a dependent_modification_args
- if (( words[(I)-m] || words[(I)-M] )); then
- dependent_creation_args=
- dependent_modification_args=(
- ':old or new branch name:__git_branch_names'
- '::new branch name:__git_branch_names')
- fi
-
- _arguments -w -S -s \
- "($c $m $d --no-color :)--color=-[turn on branch coloring]:: :__git_color_whens" \
- "($c $m $d : --color)--no-color[turn off branch coloring]" \
- "($c $m -a --all)-r[list or delete only remote-tracking branches]" \
- "($c $m $d : -r)"{-a,--all}"[list both remote-tracking branches and local branches]" \
- "($c $m $d : -v --verbose)"{-v,--verbose}'[show SHA1 and commit subject line for each head]' \
- "($c $m $d :)--abbrev=[set minimum SHA1 display-length]: :__git_guard_number length" \
- "($c $m $d :)--no-abbrev[do not abbreviate sha1s]" \
- "($l $m $d)-l[create the branch's reflog]" \
- "($l $m $d -f --force)"{-f,--force}"[force the creation of a new branch]" \
- "($l $m $d -t --track)"{-t,--track}"[set up configuration so that pull merges from the start point]" \
- "($l $m $d)--no-track[override the branch.autosetupmerge configuration variable]" \
- "($l $m $d)--set-upstream[set up configuration so that pull merges]" \
- "($l $m $d)--contains=[only list branches which contain the specified commit]: :__git_committishs" \
- "($l $m $d)--merged=[only list branches which are fully contained by HEAD]: :__git_committishs" \
- "($l $m $d)--no-merged=[do not list branches which are fully contained by HEAD]: :__git_committishs" \
- $dependent_creation_args \
- "($l $c $d -M)-m[rename a branch and the corresponding reflog]" \
- "($l $c $d -m)-M[rename a branch even if the new branch-name already exists]" \
- $dependent_modification_args \
- "($l $c $m -D)-d[delete a fully merged branch]" \
- "($l $c $m -d)-D[delete a branch]" \
- $dependent_deletion_args
-}
-
-(( $+functions[__git_ignore_line] )) ||
-__git_ignore_line () {
- declare -a ignored
- ignored=()
- ((CURRENT > 1)) &&
- ignored+=(${line[1,CURRENT-1]//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH})
- ((CURRENT < $#line)) &&
- ignored+=(${line[CURRENT+1,-1]//(#m)[\[\]()\\*?#<>~\^]/\\$MATCH})
- $* -F ignored
-}
-
-(( $+functions[__git_ignore_line_inside_arguments] )) ||
-__git_ignore_line_inside_arguments () {
- declare -a compadd_opts
-
- zparseopts -D -E -a compadd_opts V: J: 1 2 n f X: M: P: S: r: R: q F:
-
- __git_ignore_line $* $compadd_opts
-}
-
diff --git a/plugins/git/_git-remote b/plugins/git/_git-remote
deleted file mode 100644
index 4ba62a357..000000000
--- a/plugins/git/_git-remote
+++ /dev/null
@@ -1,74 +0,0 @@
-#compdef git-remote
-
-# NOTE: --track is undocumented.
-# TODO: --track, -t, --master, and -m should take remote branches, I guess.
-# NOTE: --master is undocumented.
-# NOTE: --fetch is undocumented.
-_git-remote () {
- local curcontext=$curcontext state line
- declare -A opt_args
-
- _arguments -C \
- ':command:->command' \
- '*::options:->options' && ret=0
-
- case $state in
- (command)
- declare -a commands
-
- commands=(
- 'add:add a new remote'
- 'show:show information about a given remote'
- 'prune:delete all stale tracking branches for a given remote'
- 'update:fetch updates for a set of remotes'
- 'rm:remove a remote from .git/config and all associated tracking branches'
- 'rename:rename a remote from .git/config and update all associated tracking branches'
- 'set-head:sets or deletes the default branch'
- 'set-branches:changes the list of branches tracked by the named remote.'
- 'set-url:changes URL remote points to.'
- )
-
- _describe -t commands 'sub-command' commands && ret=0
- ;;
- (options)
- case $line[1] in
- (add)
- _arguments \
- '*'{--track,-t}'[track given branch instead of default glob refspec]:branch:__git_branch_names' \
- '(--master -m)'{--master,-m}'[set the remote'\''s HEAD to point to given master branch]:branch:__git_branch_names' \
- '(--fetch -f)'{--fetch,-f}'[run git-fetch on the new remote after it has been created]' \
- ':branch name:__git_remotes' \
- ':url:_urls' && ret=0
- ;;
- (show)
- _arguments \
- '-n[do not contact the remote for a list of branches]' \
- ':remote:__git_remotes' && ret=0
- ;;
- (prune)
- _arguments \
- '(--dry-run -n)'{-n,--dry-run}'[do not actually prune, only list what would be done]' \
- ':remote:__git_remotes' && ret=0
- ;;
- (update)
- __git_remote-groups && ret=0
- ;;
- (rm)
- __git_remotes && ret=0
- ;;
- (rename)
- __git_remotes && ret=0
- ;;
- (set-url)
- _arguments \
- '*--push[manipulate push URLs]' \
- '(--add)--add[add URL]' \
- '(--delete)--delete[delete URLs]' \
- ':branch name:__git_remotes' \
- ':url:_urls' && ret=0
- ;;
-
- esac
- ;;
- esac
-}
diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh
index 9da448814..4291da7ba 100644
--- a/plugins/git/git.plugin.zsh
+++ b/plugins/git/git.plugin.zsh
@@ -1,177 +1,217 @@
+# Query/use custom command for `git`.
+zstyle -s ":vcs_info:git:*:-all-" "command" _omz_git_git_cmd
+: ${_omz_git_git_cmd:=git}
+
+#
+# Functions
+#
+
+# The name of the current branch
+# Back-compatibility wrapper for when this function was defined here in
+# the plugin, before being pulled in to core lib/git.zsh as git_current_branch()
+# to fix the core -> git plugin dependency.
+function current_branch() {
+ git_current_branch
+}
+# The list of remotes
+function current_repository() {
+ if ! $_omz_git_git_cmd rev-parse --is-inside-work-tree &> /dev/null; then
+ return
+ fi
+ echo $($_omz_git_git_cmd remote -v | cut -d':' -f 2)
+}
+# Pretty log messages
+function _git_log_prettily(){
+ if ! [ -z $1 ]; then
+ git log --pretty=$1
+ fi
+}
+# Warn if the current branch is a WIP
+function work_in_progress() {
+ if $(git log -n 1 2>/dev/null | grep -q -c "\-\-wip\-\-"); then
+ echo "WIP!!"
+ fi
+}
+
+#
# Aliases
+# (sorted alphabetically)
+#
+
alias g='git'
-compdef g=git
-alias gst='git status'
-compdef _git gst=git-status
-alias gd='git diff'
-compdef _git gd=git-diff
-alias gdc='git diff --cached'
-compdef _git gdc=git-diff
-alias gdt='git diff-tree --no-commit-id --name-only -r'
-compdef _git gdc=git diff-tree --no-commit-id --name-only -r
-alias gl='git pull'
-compdef _git gl=git-pull
-alias gup='git pull --rebase'
-compdef _git gup=git-fetch
-alias gp='git push'
-compdef _git gp=git-push
-alias gd='git diff'
-gdv() { git diff -w "$@" | view - }
-compdef _git gdv=git-diff
-alias gdt='git difftool'
+
+alias ga='git add'
+alias gaa='git add --all'
+alias gapa='git add --patch'
+
+alias gb='git branch'
+alias gba='git branch -a'
+alias gbda='git branch --merged | command grep -vE "^(\*|\s*master\s*$)" | command xargs -n 1 git branch -d'
+alias gbl='git blame -b -w'
+alias gbnm='git branch --no-merged'
+alias gbr='git branch --remote'
+alias gbs='git bisect'
+alias gbsb='git bisect bad'
+alias gbsg='git bisect good'
+alias gbsr='git bisect reset'
+alias gbss='git bisect start'
+
alias gc='git commit -v'
-compdef _git gc=git-commit
alias gc!='git commit -v --amend'
-compdef _git gc!=git-commit
alias gca='git commit -v -a'
-compdef _git gc=git-commit
alias gca!='git commit -v -a --amend'
-compdef _git gca!=git-commit
+alias gcan!='git commit -v -a -s --no-edit --amend'
+alias gcam='git commit -a -m'
+alias gcb='git checkout -b'
+alias gcf='git config --list'
+alias gcl='git clone --recursive'
+alias gclean='git clean -fd'
+alias gpristine='git reset --hard && git clean -dfx'
+alias gcm='git checkout master'
alias gcmsg='git commit -m'
-compdef _git gcmsg=git-commit
alias gco='git checkout'
-compdef _git gco=git-checkout
-alias gcm='git checkout master'
-alias gr='git remote'
-compdef _git gr=git-remote
-alias grv='git remote -v'
-compdef _git grv=git-remote
-alias grmv='git remote rename'
-compdef _git grmv=git-remote
-alias grrm='git remote remove'
-compdef _git grrm=git-remote
-alias grset='git remote set-url'
-compdef _git grset=git-remote
-alias grup='git remote update'
-compdef _git grset=git-remote
-alias grbi='git rebase -i'
-compdef _git grbi=git-rebase
-alias grbc='git rebase --continue'
-compdef _git grbc=git-rebase
-alias grba='git rebase --abort'
-compdef _git grba=git-rebase
-alias gb='git branch'
-compdef _git gb=git-branch
-alias gba='git branch -a'
-compdef _git gba=git-branch
-alias gbr='git branch --remote'
alias gcount='git shortlog -sn'
compdef gcount=git
-alias gcl='git config --list'
alias gcp='git cherry-pick'
-compdef _git gcp=git-cherry-pick
-alias glg='git log --stat --max-count=10'
-compdef _git glg=git-log
-alias glgg='git log --graph --max-count=10'
-compdef _git glgg=git-log
-alias glgga='git log --graph --decorate --all'
-compdef _git glgga=git-log
-alias glo='git log --oneline --decorate --color'
-compdef _git glo=git-log
-alias glog='git log --oneline --decorate --color --graph'
-compdef _git glog=git-log
-alias gss='git status -s'
-compdef _git gss=git-status
-alias ga='git add'
-compdef _git ga=git-add
-alias gap='git add --patch'
-alias gaa='git add --all'
-alias gm='git merge'
-compdef _git gm=git-merge
-alias grh='git reset HEAD'
-alias grhh='git reset HEAD --hard'
-alias gclean='git reset --hard && git clean -dfx'
-alias gwc='git whatchanged -p --abbrev-commit --pretty=medium'
-
-# Sign and verify commits with GPG
alias gcs='git commit -S'
-compdef _git gcs=git-commit
-alias gsps='git show --pretty=short --show-signature'
-compdef _git gsps=git-show
-# Sign and verify tags with GPG
-alias gts='git tag -s'
-compdef _git gts=git-tag
-alias gvt='git verify-tag'
-compdef _git gvt=git verify-tag
-
-#remove the gf alias
-#alias gf='git ls-files | grep'
+alias gd='git diff'
+alias gdca='git diff --cached'
+alias gdct='git describe --tags `git rev-list --tags --max-count=1`'
+alias gdt='git diff-tree --no-commit-id --name-only -r'
+gdv() { git diff -w "$@" | view - }
+compdef _git gdv=git-diff
+alias gdw='git diff --word-diff'
-alias gpoat='git push origin --all && git push origin --tags'
-alias gmt='git mergetool --no-prompt'
-compdef _git gmt=git-mergetool
+alias gf='git fetch'
+alias gfa='git fetch --all --prune'
+function gfg() { git ls-files | grep $@ }
+compdef gfg=grep
+alias gfo='git fetch origin'
alias gg='git gui citool'
alias gga='git gui citool --amend'
-alias gk='gitk --all --branches'
-
-alias gsts='git stash show --text'
-alias gsta='git stash'
-alias gstp='git stash pop'
-alias gstd='git stash drop'
-
-# Will cd into the top of the current repository
-# or submodule.
-alias grt='cd $(git rev-parse --show-toplevel || echo ".")'
+ggf() {
+[[ "$#" != 1 ]] && local b="$(git_current_branch)"
+git push --force origin "${b:=$1}"
+}
+compdef _git ggf=git-checkout
+ggl() {
+if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
+git pull origin "${*}"
+else
+[[ "$#" == 0 ]] && local b="$(git_current_branch)"
+git pull origin "${b:=$1}"
+fi
+}
+compdef _git ggl=git-checkout
+alias ggpull='git pull origin $(git_current_branch)'
+compdef _git ggpull=git-checkout
+ggp() {
+if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then
+git push origin "${*}"
+else
+[[ "$#" == 0 ]] && local b="$(git_current_branch)"
+git push origin "${b:=$1}"
+fi
+}
+compdef _git ggp=git-checkout
+alias ggpush='git push origin $(git_current_branch)'
+compdef _git ggpush=git-checkout
+ggpnp() {
+if [[ "$#" == 0 ]]; then
+ggl && ggp
+else
+ggl "${*}" && ggp "${*}"
+fi
+}
+compdef _git ggpnp=git-checkout
+alias ggsup='git branch --set-upstream-to=origin/$(git_current_branch)'
+ggu() {
+[[ "$#" != 1 ]] && local b="$(git_current_branch)"
+git pull --rebase origin "${b:=$1}"
+}
+compdef _git ggu=git-checkout
+alias ggpur='ggu'
+compdef _git ggpur=git-checkout
-# Git and svn mix
+alias gignore='git update-index --assume-unchanged'
+alias gignored='git ls-files -v | grep "^[[:lower:]]"'
alias git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk'
compdef git-svn-dcommit-push=git
-alias gsr='git svn rebase'
-alias gsd='git svn dcommit'
-#
-# Will return the current branch name
-# Usage example: git pull origin $(current_branch)
-#
-function current_branch() {
- ref=$(git symbolic-ref HEAD 2> /dev/null) || \
- ref=$(git rev-parse --short HEAD 2> /dev/null) || return
- echo ${ref#refs/heads/}
-}
-
-function current_repository() {
- ref=$(git symbolic-ref HEAD 2> /dev/null) || \
- ref=$(git rev-parse --short HEAD 2> /dev/null) || return
- echo $(git remote -v | cut -d':' -f 2)
-}
+alias gk='\gitk --all --branches'
+compdef _git gk='gitk'
+alias gke='\gitk --all $(git log -g --pretty=format:%h)'
+compdef _git gke='gitk'
-# these aliases take advantage of the previous function
-alias ggpull='git pull origin $(current_branch)'
-compdef ggpull=git
-alias ggpur='git pull --rebase origin $(current_branch)'
-compdef ggpur=git
-alias ggpush='git push origin $(current_branch)'
-compdef ggpush=git
-alias ggpnp='git pull origin $(current_branch) && git push origin $(current_branch)'
-compdef ggpnp=git
-
-# Pretty log messages
-function _git_log_prettily(){
- if ! [ -z $1 ]; then
- git log --pretty=$1
- fi
-}
+alias gl='git pull'
+alias glg='git log --stat --color'
+alias glgp='git log --stat --color -p'
+alias glgg='git log --graph --color'
+alias glgga='git log --graph --decorate --all'
+alias glgm='git log --graph --max-count=10'
+alias glo='git log --oneline --decorate --color'
+alias glol="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
+alias glola="git log --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit --all"
+alias glog='git log --oneline --decorate --color --graph'
alias glp="_git_log_prettily"
compdef _git glp=git-log
-# Work In Progress (wip)
-# These features allow to pause a branch development and switch to another one (wip)
-# When you want to go back to work, just unwip it
-#
-# This function return a warning if the current branch is a wip
-function work_in_progress() {
- if $(git log -n 1 2>/dev/null | grep -q -c "\-\-wip\-\-"); then
- echo "WIP!!"
- fi
-}
-# these alias commit and uncomit wip branches
-alias gwip='git add -A; git ls-files --deleted -z | xargs -r0 git rm; git commit -m "--wip--"'
-alias gunwip='git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1'
+alias gm='git merge'
+alias gmom='git merge origin/master'
+alias gmt='git mergetool --no-prompt'
+alias gmtvim='git mergetool --no-prompt --tool=vimdiff'
+alias gmum='git merge upstream/master'
+
+alias gp='git push'
+alias gpd='git push --dry-run'
+alias gpoat='git push origin --all && git push origin --tags'
+compdef _git gpoat=git-push
+alias gpu='git push upstream'
+alias gpv='git push -v'
+
+alias gr='git remote'
+alias gra='git remote add'
+alias grb='git rebase'
+alias grba='git rebase --abort'
+alias grbc='git rebase --continue'
+alias grbi='git rebase -i'
+alias grbm='git rebase master'
+alias grbs='git rebase --skip'
+alias grh='git reset HEAD'
+alias grhh='git reset HEAD --hard'
+alias grmv='git remote rename'
+alias grrm='git remote remove'
+alias grset='git remote set-url'
+alias grt='cd $(git rev-parse --show-toplevel || echo ".")'
+alias gru='git reset --'
+alias grup='git remote update'
+alias grv='git remote -v'
+
+alias gsb='git status -sb'
+alias gsd='git svn dcommit'
+alias gsi='git submodule init'
+alias gsps='git show --pretty=short --show-signature'
+alias gsr='git svn rebase'
+alias gss='git status -s'
+alias gst='git status'
+alias gsta='git stash'
+alias gstaa='git stash apply'
+alias gstd='git stash drop'
+alias gstl='git stash list'
+alias gstp='git stash pop'
+alias gsts='git stash show --text'
+alias gsu='git submodule update'
+
+alias gts='git tag -s'
+alias gtv='git tag | sort -V'
-# these alias ignore changes to file
-alias gignore='git update-index --assume-unchanged'
alias gunignore='git update-index --no-assume-unchanged'
-# list temporarily ignored files
-alias gignored='git ls-files -v | grep "^[[:lower:]]"'
+alias gunwip='git log -n 1 | grep -q -c "\-\-wip\-\-" && git reset HEAD~1'
+alias gup='git pull --rebase'
+alias gupv='git pull --rebase -v'
+alias glum='git pull upstream master'
+
+alias gwch='git whatchanged -p --abbrev-commit --pretty=medium'
+alias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit -m "--wip--"'
diff --git a/plugins/gitfast/_git b/plugins/gitfast/_git
index fac5e711e..c75b0be7f 100644
--- a/plugins/gitfast/_git
+++ b/plugins/gitfast/_git
@@ -30,10 +30,10 @@ if [ -z "$script" ]; then
local -a locations
local e
locations=(
+ "$(dirname ${funcsourcetrace[1]%:*})/git-completion.bash"
'/etc/bash_completion.d/git' # fedora, old debian
'/usr/share/bash-completion/completions/git' # arch, ubuntu, new debian
'/usr/share/bash-completion/git' # gentoo
- $(dirname ${funcsourcetrace[1]%:*})/git-completion.bash
)
for e in $locations; do
test -f $e && script="$e" && break
@@ -76,6 +76,14 @@ __gitcomp_nl ()
compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0
}
+__gitcomp_nl_append ()
+{
+ emulate -L zsh
+
+ local IFS=$'\n'
+ compadd -Q -S "${4- }" -p "${2-}" -- ${=1} && _ret=0
+}
+
__gitcomp_file ()
{
emulate -L zsh
diff --git a/plugins/gitfast/git-completion.bash b/plugins/gitfast/git-completion.bash
index 5da920ecd..9525343fc 100644
--- a/plugins/gitfast/git-completion.bash
+++ b/plugins/gitfast/git-completion.bash
@@ -1,5 +1,3 @@
-#!bash
-#
# bash/zsh completion support for core Git.
#
# Copyright (C) 2006,2007 Shawn O. Pearce <spearce@spearce.org>
@@ -180,9 +178,9 @@ _get_comp_words_by_ref ()
}
fi
-__gitcompadd ()
+__gitcompappend ()
{
- local i=0
+ local i=${#COMPREPLY[@]}
for x in $1; do
if [[ "$x" == "$3"* ]]; then
COMPREPLY[i++]="$2$x$4"
@@ -190,6 +188,12 @@ __gitcompadd ()
done
}
+__gitcompadd ()
+{
+ COMPREPLY=()
+ __gitcompappend "$@"
+}
+
# Generates completion reply, appending a space to possible completion words,
# if necessary.
# It accepts 1 to 4 arguments:
@@ -220,6 +224,14 @@ __gitcomp ()
esac
}
+# Variation of __gitcomp_nl () that appends to the existing list of
+# completion candidates, COMPREPLY.
+__gitcomp_nl_append ()
+{
+ local IFS=$'\n'
+ __gitcompappend "$1" "${2-}" "${3-$cur}" "${4- }"
+}
+
# Generates completion reply from newline-separated possible completion words
# by appending a space to all of them.
# It accepts 1 to 4 arguments:
@@ -231,8 +243,8 @@ __gitcomp ()
# appended.
__gitcomp_nl ()
{
- local IFS=$'\n'
- __gitcompadd "$1" "${2-}" "${3-$cur}" "${4- }"
+ COMPREPLY=()
+ __gitcomp_nl_append "$@"
}
# Generates completion reply with compgen from newline-separated possible
@@ -673,7 +685,6 @@ __git_list_porcelain_commands ()
index-pack) : plumbing;;
init-db) : deprecated;;
local-fetch) : plumbing;;
- lost-found) : infrequent;;
ls-files) : plumbing;;
ls-remote) : plumbing;;
ls-tree) : plumbing;;
@@ -687,14 +698,12 @@ __git_list_porcelain_commands ()
pack-refs) : plumbing;;
parse-remote) : plumbing;;
patch-id) : plumbing;;
- peek-remote) : plumbing;;
prune) : plumbing;;
prune-packed) : plumbing;;
quiltimport) : import;;
read-tree) : plumbing;;
receive-pack) : plumbing;;
remote-*) : transport;;
- repo-config) : deprecated;;
rerere) : plumbing;;
rev-list) : plumbing;;
rev-parse) : plumbing;;
@@ -707,7 +716,6 @@ __git_list_porcelain_commands ()
ssh-*) : transport;;
stripspace) : plumbing;;
symbolic-ref) : plumbing;;
- tar-tree) : deprecated;;
unpack-file) : plumbing;;
unpack-objects) : plumbing;;
update-index) : plumbing;;
@@ -901,7 +909,7 @@ _git_add ()
esac
# XXX should we check for --update and --all options ?
- __git_complete_index_file "--others --modified"
+ __git_complete_index_file "--others --modified --directory --no-empty-directory"
}
_git_archive ()
@@ -1063,7 +1071,7 @@ _git_clean ()
esac
# XXX should we check for -x option ?
- __git_complete_index_file "--others"
+ __git_complete_index_file "--others --directory"
}
_git_clone ()
@@ -1188,7 +1196,7 @@ _git_diff ()
__git_complete_revlist_file
}
-__git_mergetools_common="diffuse ecmerge emerge kdiff3 meld opendiff
+__git_mergetools_common="diffuse diffmerge ecmerge emerge kdiff3 meld opendiff
tkdiff vimdiff gvimdiff xxdiff araxis p4merge bc3 codecompare
"
@@ -1491,6 +1499,12 @@ _git_mergetool ()
_git_merge_base ()
{
+ case "$cur" in
+ --*)
+ __gitcomp "--octopus --independent --is-ancestor --fork-point"
+ return
+ ;;
+ esac
__gitcomp_nl "$(__git_refs)"
}
@@ -1623,7 +1637,7 @@ _git_rebase ()
--preserve-merges --stat --no-stat
--committer-date-is-author-date --ignore-date
--ignore-whitespace --whitespace=
- --autosquash
+ --autosquash --fork-point --no-fork-point
"
return
@@ -1833,6 +1847,7 @@ _git_config ()
branch.*)
local pfx="${cur%.*}." cur_="${cur#*.}"
__gitcomp_nl "$(__git_heads)" "$pfx" "$cur_" "."
+ __gitcomp_nl_append $'autosetupmerge\nautosetuprebase\n' "$pfx" "$cur_"
return
;;
guitool.*.*)
@@ -1875,6 +1890,7 @@ _git_config ()
remote.*)
local pfx="${cur%.*}." cur_="${cur#*.}"
__gitcomp_nl "$(__git_remotes)" "$pfx" "$cur_" "."
+ __gitcomp_nl_append "pushdefault" "$pfx" "$cur_"
return
;;
url.*.*)
@@ -1997,6 +2013,7 @@ _git_config ()
fetch.unpackLimit
format.attach
format.cc
+ format.coverLetter
format.headers
format.numbered
format.pretty
@@ -2580,7 +2597,7 @@ if [[ -n ${ZSH_VERSION-} ]]; then
--*=*|*.) ;;
*) c="$c " ;;
esac
- array[$#array+1]="$c"
+ array[${#array[@]}+1]="$c"
done
compset -P '*[=:]'
compadd -Q -S '' -p "${2-}" -a -- array && _ret=0
diff --git a/plugins/gitfast/git-prompt.sh b/plugins/gitfast/git-prompt.sh
index a81ef5a48..54489080f 100644
--- a/plugins/gitfast/git-prompt.sh
+++ b/plugins/gitfast/git-prompt.sh
@@ -60,6 +60,7 @@
# of values:
#
# verbose show number of commits ahead/behind (+/-) upstream
+# name if verbose, then also show the upstream abbrev name
# legacy don't use the '--count' option available in recent
# versions of git-rev-list
# git always compare HEAD to @{upstream}
@@ -84,13 +85,17 @@
# the colored output of "git status -sb" and are available only when
# using __git_ps1 for PROMPT_COMMAND or precmd.
+# check whether printf supports -v
+__git_printf_supports_v=
+printf -v __git_printf_supports_v -- '%s' yes >/dev/null 2>&1
+
# stores the divergence from upstream in $p
# used by GIT_PS1_SHOWUPSTREAM
__git_ps1_show_upstream ()
{
local key value
local svn_remote svn_url_pattern count n
- local upstream=git legacy="" verbose=""
+ local upstream=git legacy="" verbose="" name=""
svn_remote=()
# get some config options from git-config
@@ -106,7 +111,7 @@ __git_ps1_show_upstream ()
;;
svn-remote.*.url)
svn_remote[$((${#svn_remote[@]} + 1))]="$value"
- svn_url_pattern+="\\|$value"
+ svn_url_pattern="$svn_url_pattern\\|$value"
upstream=svn+git # default upstream is SVN if available, else git
;;
esac
@@ -118,6 +123,7 @@ __git_ps1_show_upstream ()
git|svn) upstream="$option" ;;
verbose) verbose=1 ;;
legacy) legacy=1 ;;
+ name) name=1 ;;
esac
done
@@ -200,6 +206,9 @@ __git_ps1_show_upstream ()
*) # diverged from upstream
p=" u+${count#* }-${count% *}" ;;
esac
+ if [[ -n "$count" && -n "$name" ]]; then
+ p="$p $(git rev-parse --abbrev-ref "$upstream" 2>/dev/null)"
+ fi
fi
}
@@ -250,6 +259,13 @@ __git_ps1_colorize_gitstring ()
r="$c_clear$r"
}
+eread ()
+{
+ f="$1"
+ shift
+ test -r "$f" && read "$@" <"$f"
+}
+
# __git_ps1 accepts 0 or 1 arguments (i.e., format string)
# when called from PS1 using command substitution
# in this mode it prints text to add to bash PS1 prompt (includes branch name)
@@ -312,9 +328,9 @@ __git_ps1 ()
local step=""
local total=""
if [ -d "$g/rebase-merge" ]; then
- read b 2>/dev/null <"$g/rebase-merge/head-name"
- read step 2>/dev/null <"$g/rebase-merge/msgnum"
- read total 2>/dev/null <"$g/rebase-merge/end"
+ eread "$g/rebase-merge/head-name" b
+ eread "$g/rebase-merge/msgnum" step
+ eread "$g/rebase-merge/end" total
if [ -f "$g/rebase-merge/interactive" ]; then
r="|REBASE-i"
else
@@ -322,10 +338,10 @@ __git_ps1 ()
fi
else
if [ -d "$g/rebase-apply" ]; then
- read step 2>/dev/null <"$g/rebase-apply/next"
- read total 2>/dev/null <"$g/rebase-apply/last"
+ eread "$g/rebase-apply/next" step
+ eread "$g/rebase-apply/last" total
if [ -f "$g/rebase-apply/rebasing" ]; then
- read b 2>/dev/null <"$g/rebase-apply/head-name"
+ eread "$g/rebase-apply/head-name" b
r="|REBASE"
elif [ -f "$g/rebase-apply/applying" ]; then
r="|AM"
@@ -349,7 +365,7 @@ __git_ps1 ()
b="$(git symbolic-ref HEAD 2>/dev/null)"
else
local head=""
- if ! read head 2>/dev/null <"$g/HEAD"; then
+ if ! eread "$g/HEAD" head; then
if [ $pcmode = yes ]; then
PS1="$ps1pc_start$ps1pc_end"
fi
@@ -433,7 +449,7 @@ __git_ps1 ()
local gitstring="$c${b##refs/heads/}${f:+$z$f}$r$p"
if [ $pcmode = yes ]; then
- if [[ -n ${ZSH_VERSION-} ]]; then
+ if [ "${__git_printf_supports_v-}" != yes ]; then
gitstring=$(printf -- "$printf_format" "$gitstring")
else
printf -v gitstring -- "$printf_format" "$gitstring"
diff --git a/plugins/github/README.md b/plugins/github/README.md
new file mode 100644
index 000000000..fea607876
--- /dev/null
+++ b/plugins/github/README.md
@@ -0,0 +1,46 @@
+# github
+
+This plugin supports working with GitHub from the command line. It provides a few things:
+
+* Sets up the `hub` wrapper and completions for the `git` command if you have `hub` installed.
+* Completion for the `github` Ruby gem.
+* Convenience functions for working with repos and URLs.
+
+### Functions
+
+* `empty_gh` - Creates a new empty repo (with a `README.md`) and pushes it to GitHub
+* `new_gh` - Initializes an existing directory as a repo and pushes it to GitHub
+* `exist_gh` - Takes an existing repo and pushes it to GitHub
+* `git.io` - Shortens a URL using [git.io](http://git.io)
+
+
+## Installation
+
+[Hub](http://github.com/github/hub) needs to be installed if you want to use it. On OS X with Homebrew, this can be done with `brew install hub`. The `hub` completion definition needs to be added to your `$FPATH` before initializing OMZ.
+
+The [`github` Ruby gem](http://github.com/defunkt/github-gem) needs to be installed if you want to use it.
+
+### Configuration
+
+These settings affect `github`'s behavior.
+
+#### Environment variables
+
+* `$GITHUB_USER`
+* `$GITHUB_PASSWORD`
+
+#### Git configuration options
+
+* `github.user` - GitHub username for repo operations
+
+See `man hub` for more details.
+
+### Homebrew installation note
+
+If you have installed `hub` using Homebrew, its completions may not be on your `$FPATH` if you are using the system `zsh`. Homebrew installs `zsh` completion definitions to `/usr/local/share/zsh/site-functions`, which will be on `$FPATH` for the Homebrew-installed `zsh`, but not for the system `zsh`. If you want it to work with the system `zsh`, add this to your `~/.zshrc` before it sources `oh-my-zsh.sh`.
+
+```zsh
+if (( ! ${fpath[(I)/usr/local/share/zsh/site-functions]} )); then
+ FPATH=/usr/local/share/zsh/site-functions:$FPATH
+fi
+```
diff --git a/plugins/github/_github b/plugins/github/_github
deleted file mode 100644
index 83e1713c7..000000000
--- a/plugins/github/_github
+++ /dev/null
@@ -1,40 +0,0 @@
-#compdef github
-#autoload
-
-# in order to make this work, you will need to have the github gem installed
-# http://github.com/defunkt/github-gem
-
-# github zsh completion, based on homebrew completion
-
-local -a _1st_arguments
-_1st_arguments=(
- 'browse:Open this repo in a web browser'
- 'clone:Clone a repo'
- 'config:Automatically set configuration info, or pass args to specify'
- 'create-from-local:Create a new GitHub repository from the current local repository'
- 'create:Create a new empty GitHub repository'
- 'fetch:Fetch from a remote to a local branch'
- 'fetch_all:Fetch all refs from a user'
- 'fork:Forks a GitHub repository'
- 'home:Open this repos master branch in a web browser'
- 'ignore:Ignore a SHA from github network commits'
- 'info:Info about this project'
- 'issues:Project issues tools'
- 'network:Project network tools - sub-commands : web [user], list, fetch, commits'
- 'open:Open the given user/project in a web browser'
- 'pull-request:Generate the text for a pull request'
- 'pull:Pull from a remote'
- 'search:Search GitHub for the given repository name'
- 'track:Track another users repository'
-)
-
-local expl
-local -a pkgs installed_pkgs
-
-_arguments \
- '*:: :->subcmds' && return 0
-
-if (( CURRENT == 1 )); then
- _describe -t commands "github subcommand" _1st_arguments
- return
-fi
diff --git a/plugins/github/_hub b/plugins/github/_hub
new file mode 100644
index 000000000..3a6493878
--- /dev/null
+++ b/plugins/github/_hub
@@ -0,0 +1,163 @@
+#compdef hub
+
+# Zsh will source this file when attempting to autoload the "_hub" function,
+# typically on the first attempt to complete the hub command. We define two new
+# setup helper routines (one for the zsh-distributed version, one for the
+# git-distributed, bash-based version). Then we redefine the "_hub" function to
+# call "_git" after some other interception.
+#
+# This is pretty fragile, if you think about it. Any number of implementation
+# changes in the "_git" scripts could cause problems down the road. It would be
+# better if the stock git completions were just a bit more permissive about how
+# it allowed third-party commands to be added.
+
+(( $+functions[__hub_setup_zsh_fns] )) ||
+__hub_setup_zsh_fns () {
+ (( $+functions[_git-alias] )) ||
+ _git-alias () {
+ _arguments \
+ '-s[output shell script suitable for eval]' \
+ '1::shell:(zsh bash csh)'
+ }
+
+ (( $+functions[_git-browse] )) ||
+ _git-browse () {
+ _arguments \
+ '-u[output the URL]' \
+ '2::subpage:(wiki commits issues)'
+ }
+
+ (( $+functions[_git-compare] )) ||
+ _git-compare () {
+ _arguments \
+ '-u[output the URL]' \
+ ':[start...]end range:'
+ }
+
+ (( $+functions[_git-create] )) ||
+ _git-create () {
+ _arguments \
+ '::name (REPOSITORY or ORGANIZATION/REPOSITORY):' \
+ '-p[make repository private]' \
+ '-d[description]:description' \
+ '-h[home page]:repository home page URL:_urls'
+ }
+
+ (( $+functions[_git-fork] )) ||
+ _git-fork () {
+ _arguments \
+ '--no-remote[do not add a remote for the new fork]'
+ }
+
+ (( $+functions[_git-pull-request] )) ||
+ _git-pull-request () {
+ _arguments \
+ '-f[force (skip check for local commits)]' \
+ '-b[base]:base ("branch", "owner\:branch", "owner/repo\:branch"):' \
+ '-h[head]:head ("branch", "owner\:branch", "owner/repo\:branch"):' \
+ - set1 \
+ '-m[message]' \
+ '-F[file]' \
+ '-a[user]' \
+ '-M[milestone]' \
+ '-l[labels]' \
+ - set2 \
+ '-i[issue]:issue number:' \
+ - set3 \
+ '::issue-url:_urls'
+ }
+
+ # stash the "real" command for later
+ functions[_hub_orig_git_commands]=$functions[_git_commands]
+
+ # Replace it with our own wrapper.
+ declare -f _git_commands >& /dev/null && unfunction _git_commands
+ _git_commands () {
+ local ret=1
+ # call the original routine
+ _call_function ret _hub_orig_git_commands
+
+ # Effectively "append" our hub commands to the behavior of the original
+ # _git_commands function. Using this wrapper function approach ensures
+ # that we only offer the user the hub subcommands when the user is
+ # actually trying to complete subcommands.
+ hub_commands=(
+ alias:'show shell instructions for wrapping git'
+ pull-request:'open a pull request on GitHub'
+ fork:'fork origin repo on GitHub'
+ create:'create new repo on GitHub for the current project'
+ browse:'browse the project on GitHub'
+ compare:'open GitHub compare view'
+ ci-status:'lookup commit in GitHub Status API'
+ )
+ _describe -t hub-commands 'hub command' hub_commands && ret=0
+
+ return ret
+ }
+}
+
+(( $+functions[__hub_setup_bash_fns] )) ||
+__hub_setup_bash_fns () {
+ # TODO more bash-style fns needed here to complete subcommand args. They take
+ # the form "_git_CMD" where "CMD" is something like "pull-request".
+
+ # Duplicate and rename the 'list_all_commands' function
+ eval "$(declare -f __git_list_all_commands | \
+ sed 's/__git_list_all_commands/__git_list_all_commands_without_hub/')"
+
+ # Wrap the 'list_all_commands' function with extra hub commands
+ __git_list_all_commands() {
+ cat <<-EOF
+alias
+pull-request
+fork
+create
+browse
+compare
+ci-status
+EOF
+ __git_list_all_commands_without_hub
+ }
+
+ # Ensure cached commands are cleared
+ __git_all_commands=""
+}
+
+# redefine _hub to a much smaller function in the steady state
+_hub () {
+ # only attempt to intercept the normal "_git" helper functions once
+ (( $+__hub_func_replacement_done )) ||
+ () {
+ # At this stage in the shell's execution the "_git" function has not yet
+ # been autoloaded, so the "_git_commands" or "__git_list_all_commands"
+ # functions will not be defined. Call it now (with a bogus no-op service
+ # to prevent premature completion) so that we can wrap them.
+ if declare -f _git >& /dev/null ; then
+ _hub_noop () { __hub_zsh_provided=1 } # zsh-provided will call this one
+ __hub_noop_main () { __hub_git_provided=1 } # git-provided will call this one
+ local service=hub_noop
+ _git
+ unfunction _hub_noop
+ unfunction __hub_noop_main
+ service=git
+ fi
+
+ if (( $__hub_zsh_provided )) ; then
+ __hub_setup_zsh_fns
+ elif (( $__hub_git_provided )) ; then
+ __hub_setup_bash_fns
+ fi
+
+ __hub_func_replacement_done=1
+ }
+
+ # Now perform the actual completion, allowing the "_git" function to call our
+ # replacement "_git_commands" function as needed. Both versions expect
+ # service=git or they will call nonexistent routines or end up in an infinite
+ # loop.
+ service=git
+ declare -f _git >& /dev/null && _git
+}
+
+# make sure we actually attempt to complete on the first "tab" from the user
+_hub
diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh
index bd69b1bd5..ca19901fd 100644
--- a/plugins/github/github.plugin.zsh
+++ b/plugins/github/github.plugin.zsh
@@ -1,56 +1,25 @@
-# Setup hub function for git, if it is available; http://github.com/defunkt/hub
-if [ "$commands[(I)hub]" ] && [ "$commands[(I)ruby]" ]; then
- # Autoload _git completion functions
- if declare -f _git > /dev/null; then
- _git
- fi
-
- if declare -f _git_commands > /dev/null; then
- _hub_commands=(
- 'alias:show shell instructions for wrapping git'
- 'pull-request:open a pull request on GitHub'
- 'fork:fork origin repo on GitHub'
- 'create:create new repo on GitHub for the current project'
- 'browse:browse the project on GitHub'
- 'compare:open GitHub compare view'
- )
- # Extend the '_git_commands' function with hub commands
- eval "$(declare -f _git_commands | sed -e 's/base_commands=(/base_commands=(${_hub_commands} /')"
- fi
- # eval `hub alias -s zsh`
- function git(){
- if ! (( $+_has_working_hub )); then
- hub --version &> /dev/null
- _has_working_hub=$(($? == 0))
- fi
- if (( $_has_working_hub )) ; then
- hub "$@"
- else
- command git "$@"
- fi
- }
+# Set up hub wrapper for git, if it is available; http://github.com/github/hub
+if [ "$commands[(I)hub]" ]; then
+ if hub --version &>/dev/null; then
+ eval $(hub alias -s zsh)
+ fi
fi
# Functions #################################################################
-# https://github.com/dbb
+# Based on https://github.com/dbb/githome/blob/master/.config/zsh/functions
-
-# empty_gh [NAME_OF_REPO]
+# empty_gh <NAME_OF_REPO>
#
# Use this when creating a new repo from scratch.
+# Creates a new repo with a blank README.md in it and pushes it up to GitHub.
empty_gh() { # [NAME_OF_REPO]
- repo=$1
- ghuser=$( git config github.user )
+ emulate -L zsh
+ local repo=$1
- mkdir "$repo"
- cd "$repo"
- git init
- touch README
- git add README
- git commit -m 'Initial commit.'
- git remote add origin git@github.com:${ghuser}/${repo}.git
- git push -u origin master
+ mkdir "$repo"
+ touch "$repo/README.md"
+ new_gh "$repo"
}
# new_gh [DIRECTORY]
@@ -58,16 +27,25 @@ empty_gh() { # [NAME_OF_REPO]
# Use this when you have a directory that is not yet set up for git.
# This function will add all non-hidden files to git.
new_gh() { # [DIRECTORY]
- cd "$1"
- ghuser=$( git config github.user )
+ emulate -L zsh
+ local repo="$1"
+ cd "$repo" \
+ || return
- git init
- # add all non-dot files
- print '.*'"\n"'*~' >> .gitignore
- git add ^.*
- git commit -m 'Initial commit.'
- git remote add origin git@github.com:${ghuser}/${repo}.git
- git push -u origin master
+ git init \
+ || return
+ # add all non-dot files
+ print '.*'"\n"'*~' >> .gitignore
+ git add [^.]* \
+ || return
+ git add .gitignore \
+ || return
+ git commit -m 'Initial commit.' \
+ || return
+ hub create \
+ || return
+ git push -u origin master \
+ || return
}
# exist_gh [DIRECTORY]
@@ -75,13 +53,13 @@ new_gh() { # [DIRECTORY]
# Use this when you have a git repo that's ready to go and you want to add it
# to your GitHub.
exist_gh() { # [DIRECTORY]
- cd "$1"
- name=$( git config user.name )
- ghuser=$( git config github.user )
- repo=$1
+ emulate -L zsh
+ local repo=$1
+ cd "$repo"
- git remote add origin git@github.com:${ghuser}/${repo}.git
- git push -u origin master
+ hub create \
+ || return
+ git push -u origin master
}
# git.io "GitHub URL"
@@ -91,7 +69,10 @@ exist_gh() { # [DIRECTORY]
# source: https://github.com/nvogel/dotzsh
# documentation: https://github.com/blog/985-git-io-github-url-shortener
#
-git.io() {curl -i -s http://git.io -F "url=$1" | grep "Location" | cut -f 2 -d " "}
+git.io() {
+ emulate -L zsh
+ curl -i -s http://git.io -F "url=$1" | grep "Location" | cut -f 2 -d " "
+}
# End Functions #############################################################
diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh
index 481d487ba..ba1b38711 100644
--- a/plugins/gitignore/gitignore.plugin.zsh
+++ b/plugins/gitignore/gitignore.plugin.zsh
@@ -1,4 +1,4 @@
-function gi() { curl -sL https://www.gitignore.io/api/$@ ;}
+function gi() { curl -sL https://www.gitignore.io/api/${(j:,:)@} }
_gitignoreio_get_command_list() {
curl -sL https://www.gitignore.io/api/list | tr "," "\n"
diff --git a/plugins/gnu-utils/gnu-utils.plugin.zsh b/plugins/gnu-utils/gnu-utils.plugin.zsh
index e59265d66..de95f7e6c 100644
--- a/plugins/gnu-utils/gnu-utils.plugin.zsh
+++ b/plugins/gnu-utils/gnu-utils.plugin.zsh
@@ -29,7 +29,10 @@ if [[ -x "${commands[gwhoami]}" ]]; then
'gunexpand' 'guniq' 'gunlink' 'guptime' 'gusers' 'gvdir' 'gwc' 'gwho'
'gwhoami' 'gyes')
- # Not part of coreutils, installed separately.
+ # findutils
+ gcmds+=('gfind' 'gxargs' 'glocate')
+
+ # Not part of either coreutils or findutils, installed separately.
gcmds+=('gsed' 'gtar' 'gtime')
for gcmd in "${gcmds[@]}"; do
diff --git a/plugins/golang/golang.plugin.zsh b/plugins/golang/golang.plugin.zsh
index 900fc630d..1ce3cea58 100644
--- a/plugins/golang/golang.plugin.zsh
+++ b/plugins/golang/golang.plugin.zsh
@@ -54,23 +54,42 @@ __go_tool_complete() {
'-installsuffix[suffix to add to package directory]:suffix'
'-tags[list of build tags to consider satisfied]:tags'
)
- __go_list() {
- local expl importpaths
- declare -a importpaths
- importpaths=($(go list ${words[$CURRENT]}... 2>/dev/null))
- _wanted importpaths expl 'import paths' compadd "$@" - "${importpaths[@]}"
+ __go_packages() {
+ local gopaths
+ declare -a gopaths
+ gopaths=("${(s/:/)$(go env GOPATH)}")
+ gopaths+=("$(go env GOROOT)")
+ for p in $gopaths; do
+ _path_files -W "$p/src" -/
+ done
+ }
+ __go_identifiers() {
+ compadd $(godoc -templates $ZSH/plugins/golang/templates ${words[-2]} 2> /dev/null)
}
case ${words[2]} in
- clean|doc)
- _arguments -s -w : '*:importpaths:__go_list'
+ doc)
+ _arguments -s -w \
+ "-c[symbol matching honors case (paths not affected)]" \
+ "-cmd[show symbols with package docs even if package is a command]" \
+ "-u[show unexported symbols as well as exported]" \
+ "2:importpaths:__go_packages" \
+ ":next identifiers:__go_identifiers"
+ ;;
+ clean)
+ _arguments -s -w \
+ "-i[remove the corresponding installed archive or binary (what 'go install' would create)]" \
+ "-n[print the remove commands it would execute, but not run them]" \
+ "-r[apply recursively to all the dependencies of the packages named by the import paths]" \
+ "-x[print remove commands as it executes them]" \
+ "*:importpaths:__go_packages"
;;
fix|fmt|list|vet)
- _alternative ':importpaths:__go_list' ':files:_path_files -g "*.go"'
+ _alternative ':importpaths:__go_packages' ':files:_path_files -g "*.go"'
;;
install)
_arguments -s -w : ${build_flags[@]} \
"-v[show package names]" \
- '*:importpaths:__go_list'
+ '*:importpaths:__go_packages'
;;
get)
_arguments -s -w : \
@@ -81,7 +100,7 @@ __go_tool_complete() {
${build_flags[@]} \
"-v[show package names]" \
"-o[output file]:file:_files" \
- "*:args:{ _alternative ':importpaths:__go_list' ':files:_path_files -g \"*.go\"' }"
+ "*:args:{ _alternative ':importpaths:__go_packages' ':files:_path_files -g \"*.go\"' }"
;;
test)
_arguments -s -w : \
@@ -103,7 +122,7 @@ __go_tool_complete() {
"-cpuprofile[write CPU profile to file]:file:_files" \
"-memprofile[write heap profile to file]:file:_files" \
"-memprofilerate[set heap profiling rate]:number" \
- "*:args:{ _alternative ':importpaths:__go_list' ':files:_path_files -g \"*.go\"' }"
+ "*:args:{ _alternative ':importpaths:__go_packages' ':files:_path_files -g \"*.go\"' }"
;;
help)
_values "${commands[@]}" \
diff --git a/plugins/golang/templates/package.txt b/plugins/golang/templates/package.txt
new file mode 100644
index 000000000..2b75cce35
--- /dev/null
+++ b/plugins/golang/templates/package.txt
@@ -0,0 +1,29 @@
+{{with .PDoc}}{{/*
+
+Constants
+---------------------------------------
+
+*/}}{{with .Consts}}{{range .}}{{range .Names}}{{.}} {{end}}{{end}}{{end}}{{/*
+
+Variables
+---------------------------------------
+
+*/}}{{with .Vars}}{{range .}}{{range .Names}}{{.}} {{end}}{{end}}{{end}}{{/*
+
+Functions
+---------------------------------------
+
+*/}}{{with .Funcs}}{{range .}}{{ .Name }} {{end}}{{end}}{{/*
+
+Types
+---------------------------------------
+
+*/}}{{with .Types}}{{range .}}{{ $TypeName := .Name }}{{ $TypeName }} {{/*
+
+*/}}{{range .Methods}}{{ $TypeName }}.{{.Name}} {{end}}{{/*
+
+*/}}{{range .Funcs}}{{.Name}} {{end}}{{/*
+
+*/}}{{range .Consts}}{{range .Names}}{{.}} {{end}}{{end}}{{/*
+
+*/}}{{range .Vars}}{{range .Names}}{{.}} {{end}}{{end}}{{end}}{{end}}{{end}}
diff --git a/plugins/golang/templates/search.txt b/plugins/golang/templates/search.txt
new file mode 100644
index 000000000..e69de29bb
--- /dev/null
+++ b/plugins/golang/templates/search.txt
diff --git a/plugins/gradle/gradle.plugin.zsh b/plugins/gradle/gradle.plugin.zsh
index 97bf50b43..a908eaeaa 100644
--- a/plugins/gradle/gradle.plugin.zsh
+++ b/plugins/gradle/gradle.plugin.zsh
@@ -1,6 +1,5 @@
-#!zsh
##############################################################################
-# A descriptive listing of core Gradle commands
+# A descriptive listing of core Gradle commands
############################################################################
function _gradle_core_commands() {
local ret=1 state
@@ -32,36 +31,33 @@ function _gradle_arguments() {
'--stop[Stop the Gradle daemon]' \
'--daemon[Use the Gradle daemon]' \
'--no-daemon[Do not use the Gradle daemon]' \
- '--no-opt[Do not perform any task optimization]' \
+ '--rerun-task [Specifies that any task optimization is ignored.]' \
'-i[Log at the info level]' \
'-m[Dry run]' \
'-P[Set a project property]' \
+ '-p[Specifies the start directory]' \
'--profile[Profile the build time]' \
'-q[Log at the quiet level (only show errors)]' \
'-v[Print the Gradle version info]' \
'-x[Specify a task to be excluded]' \
+ '-b[Specifies the build file.]' \
+ '-c[Specifies the settings file.]' \
+ '--continue[Continues task execution after a task failure.]' \
+ '-g[Specifies the Gradle user home directory.]' \
+ '-I[Specifies an initialization script.]' \
+ '--refresh-dependencies[Refresh the state of dependencies.]' \
+ '-u[Don''t search in parent directories for a settings.gradle file.]' \
'*::command:->command' \
&& return 0
}
##############################################################################
-# Are we in a directory containing a build.gradle file?
-############################################################################
-function in_gradle() {
- if [[ -f build.gradle ]]; then
- echo 1
- fi
-}
-
-############################################################################## Examine the build.gradle file to see if its
-# timestamp has changed, and if so, regen
-# the .gradle_tasks cache file
+# Examine the build.gradle file to see if its timestamp has changed;
+# and if so, regenerate the .gradle_tasks cache file
############################################################################
_gradle_does_task_list_need_generating () {
- [ ! -f .gradletasknamecache ] && return 0;
- [ build.gradle -nt .gradletasknamecache ] && return 0;
- return 1;
+ [[ ! -f .gradletasknamecache ]] || [[ build.gradle -nt .gradletasknamecache ]]
}
@@ -69,22 +65,22 @@ _gradle_does_task_list_need_generating () {
# Discover the gradle tasks by running "gradle tasks --all"
############################################################################
_gradle_tasks () {
- if [ in_gradle ]; then
+ if [[ -f build.gradle ]]; then
_gradle_arguments
if _gradle_does_task_list_need_generating; then
- gradle tasks --all | grep "^[ ]*[a-zA-Z0-9]*\ -\ " | sed "s/ - .*$//" | sed "s/[\ ]*//" > .gradletasknamecache
+ gradle tasks --all | awk '/[a-zA-Z0-9:-]* - / {print $1}' > .gradletasknamecache
fi
- compadd -X "==== Gradle Tasks ====" `cat .gradletasknamecache`
+ compadd -X "==== Gradle Tasks ====" $(cat .gradletasknamecache)
fi
}
_gradlew_tasks () {
- if [ in_gradle ]; then
+ if [[ -f build.gradle ]]; then
_gradle_arguments
if _gradle_does_task_list_need_generating; then
- gradlew tasks --all | grep "^[ ]*[a-zA-Z0-9]*\ -\ " | sed "s/ - .*$//" | sed "s/[\ ]*//" > .gradletasknamecache
+ ./gradlew tasks --all | awk '/[a-zA-Z0-9:-]* - / {print $1}' > .gradletasknamecache
fi
- compadd -X "==== Gradlew Tasks ====" `cat .gradletasknamecache`
+ compadd -X "==== Gradlew Tasks ====" $(cat .gradletasknamecache)
fi
}
@@ -94,13 +90,3 @@ _gradlew_tasks () {
############################################################################
compdef _gradle_tasks gradle
compdef _gradlew_tasks gradlew
-
-
-##############################################################################
-# Open questions for future improvements:
-# 1) Should 'gradle tasks' use --all or just the regular set?
-# 2) Should gradlew use the same approach as gradle?
-# 3) Should only the " - " be replaced with a colon so it can work
-# with the richer descriptive method of _arguments?
-# gradle tasks | grep "^[a-zA-Z0-9]*\ -\ " | sed "s/ - /\:/"
-#############################################################################
diff --git a/plugins/gulp/gulp.plugin.zsh b/plugins/gulp/gulp.plugin.zsh
new file mode 100644
index 000000000..2b3105135
--- /dev/null
+++ b/plugins/gulp/gulp.plugin.zsh
@@ -0,0 +1,29 @@
+#!/usr/bin/env zsh
+
+#
+# gulp-autocompletion-zsh
+#
+# Autocompletion for your gulp.js tasks
+#
+# Copyright(c) 2014 André König <andre.koenig@posteo.de>
+# MIT Licensed
+#
+
+#
+# André König
+# Github: https://github.com/akoenig
+# Twitter: https://twitter.com/caiifr
+#
+
+#
+# Grabs all available tasks from the `gulpfile.js`
+# in the current directory.
+#
+function $$gulp_completion {
+ compls=$(gulp --tasks-simple 2>/dev/null)
+
+ completions=(${=compls})
+ compadd -- $completions
+}
+
+compdef $$gulp_completion gulp
diff --git a/plugins/heroku/_heroku b/plugins/heroku/_heroku
index bb2f7403f..fd72e530e 100644
--- a/plugins/heroku/_heroku
+++ b/plugins/heroku/_heroku
@@ -143,5 +143,6 @@ _arguments \
$_command_args \
'(--app)--app[the app name]' \
'(--remote)--remote[the remote name]' \
+ '(--help)--help[help about the current command]' \
&& return 0
diff --git a/plugins/history-substring-search/README.markdown b/plugins/history-substring-search/README.markdown
deleted file mode 100644
index 143b813a1..000000000
--- a/plugins/history-substring-search/README.markdown
+++ /dev/null
@@ -1,7 +0,0 @@
-To activate this script, please include it the `plugins` variable within `~/.zshrc`
-
- `plugins=(git history-substring-search.zsh)`
-
-See the "history-substring-search.zsh" file for more information:
-
- `sed -n '2,/^$/s/^#//p' history-substring-search.zsh | more`
diff --git a/plugins/history-substring-search/README.md b/plugins/history-substring-search/README.md
new file mode 100644
index 000000000..0c02e91b1
--- /dev/null
+++ b/plugins/history-substring-search/README.md
@@ -0,0 +1,149 @@
+zsh-history-substring-search
+==============================================================================
+
+This is a clean-room implementation of the [Fish shell][1]'s history search
+feature, where you can type in any part of any previously entered command
+and press the UP and DOWN arrow keys to cycle through the matching commands.
+You can also use K and J in VI mode or ^P and ^N in EMACS mode for the same.
+
+[1]: http://fishshell.com
+[2]: http://www.zsh.org/mla/users/2009/msg00818.html
+[3]: http://sourceforge.net/projects/fizsh/
+[4]: https://github.com/robbyrussell/oh-my-zsh/pull/215
+[5]: https://github.com/zsh-users/zsh-history-substring-search
+[6]: https://github.com/zsh-users/zsh-syntax-highlighting
+
+------------------------------------------------------------------------------
+Requirements
+------------------------------------------------------------------------------
+
+* [ZSH](http://zsh.sourceforge.net) 4.3 or newer
+
+------------------------------------------------------------------------------
+Usage
+------------------------------------------------------------------------------
+
+1. Load this script into your interactive ZSH session:
+
+ % source zsh-history-substring-search.zsh
+
+ If you want to use [zsh-syntax-highlighting][6] along with this script,
+ then make sure that you load it *before* you load this script:
+
+ % source zsh-syntax-highlighting.zsh
+ % source zsh-history-substring-search.zsh
+
+2. Bind keyboard shortcuts to this script's functions:
+
+ # bind UP and DOWN arrow keys
+ zmodload zsh/terminfo
+ bindkey "$terminfo[kcuu1]" history-substring-search-up
+ bindkey "$terminfo[kcud1]" history-substring-search-down
+
+ # bind UP and DOWN arrow keys (compatibility fallback
+ # for Ubuntu 12.04, Fedora 21, and MacOSX 10.9 users)
+ bindkey '^[[A' history-substring-search-up
+ bindkey '^[[B' history-substring-search-down
+
+ # bind P and N for EMACS mode
+ bindkey -M emacs '^P' history-substring-search-up
+ bindkey -M emacs '^N' history-substring-search-down
+
+ # bind k and j for VI mode
+ bindkey -M vicmd 'k' history-substring-search-up
+ bindkey -M vicmd 'j' history-substring-search-down
+
+3. Type any part of any previous command and then:
+
+ * Press the UP arrow key to select the nearest command that (1) contains
+ your query and (2) is older than the current command in the command
+ history.
+
+ * Press the DOWN arrow key to select the nearest command that (1)
+ contains your query and (2) is newer than the current command in the
+ command history.
+
+ * Press ^U (the Control and U keys simultaneously) to abort the search.
+
+4. If a matching command spans more than one line of text, press the LEFT
+ arrow key to move the cursor away from the end of the command, and then:
+
+ * Press the UP arrow key to move the cursor to the line above. When the
+ cursor reaches the first line of the command, pressing the UP arrow
+ key again will cause this script to perform another search.
+
+ * Press the DOWN arrow key to move the cursor to the line below. When
+ the cursor reaches the last line of the command, pressing the DOWN
+ arrow key again will cause this script to perform another search.
+
+------------------------------------------------------------------------------
+Configuration
+------------------------------------------------------------------------------
+
+This script defines the following global variables. You may override their
+default values only after having loaded this script into your ZSH session.
+
+* HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND is a global variable that defines
+ how the query should be highlighted inside a matching command. Its default
+ value causes this script to highlight using bold, white text on a magenta
+ background. See the "Character Highlighting" section in the zshzle(1) man
+ page to learn about the kinds of values you may assign to this variable.
+
+* HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND is a global variable that
+ defines how the query should be highlighted when no commands in the
+ history match it. Its default value causes this script to highlight using
+ bold, white text on a red background. See the "Character Highlighting"
+ section in the zshzle(1) man page to learn about the kinds of values you
+ may assign to this variable.
+
+* HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS is a global variable that defines
+ how the command history will be searched for your query. Its default value
+ causes this script to perform a case-insensitive search. See the "Globbing
+ Flags" section in the zshexpn(1) man page to learn about the kinds of
+ values you may assign to this variable.
+
+To always receive _unique_ search results, use `setopt HIST_IGNORE_ALL_DUPS`.
+Alternatively, use `setopt HIST_FIND_NO_DUPS` which makes this plugin skip
+duplicate _adjacent_ search results as you cycle through them---however, this
+does not guarantee that search results are unique: if your search results were
+"Dog", "Dog", "HotDog", "Dog", then cycling them gives "Dog", "HotDog", "Dog".
+Notice that the "Dog" search result appeared twice as you cycled through them!
+If you wish to avoid this limitation, then use `setopt HIST_IGNORE_ALL_DUPS`.
+
+------------------------------------------------------------------------------
+History
+------------------------------------------------------------------------------
+
+This script was originally written by [Peter Stephenson][2], who published it
+to the ZSH users mailing list (thereby making it public domain) in September
+2009. It was later revised by Guido van Steen and released under the BSD
+license (see below) as part of [the fizsh project][3] in January 2011.
+
+It was later extracted from fizsh release 1.0.1, refactored heavily, and
+repackaged as both an [oh-my-zsh plugin][4] and as an independently loadable
+[ZSH script][5] by Suraj N. Kurapati in 2011.
+
+It was [further developed][4] by Guido van Steen, Suraj N. Kurapati, Sorin
+Ionescu, and Vincent Guerci in 2011.
+
+------------------------------------------------------------------------------
+Oh My Zsh Distribution Notes
+------------------------------------------------------------------------------
+
+What you are looking at now is Oh My Zsh's repackaging of zsh-history-substring-search
+as an OMZ module inside the Oh My Zsh distribution.
+
+The upstream repo, zsh-users/zsh-history-substring-search, can be found on GitHub at
+https://github.com/zsh-users/zsh-history-substring-search.
+
+This downstream copy was last updated from the following upstream commit:
+
+ SHA: 2c295432175990c1bb4e90bc13f609daa67a25d6
+ Commit date: 2015-09-28 10:47:34 -0700
+
+Everything above this section is a copy of the original upstream's README, so things
+may differ slightly when you're using this inside OMZ. In particular, you do not
+need to set up key bindings for the up and down arrows yourself in `~/.zshrc`; the OMZ
+plugin does that for you. You may still want to set up additional emacs- or vi-specific
+bindings as mentioned above.
+
diff --git a/plugins/history-substring-search/history-substring-search.plugin.zsh b/plugins/history-substring-search/history-substring-search.plugin.zsh
index 99a5922c5..7883a65f3 100644
--- a/plugins/history-substring-search/history-substring-search.plugin.zsh
+++ b/plugins/history-substring-search/history-substring-search.plugin.zsh
@@ -1,6 +1,6 @@
-# This file integrates the history-substring-search script into oh-my-zsh.
+# This file integrates the zsh-history-substring-search script into oh-my-zsh.
-source "$ZSH/plugins/history-substring-search/history-substring-search.zsh"
+source "${0:r:r}.zsh"
if test "$CASE_SENSITIVE" = true; then
unset HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS
@@ -10,3 +10,17 @@ if test "$DISABLE_COLOR" = true; then
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND
unset HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND
fi
+
+
+# Bind terminal-specific up and down keys
+# Bind in both emacs and vi modes so it works in both, and is not
+# sensitive to whether this is loaded before or after the vi-mode plugin
+if [[ -n "$terminfo[kcuu1]" ]]; then
+ bindkey -M emacs "$terminfo[kcuu1]" history-substring-search-up
+ bindkey -M viins "$terminfo[kcuu1]" history-substring-search-up
+fi
+if [[ -n "$terminfo[kcud1]" ]]; then
+ bindkey -M emacs "$terminfo[kcud1]" history-substring-search-down
+ bindkey -M viins "$terminfo[kcud1]" history-substring-search-down
+fi
+
diff --git a/plugins/history-substring-search/history-substring-search.zsh b/plugins/history-substring-search/history-substring-search.zsh
index 22f03dd6d..ad316acc8 100644
--- a/plugins/history-substring-search/history-substring-search.zsh
+++ b/plugins/history-substring-search/history-substring-search.zsh
@@ -1,95 +1,4 @@
#!/usr/bin/env zsh
-#
-# This is a clean-room implementation of the Fish[1] shell's history search
-# feature, where you can type in any part of any previously entered command
-# and press the UP and DOWN arrow keys to cycle through the matching commands.
-#
-#-----------------------------------------------------------------------------
-# Usage
-#-----------------------------------------------------------------------------
-#
-# 1. Load this script into your interactive ZSH session:
-#
-# % source history-substring-search.zsh
-#
-# If you want to use the zsh-syntax-highlighting[6] script along with this
-# script, then make sure that you load it *before* you load this script:
-#
-# % source zsh-syntax-highlighting.zsh
-# % source history-substring-search.zsh
-#
-# 2. Type any part of any previous command and then:
-#
-# * Press the UP arrow key to select the nearest command that (1) contains
-# your query and (2) is older than the current command in the command
-# history.
-#
-# * Press the DOWN arrow key to select the nearest command that (1)
-# contains your query and (2) is newer than the current command in the
-# command history.
-#
-# * Press ^U (the Control and U keys simultaneously) to abort the search.
-#
-# 3. If a matching command spans more than one line of text, press the LEFT
-# arrow key to move the cursor away from the end of the command, and then:
-#
-# * Press the UP arrow key to move the cursor to the line above. When the
-# cursor reaches the first line of the command, pressing the UP arrow
-# key again will cause this script to perform another search.
-#
-# * Press the DOWN arrow key to move the cursor to the line below. When
-# the cursor reaches the last line of the command, pressing the DOWN
-# arrow key again will cause this script to perform another search.
-#
-#-----------------------------------------------------------------------------
-# Configuration
-#-----------------------------------------------------------------------------
-#
-# This script defines the following global variables. You may override their
-# default values only after having loaded this script into your ZSH session.
-#
-# * HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND is a global variable that defines
-# how the query should be highlighted inside a matching command. Its default
-# value causes this script to highlight using bold, white text on a magenta
-# background. See the "Character Highlighting" section in the zshzle(1) man
-# page to learn about the kinds of values you may assign to this variable.
-#
-# * HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND is a global variable that
-# defines how the query should be highlighted when no commands in the
-# history match it. Its default value causes this script to highlight using
-# bold, white text on a red background. See the "Character Highlighting"
-# section in the zshzle(1) man page to learn about the kinds of values you
-# may assign to this variable.
-#
-# * HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS is a global variable that defines
-# how the command history will be searched for your query. Its default value
-# causes this script to perform a case-insensitive search. See the "Globbing
-# Flags" section in the zshexpn(1) man page to learn about the kinds of
-# values you may assign to this variable.
-#
-#-----------------------------------------------------------------------------
-# History
-#-----------------------------------------------------------------------------
-#
-# This script was originally written by Peter Stephenson[2], who published it
-# to the ZSH users mailing list (thereby making it public domain) in September
-# 2009. It was later revised by Guido van Steen and released under the BSD
-# license (see below) as part of the fizsh[3] project in January 2011.
-#
-# It was later extracted from fizsh[3] release 1.0.1, refactored heavily, and
-# repackaged as both an oh-my-zsh plugin[4] and as an independently loadable
-# ZSH script[5] by Suraj N. Kurapati in 2011.
-#
-# It was further developed[4] by Guido van Steen, Suraj N. Kurapati, Sorin
-# Ionescu, and Vincent Guerci in 2011.
-#
-# [1]: http://fishshell.com
-# [2]: http://www.zsh.org/mla/users/2009/msg00818.html
-# [3]: http://sourceforge.net/projects/fizsh/
-# [4]: https://github.com/robbyrussell/oh-my-zsh/pull/215
-# [5]: https://github.com/sunaku/zsh-history-substring-search
-# [6]: https://github.com/nicoulaj/zsh-syntax-highlighting
-#
##############################################################################
#
# Copyright (c) 2009 Peter Stephenson
@@ -140,7 +49,7 @@ HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS='i'
# the main ZLE widgets
#-----------------------------------------------------------------------------
-function history-substring-search-up() {
+history-substring-search-up() {
_history-substring-search-begin
_history-substring-search-up-history ||
@@ -150,7 +59,7 @@ function history-substring-search-up() {
_history-substring-search-end
}
-function history-substring-search-down() {
+history-substring-search-down() {
_history-substring-search-begin
_history-substring-search-down-history ||
@@ -163,19 +72,10 @@ function history-substring-search-down() {
zle -N history-substring-search-up
zle -N history-substring-search-down
-zmodload zsh/terminfo
-if [[ -n "$terminfo[kcuu1]" ]]; then
- bindkey "$terminfo[kcuu1]" history-substring-search-up
-fi
-if [[ -n "$terminfo[kcud1]" ]]; then
- bindkey "$terminfo[kcud1]" history-substring-search-down
-fi
-
#-----------------------------------------------------------------------------
# implementation details
#-----------------------------------------------------------------------------
-setopt extendedglob
zmodload -F zsh/parameter
#
@@ -186,32 +86,20 @@ zmodload -F zsh/parameter
#
if [[ $+functions[_zsh_highlight] -eq 0 ]]; then
#
- # Dummy implementation of _zsh_highlight()
- # that simply removes existing highlights
- #
- function _zsh_highlight() {
- region_highlight=()
- }
-
- #
- # Remove existing highlights when the user
- # inserts printable characters into $BUFFER
+ # Dummy implementation of _zsh_highlight() that
+ # simply removes any existing highlights when the
+ # user inserts printable characters into $BUFFER.
#
- function ordinary-key-press() {
+ _zsh_highlight() {
if [[ $KEYS == [[:print:]] ]]; then
region_highlight=()
fi
- zle .self-insert
}
- zle -N self-insert ordinary-key-press
#
- # Override ZLE widgets to invoke _zsh_highlight()
+ # The following snippet was taken from the zsh-syntax-highlighting project:
#
- # https://github.com/nicoulaj/zsh-syntax-highlighting/blob/
- # bb7fcb79fad797a40077bebaf6f4e4a93c9d8163/zsh-syntax-highlighting.zsh#L121
- #
- #--------------8<-------------------8<-------------------8<-----------------
+ # https://github.com/zsh-users/zsh-syntax-highlighting/blob/56b134f5d62ae3d4e66c7f52bd0cc2595f9b305b/zsh-syntax-highlighting.zsh#L126-161
#
# Copyright (c) 2010-2011 zsh-syntax-highlighting contributors
# All rights reserved.
@@ -242,49 +130,53 @@ if [[ $+functions[_zsh_highlight] -eq 0 ]]; then
# LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
-
- # Load ZSH module zsh/zleparameter, needed to override user defined widgets.
- zmodload zsh/zleparameter 2>/dev/null || {
- echo 'zsh-syntax-highlighting: failed loading zsh/zleparameter, exiting.' >&2
- return -1
- }
-
- # Override ZLE widgets to make them invoke _zsh_highlight.
- for event in ${${(f)"$(zle -la)"}:#(_*|orig-*|.run-help|.which-command)}; do
- if [[ "$widgets[$event]" == completion:* ]]; then
- eval "zle -C orig-$event ${${${widgets[$event]}#*:}/:/ } ; $event() { builtin zle orig-$event && _zsh_highlight } ; zle -N $event"
- else
- case $event in
- accept-and-menu-complete)
- eval "$event() { builtin zle .$event && _zsh_highlight } ; zle -N $event"
- ;;
-
- # The following widgets should NOT remove any previously
- # applied highlighting. Therefore we do not remap them.
- .forward-char|.backward-char|.up-line-or-history|.down-line-or-history)
- ;;
-
- .*)
- clean_event=$event[2,${#event}] # Remove the leading dot in the event name
- case ${widgets[$clean_event]-} in
- (completion|user):*)
- ;;
- *)
- eval "$clean_event() { builtin zle $event && _zsh_highlight } ; zle -N $clean_event"
- ;;
- esac
- ;;
- *)
- ;;
+ #
+ #--------------8<-------------------8<-------------------8<-----------------
+ # Rebind all ZLE widgets to make them invoke _zsh_highlights.
+ _zsh_highlight_bind_widgets()
+ {
+ # Load ZSH module zsh/zleparameter, needed to override user defined widgets.
+ zmodload zsh/zleparameter 2>/dev/null || {
+ echo 'zsh-syntax-highlighting: failed loading zsh/zleparameter.' >&2
+ return 1
+ }
+
+ # Override ZLE widgets to make them invoke _zsh_highlight.
+ local cur_widget
+ for cur_widget in ${${(f)"$(builtin zle -la)"}:#(.*|_*|orig-*|run-help|which-command|beep|yank*)}; do
+ case $widgets[$cur_widget] in
+
+ # Already rebound event: do nothing.
+ user:$cur_widget|user:_zsh_highlight_widget_*);;
+
+ # User defined widget: override and rebind old one with prefix "orig-".
+ user:*) eval "zle -N orig-$cur_widget ${widgets[$cur_widget]#*:}; \
+ _zsh_highlight_widget_$cur_widget() { builtin zle orig-$cur_widget -- \"\$@\" && _zsh_highlight }; \
+ zle -N $cur_widget _zsh_highlight_widget_$cur_widget";;
+
+ # Completion widget: override and rebind old one with prefix "orig-".
+ completion:*) eval "zle -C orig-$cur_widget ${${widgets[$cur_widget]#*:}/:/ }; \
+ _zsh_highlight_widget_$cur_widget() { builtin zle orig-$cur_widget -- \"\$@\" && _zsh_highlight }; \
+ zle -N $cur_widget _zsh_highlight_widget_$cur_widget";;
+
+ # Builtin widget: override and make it call the builtin ".widget".
+ builtin) eval "_zsh_highlight_widget_$cur_widget() { builtin zle .$cur_widget -- \"\$@\" && _zsh_highlight }; \
+ zle -N $cur_widget _zsh_highlight_widget_$cur_widget";;
+
+ # Default: unhandled case.
+ *) echo "zsh-syntax-highlighting: unhandled ZLE widget '$cur_widget'" >&2 ;;
esac
- fi
- done
- unset event clean_event
+ done
+ }
#-------------->8------------------->8------------------->8-----------------
+
+ _zsh_highlight_bind_widgets
fi
-function _history-substring-search-begin() {
- _history_substring_search_move_cursor_eol=false
+_history-substring-search-begin() {
+ setopt localoptions extendedglob
+
+ _history_substring_search_refresh_display=
_history_substring_search_query_highlight=
#
@@ -308,12 +200,10 @@ function _history-substring-search-begin() {
#
# Find all occurrences of the search query in the history file.
#
- # (k) turns it an array of line numbers.
- #
- # (on) seems to remove duplicates, which are default
- # options. They can be turned off by (ON).
+ # (k) returns the "keys" (history index numbers) instead of the values
+ # (Oa) reverses the order, because (R) returns results reversed.
#
- _history_substring_search_matches=(${(kon)history[(R)(#$HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS)*${_history_substring_search_query_escaped}*]})
+ _history_substring_search_matches=(${(kOa)history[(R)(#$HISTORY_SUBSTRING_SEARCH_GLOBBING_FLAGS)*${_history_substring_search_query_escaped}*]})
#
# Define the range of values that $_history_substring_search_match_index
@@ -349,11 +239,15 @@ function _history-substring-search-begin() {
fi
}
-function _history-substring-search-end() {
+_history-substring-search-end() {
+ setopt localoptions extendedglob
+
_history_substring_search_result=$BUFFER
- # move the cursor to the end of the command line
- if [[ $_history_substring_search_move_cursor_eol == true ]]; then
+ # the search was succesful so display the result properly by clearing away
+ # existing highlights and moving the cursor to the end of the result buffer
+ if [[ $_history_substring_search_refresh_display -eq 1 ]]; then
+ region_highlight=()
CURSOR=${#BUFFER}
fi
@@ -378,10 +272,10 @@ function _history-substring-search-end() {
# read -k -t 200 && zle -U $REPLY
# Exit successfully from the history-substring-search-* widgets.
- true
+ return 0
}
-function _history-substring-search-up-buffer() {
+_history-substring-search-up-buffer() {
#
# Check if the UP arrow was pressed to move the cursor within a multi-line
# buffer. This amounts to three tests:
@@ -404,13 +298,13 @@ function _history-substring-search-up-buffer() {
if [[ $#buflines -gt 1 && $CURSOR -ne $#BUFFER && $#xlbuflines -ne 1 ]]; then
zle up-line-or-history
- return true
+ return 0
fi
- false
+ return 1
}
-function _history-substring-search-down-buffer() {
+_history-substring-search-down-buffer() {
#
# Check if the DOWN arrow was pressed to move the cursor within a multi-line
# buffer. This amounts to three tests:
@@ -433,13 +327,13 @@ function _history-substring-search-down-buffer() {
if [[ $#buflines -gt 1 && $CURSOR -ne $#BUFFER && $#xrbuflines -ne 1 ]]; then
zle down-line-or-history
- return true
+ return 0
fi
- false
+ return 1
}
-function _history-substring-search-up-history() {
+_history-substring-search-up-history() {
#
# Behave like up in ZSH, except clear the $BUFFER
# when beginning of history is reached like in Fish.
@@ -452,16 +346,16 @@ function _history-substring-search-up-history() {
# going up from somewhere below the top of history
else
- zle up-history
+ zle up-line-or-history
fi
- return true
+ return 0
fi
- false
+ return 1
}
-function _history-substring-search-down-history() {
+_history-substring-search-down-history() {
#
# Behave like down-history in ZSH, except clear the
# $BUFFER when end of history is reached like in Fish.
@@ -471,21 +365,31 @@ function _history-substring-search-down-history() {
# going down from the absolute top of history
if [[ $HISTNO -eq 1 && -z $BUFFER ]]; then
BUFFER=${history[1]}
- _history_substring_search_move_cursor_eol=true
+ _history_substring_search_refresh_display=1
# going down from somewhere above the bottom of history
else
- zle down-history
+ zle down-line-or-history
fi
- return true
+ return 0
fi
- false
+ return 1
+}
+
+_history-substring-search-not-found() {
+ #
+ # Nothing matched the search query, so put it back into the $BUFFER while
+ # highlighting it accordingly so the user can revise it and search again.
+ #
+ _history_substring_search_old_buffer=$BUFFER
+ BUFFER=$_history_substring_search_query
+ _history_substring_search_query_highlight=$HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND
}
-function _history-substring-search-up-search() {
- _history_substring_search_move_cursor_eol=true
+_history-substring-search-up-search() {
+ _history_substring_search_refresh_display=1
#
# Highlight matches during history-substring-up-search:
@@ -541,9 +445,7 @@ function _history-substring-search-up-search() {
# to highlight the current buffer.
#
(( _history_substring_search_match_index-- ))
- _history_substring_search_old_buffer=$BUFFER
- BUFFER=$_history_substring_search_query
- _history_substring_search_query_highlight=$HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND
+ _history-substring-search-not-found
elif [[ $_history_substring_search_match_index -eq $_history_substring_search_matches_count_plus ]]; then
#
@@ -560,11 +462,30 @@ function _history-substring-search-up-search() {
(( _history_substring_search_match_index-- ))
BUFFER=$_history_substring_search_old_buffer
_history_substring_search_query_highlight=$HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND
+
+ else
+ #
+ # We are at the beginning of history and there are no further matches.
+ #
+ _history-substring-search-not-found
+ return
+ fi
+
+ #
+ # When HIST_FIND_NO_DUPS is set, meaning that only unique command lines from
+ # history should be matched, make sure the new and old results are different.
+ # But when HIST_IGNORE_ALL_DUPS is set, ZSH already ensures a unique history.
+ #
+ if [[ ! -o HIST_IGNORE_ALL_DUPS && -o HIST_FIND_NO_DUPS && $BUFFER == $_history_substring_search_result ]]; then
+ #
+ # Repeat the current search so that a different (unique) match is found.
+ #
+ _history-substring-search-up-search
fi
}
-function _history-substring-search-down-search() {
- _history_substring_search_move_cursor_eol=true
+_history-substring-search-down-search() {
+ _history_substring_search_refresh_display=1
#
# Highlight matches during history-substring-up-search:
@@ -621,9 +542,7 @@ function _history-substring-search-down-search() {
# to highlight the current buffer.
#
(( _history_substring_search_match_index++ ))
- _history_substring_search_old_buffer=$BUFFER
- BUFFER=$_history_substring_search_query
- _history_substring_search_query_highlight=$HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_NOT_FOUND
+ _history-substring-search-not-found
elif [[ $_history_substring_search_match_index -eq 0 ]]; then
#
@@ -640,6 +559,25 @@ function _history-substring-search-down-search() {
(( _history_substring_search_match_index++ ))
BUFFER=$_history_substring_search_old_buffer
_history_substring_search_query_highlight=$HISTORY_SUBSTRING_SEARCH_HIGHLIGHT_FOUND
+
+ else
+ #
+ # We are at the end of history and there are no further matches.
+ #
+ _history-substring-search-not-found
+ return
+ fi
+
+ #
+ # When HIST_FIND_NO_DUPS is set, meaning that only unique command lines from
+ # history should be matched, make sure the new and old results are different.
+ # But when HIST_IGNORE_ALL_DUPS is set, ZSH already ensures a unique history.
+ #
+ if [[ ! -o HIST_IGNORE_ALL_DUPS && -o HIST_FIND_NO_DUPS && $BUFFER == $_history_substring_search_result ]]; then
+ #
+ # Repeat the current search so that a different (unique) match is found.
+ #
+ _history-substring-search-down-search
fi
}
diff --git a/plugins/history-substring-search/update-from-upstream.zsh b/plugins/history-substring-search/update-from-upstream.zsh
new file mode 100755
index 000000000..81e1942a5
--- /dev/null
+++ b/plugins/history-substring-search/update-from-upstream.zsh
@@ -0,0 +1,129 @@
+#!/usr/bin/env zsh
+#
+# update-from-upstream.zsh
+#
+# This script updates the Oh My Zsh version of the zsh-history-substring-search
+# plugin from the independent upstream repo. This is to be run by OMZ developers
+# when they want to pull in new changes from upstream to OMZ. It is not run
+# during normal use of the plugin.
+#
+# The official upstream repo is zsh-users/zsh-history-substring-search
+# https://github.com/zsh-users/zsh-history-substring-search
+#
+# This is a zsh script, not a function. Call it with `zsh update-from-upstream.zsh`
+# from the command line, running it from within the plugin directory.
+#
+# You can set the environment variable REPO_PATH to point it at an upstream
+# repo you have already prepared. Otherwise, it will do a clean checkout of
+# upstream's HEAD to a temporary local repo and use that.
+
+
+# Just bail on any error so we don't have to do extra checking.
+# This is a developer-use script, so terse output like that should
+# be fine.
+set -e
+
+
+upstream_basename=zsh-history-substring-search
+plugin_basename=history-substring-search
+UPSTREAM_REPO=zsh-users/$upstream_basename
+need_repo_cleanup=false
+upstream_github_url="https://github.com/$UPSTREAM_REPO"
+
+if [[ -z "$UPSTREAM_REPO_PATH" ]]; then
+ # Do a clean checkout
+ my_tempdir=$(mktemp -d -t omz-update-histsubstrsrch)
+ UPSTREAM_REPO_PATH="$my_tempdir/$upstream_basename"
+ git clone "$upstream_github_url" "$UPSTREAM_REPO_PATH"
+ need_repo_cleanup=true
+ print "Checked out upstream repo to $UPSTREAM_REPO_PATH"
+else
+ print "Using existing $upstream_basename repo at $UPSTREAM_REPO_PATH"
+fi
+
+upstream="$UPSTREAM_REPO_PATH"
+
+# Figure out what we're pulling in
+upstream_sha=$(cd $upstream && git rev-parse HEAD)
+upstream_commit_date=$(cd $upstream && git log -1 --pretty=format:%ci)
+upstream_just_date=${${=upstream_commit_date}[1]}
+print "upstream SHA: $upstream_sha"
+print "upstream commit time: $upstream_commit_date"
+print "upstream commit date: $upstream_just_date"
+print
+
+# Copy the files over, using the OMZ plugin's names where needed
+cp -v "$upstream"/* .
+mv -v zsh-history-substring-search.zsh $plugin_basename.zsh
+mv -v zsh-history-substring-search.plugin.zsh $plugin_basename.plugin.zsh
+
+if [[ $need_repo_cleanup == true ]]; then
+ print "Removing temporary repo at $my_tempdir"
+ rm -rf "$my_tempdir"
+fi
+
+# Do OMZ-specific edits
+
+print
+print "Updating files with OMZ-specific stuff"
+print
+
+# OMZ binds the keys as part of the plugin loading
+
+cat >> $plugin_basename.plugin.zsh <<EOF
+
+
+# Bind terminal-specific up and down keys
+
+if [[ -n "\$terminfo[kcuu1]" ]]; then
+ bindkey -M emacs "\$terminfo[kcuu1]" history-substring-search-up
+ bindkey -M viins "\$terminfo[kcuu1]" history-substring-search-up
+fi
+if [[ -n "\$terminfo[kcud1]" ]]; then
+ bindkey -M emacs "\$terminfo[kcud1]" history-substring-search-down
+ bindkey -M viins "\$terminfo[kcud1]" history-substring-search-down
+fi
+
+EOF
+
+# Tack OMZ-specific notes on to readme
+
+thin_line="------------------------------------------------------------------------------"
+cat >> README.md <<EOF
+
+$thin_line
+Oh My Zsh Distribution Notes
+$thin_line
+
+What you are looking at now is Oh My Zsh's repackaging of zsh-history-substring-search
+as an OMZ module inside the Oh My Zsh distribution.
+
+The upstream repo, $UPSTREAM_REPO, can be found on GitHub at
+$upstream_github_url.
+
+This downstream copy was last updated from the following upstream commit:
+
+ SHA: $upstream_sha
+ Commit date: $upstream_commit_date
+
+Everything above this section is a copy of the original upstream's README, so things
+may differ slightly when you're using this inside OMZ. In particular, you do not
+need to set up key bindings for the up and down arrows yourself in \`~/.zshrc\`; the OMZ
+plugin does that for you. You may still want to set up additional emacs- or vi-specific
+bindings as mentioned above.
+
+EOF
+
+# Announce success and generate git commit messages
+
+cat <<EOF
+Done OK
+
+Now you can check the results and commit like this:
+
+ git add *
+ git commit -m "history-substring-search: update to upstream version $upstream_just_date" \\
+ -m "Updates OMZ's copy to commit $upstream_sha from $UPSTREAM_REPO"
+
+EOF
+
diff --git a/plugins/history/README.md b/plugins/history/README.md
new file mode 100644
index 000000000..dd9286894
--- /dev/null
+++ b/plugins/history/README.md
@@ -0,0 +1,15 @@
+## history
+
+Provides a couple of convenient aliases for using the `history` command to examine your command line history.
+
+### Requirements
+
+* None.
+
+### Usage
+
+* If `h` is called, your command history is listed. Equivalent to using `history`
+
+* If `hsi` is called with an argument, a **case insensitive** `grep` search is performed on your command history, looking for commands that match the argument provided
+
+* If `hsi` is called without an argument you will help on `grep` arguments \ No newline at end of file
diff --git a/plugins/httpie/README.md b/plugins/httpie/README.md
new file mode 100644
index 000000000..1d4ec48bd
--- /dev/null
+++ b/plugins/httpie/README.md
@@ -0,0 +1,6 @@
+## HTTPie
+**Maintainer:** [lululau](https://github.com/lululau)
+
+This plugin adds completion for HTTPie, which is a command line HTTP client, a user-friendly cURL replacement.
+
+[HTTPie Homepage](http://httpie.org)
diff --git a/plugins/jira/README.md b/plugins/jira/README.md
new file mode 100644
index 000000000..efb8a743a
--- /dev/null
+++ b/plugins/jira/README.md
@@ -0,0 +1,64 @@
+# Jira plugin #
+
+CLI support for JIRA interaction
+
+## Description ##
+
+This plugin provides command line tools for interacting with Atlassian's [JIRA](https://www.atlassian.com/software/jira) bug tracking software.
+
+The interaction is all done through the web. No local installation of JIRA is necessary.
+
+In this document, "JIRA" refers to the JIRA issue tracking server, and `jira` refers to the command this plugin supplies.
+
+## Usage ##
+
+This plugin supplies one command, `jira`, through which all its features are exposed. Most forms of this command open a JIRA page in your web browser.
+
+```
+jira # performs the default action
+
+jira new # opens a new issue
+jira dashboard # opens your JIRA dashboard
+jira reported [username] # queries for issues reported by a user
+jira assigned [username] # queries for issues assigned to a user
+jira ABC-123 # opens an existing issue
+jira ABC-123 m # opens an existing issue for adding a comment
+```
+
+#### Debugging usage ####
+
+These calling forms are for developers' use, and may change at any time.
+
+```
+jira dumpconfig # displays the effective configuration
+```
+
+## Setup ##
+
+The URL for your JIRA instance is set by `$JIRA_URL` or a `.jira_url` file.
+
+Add a `.jira-url` file in the base of your project. You can also set `$JIRA_URL` in your `~/.zshrc` or put a `.jira-url` in your home directory. A `.jira-url` in the current directory takes precedence, so you can make per-project customizations.
+
+The same goes with `.jira-prefix` and `$JIRA_PREFIX`. These control the prefix added to all issue IDs, which differentiates projects within a JIRA instance.
+
+For example:
+
+```
+cd to/my/project
+echo "https://jira.atlassian.com" >> .jira-url
+```
+
+(Note: The current implementation only looks in the current directory for `.jira-url` and `.jira-prefix`, not up the path, so if you are in a subdirectory of your project, it will fall back to your default JIRA URL. This will probably change in the future though.)
+
+### Variables ###
+
+* `$JIRA_URL` - Your JIRA instance's URL
+* `$JIRA_NAME` - Your JIRA username; used as the default user for `assigned`/`reported` searches
+* `$JIRA_PREFIX` - Prefix added to issue ID arguments
+* `$JIRA_RAPID_BOARD` - Set to `true` if you use Rapid Board
+* `$JIRA_DEFAULT_ACTION` - Action to do when `jira` is called with no arguments; defaults to "new"
+
+
+### Browser ###
+
+Your default web browser, as determined by how `open_command` handles `http://` URLs, is used for interacting with the JIRA instance. If you change your system's URL handler associations, it will change the browser that `jira` uses.
diff --git a/plugins/jira/_jira b/plugins/jira/_jira
new file mode 100644
index 000000000..03fe6a499
--- /dev/null
+++ b/plugins/jira/_jira
@@ -0,0 +1,22 @@
+#compdef jira
+#autoload
+
+local -a _1st_arguments
+_1st_arguments=(
+ 'new:create a new issue'
+ 'dashboard:open the dashboard'
+ 'reported:search for issues reported by a user'
+ 'assigned:search for issues assigned to a user'
+ 'dumpconfig:display effective jira configuration'
+)
+
+_arguments -C \
+ ':command:->command' \
+ '*::options:->options'
+
+case $state in
+ (command)
+ _describe -t commands "jira subcommand" _1st_arguments
+ return
+ ;;
+esac
diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh
index 4a36b882d..341e23ec0 100644
--- a/plugins/jira/jira.plugin.zsh
+++ b/plugins/jira/jira.plugin.zsh
@@ -1,90 +1,102 @@
-# To use: add a .jira-url file in the base of your project
-# You can also set JIRA_URL in your .zshrc or put .jira-url in your home directory
-# .jira-url in the current directory takes precedence
+# CLI support for JIRA interaction
#
-# If you use Rapid Board, set:
-#JIRA_RAPID_BOARD="true"
-# in you .zshrc
-#
-# Setup: cd to/my/project
-# echo "https://name.jira.com" >> .jira-url
-# Usage: jira # opens a new issue
-# jira ABC-123 # Opens an existing issue
-open_jira_issue () {
- local open_cmd
- if [[ "$OSTYPE" = darwin* ]]; then
- open_cmd='open'
- else
- open_cmd='xdg-open'
- fi
+# See README.md for details
- if [ -f .jira-url ]; then
+: ${JIRA_DEFAULT_ACTION:=new}
+
+function jira() {
+ emulate -L zsh
+ local action=${1:=$JIRA_DEFAULT_ACTION}
+
+ local jira_url jira_prefix
+ if [[ -f .jira-url ]]; then
jira_url=$(cat .jira-url)
- elif [ -f ~/.jira-url ]; then
+ elif [[ -f ~/.jira-url ]]; then
jira_url=$(cat ~/.jira-url)
- elif [[ "x$JIRA_URL" != "x" ]]; then
- jira_url=$JIRA_URL
+ elif [[ -n "${JIRA_URL}" ]]; then
+ jira_url=${JIRA_URL}
else
- echo "JIRA url is not specified anywhere."
+ _jira_url_help
return 1
fi
- if [ -f .jira-prefix ]; then
+ if [[ -f .jira-prefix ]]; then
jira_prefix=$(cat .jira-prefix)
- elif [ -f ~/.jira-prefix ]; then
+ elif [[ -f ~/.jira-prefix ]]; then
jira_prefix=$(cat ~/.jira-prefix)
+ elif [[ -n "${JIRA_PREFIX}" ]]; then
+ jira_prefix=${JIRA_PREFIX}
else
jira_prefix=""
fi
- if [ -z "$1" ]; then
+
+ if [[ $action == "new" ]]; then
echo "Opening new issue"
- $open_cmd "${jira_url}/secure/CreateIssue!default.jspa"
- elif [[ "$1" = "assigned" || "$1" = "reported" ]]; then
- jira_query $@
+ open_command "${jira_url}/secure/CreateIssue!default.jspa"
+ elif [[ "$action" == "assigned" || "$action" == "reported" ]]; then
+ _jira_query $@
+ elif [[ "$action" == "dashboard" ]]; then
+ echo "Opening dashboard"
+ open_command "${jira_url}/secure/Dashboard.jspa"
+ elif [[ "$action" == "dumpconfig" ]]; then
+ echo "JIRA_URL=$jira_url"
+ echo "JIRA_PREFIX=$jira_prefix"
+ echo "JIRA_NAME=$JIRA_NAME"
+ echo "JIRA_RAPID_BOARD=$JIRA_RAPID_BOARD"
+ echo "JIRA_DEFAULT_ACTION=$JIRA_DEFAULT_ACTION"
else
- echo "Opening issue #$1"
- if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then
- $open_cmd "$jira_url/issues/$jira_prefix$1"
+ # Anything that doesn't match a special action is considered an issue name
+ local issue_arg=$action
+ local issue="${jira_prefix}${issue_arg}"
+ local url_fragment=''
+ if [[ "$2" == "m" ]]; then
+ url_fragment="#add-comment"
+ echo "Add comment to issue #$issue"
else
- $open_cmd "$jira_url/browse/$jira_prefix$1"
+ echo "Opening issue #$issue"
fi
- fi
-}
-
-jira_name () {
- if [[ -z "$1" ]]; then
- if [[ "x${JIRA_NAME}" != "x" ]]; then
- jira_name=${JIRA_NAME}
+ if [[ "$JIRA_RAPID_BOARD" == "true" ]]; then
+ open_command "${jira_url}/issues/${issue}${url_fragment}"
else
- echo "JIRA_NAME not specified"
- return 1
+ open_command "${jira_url}/browse/${issue}${url_fragment}"
fi
- else
- jira_name=$@
fi
}
-jira_query () {
- verb="$1"
- if [[ "${verb}" = "reported" ]]; then
- lookup=reporter
- preposition=by
- elif [[ "${verb}" = "assigned" ]]; then
- lookup=assignee
- preposition=to
- else
- echo "not a valid lookup $verb"
- return 1
- fi
- shift 1
- jira_name $@
- if [[ $? = 1 ]]; then
- return 1
- fi
- echo "Browsing issues ${verb} ${preposition} ${jira_name}"
- $open_cmd "${jira_url}/secure/IssueNavigator.jspa?reset=true&jqlQuery=${lookup}+%3D+%22${jira_name}%22+AND+resolution+%3D+unresolved+ORDER+BY+priority+DESC%2C+created+ASC"
+function _jira_url_help() {
+ cat << EOF
+error: JIRA URL is not specified anywhere.
+
+Valid options, in order of precedence:
+ .jira-url file
+ \$HOME/.jira-url file
+ \$JIRA_URL environment variable
+EOF
}
-alias jira='open_jira_issue'
+function _jira_query() {
+ emulate -L zsh
+ local verb="$1"
+ local jira_name lookup preposition query
+ if [[ "${verb}" == "reported" ]]; then
+ lookup=reporter
+ preposition=by
+ elif [[ "${verb}" == "assigned" ]]; then
+ lookup=assignee
+ preposition=to
+ else
+ echo "error: not a valid lookup: $verb" >&2
+ return 1
+ fi
+ jira_name=${2:=$JIRA_NAME}
+ if [[ -z $jira_name ]]; then
+ echo "error: JIRA_NAME not specified" >&2
+ return 1
+ fi
+
+ echo "Browsing issues ${verb} ${preposition} ${jira_name}"
+ query="${lookup}+%3D+%22${jira_name}%22+AND+resolution+%3D+unresolved+ORDER+BY+priority+DESC%2C+created+ASC"
+ open_command "${jira_url}/secure/IssueNavigator.jspa?reset=true&jqlQuery=${query}"
+}
diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh
index d082c11e5..e58e7373d 100644
--- a/plugins/jump/jump.plugin.zsh
+++ b/plugins/jump/jump.plugin.zsh
@@ -13,7 +13,7 @@ jump() {
}
mark() {
- if (( $# == 0 )); then
+ if [[ ( $# == 0 ) || ( "$1" == "." ) ]]; then
MARK=$(basename "$PWD")
else
MARK="$1"
diff --git a/plugins/kitchen/_kitchen b/plugins/kitchen/_kitchen
new file mode 100644
index 000000000..54105b61a
--- /dev/null
+++ b/plugins/kitchen/_kitchen
@@ -0,0 +1,41 @@
+# author: Peter Eisentraut
+# source: https://gist.github.com/petere/10307599
+# compdef kitchen
+
+_kitchen() {
+ local curcontext="$curcontext" state line
+ typeset -A opt_args
+
+ _arguments '1: :->cmds'\
+ '2: :->args'
+
+ case $state in
+ cmds)
+ _arguments "1:Commands:(console converge create destroy diagnose driver help init list login setup test verify version)"
+ ;;
+ args)
+ case $line[1] in
+ converge|create|destroy|diagnose|list|setup|test|verify)
+ compadd "$@" all
+ _kitchen_instances
+ ;;
+ login)
+ _kitchen_instances
+ ;;
+ esac
+ ;;
+ esac
+}
+
+_kitchen_instances() {
+ if [[ $_kitchen_instances_cache_dir != $PWD ]]; then
+ unset _kitchen_instances_cache
+ fi
+ if [[ ${+_kitchen_instances_cache} -eq 0 ]]; then
+ _kitchen_instances_cache=(${(f)"$(bundle exec kitchen list -b 2>/dev/null || kitchen list -b 2>/dev/null)"})
+ _kitchen_instances_cache_dir=$PWD
+ fi
+ compadd -a _kitchen_instances_cache
+}
+
+_kitchen "$@"
diff --git a/plugins/laravel5/laravel5.plugin.zsh b/plugins/laravel5/laravel5.plugin.zsh
index 2afa99317..38454f40d 100644
--- a/plugins/laravel5/laravel5.plugin.zsh
+++ b/plugins/laravel5/laravel5.plugin.zsh
@@ -15,6 +15,6 @@ compdef _laravel5 la5
#Alias
alias la5='php artisan'
-alias la5dump='php artisan dump-autoload'
alias la5cache='php artisan cache:clear'
-alias la5routes='php artisan routes'
+alias la5routes='php artisan route:list'
+alias la5vendor='php artisan vendor:publish'
diff --git a/plugins/last-working-dir/last-working-dir.plugin.zsh b/plugins/last-working-dir/last-working-dir.plugin.zsh
index 4fa6fcc34..c458464ce 100644
--- a/plugins/last-working-dir/last-working-dir.plugin.zsh
+++ b/plugins/last-working-dir/last-working-dir.plugin.zsh
@@ -8,14 +8,15 @@ mkdir -p $ZSH_CACHE_DIR
cache_file="$ZSH_CACHE_DIR/last-working-dir"
# Updates the last directory once directory is changed.
-function chpwd() {
+chpwd_functions+=(chpwd_last_working_dir)
+function chpwd_last_working_dir() {
# Use >| in case noclobber is set to avoid "file exists" error
pwd >| "$cache_file"
}
# Changes directory to the last working directory.
function lwd() {
- [[ ! -r "$cache_file" ]] || cd `cat "$cache_file"`
+ [[ ! -r "$cache_file" ]] || cd "`cat "$cache_file"`"
}
# Automatically jump to last working directory unless this isn't the first time
diff --git a/plugins/lighthouse/lighthouse.plugin.zsh b/plugins/lighthouse/lighthouse.plugin.zsh
index 7661c6add..48cddbccc 100644
--- a/plugins/lighthouse/lighthouse.plugin.zsh
+++ b/plugins/lighthouse/lighthouse.plugin.zsh
@@ -9,7 +9,7 @@ open_lighthouse_ticket () {
else
lighthouse_url=$(cat .lighthouse-url);
echo "Opening ticket #$1";
- `open $lighthouse_url/tickets/$1`;
+ open_command "$lighthouse_url/tickets/$1";
fi
}
diff --git a/plugins/man/man.zsh b/plugins/man/man.zsh
new file mode 100644
index 000000000..3490b0b61
--- /dev/null
+++ b/plugins/man/man.zsh
@@ -0,0 +1,27 @@
+# ------------------------------------------------------------------------------
+# Author
+# ------
+#
+# * Jerry Ling<jerryling315@gmail.com>
+#
+# ------------------------------------------------------------------------------
+# Usgae
+# -----
+#
+# man will be inserted before the command
+#
+# ------------------------------------------------------------------------------
+
+man-command-line() {
+ [[ -z $BUFFER ]] && zle up-history
+ [[ $BUFFER != man\ * ]] && LBUFFER="man $LBUFFER"
+}
+zle -N man-command-line
+# Defined shortcut keys: [Esc]man
+bindkey "\e"man man-command-line
+
+
+# ------------------------------------------------------------------------------
+# Also, you might want to use man-preview included in 'osx' plugin
+# just substitute "man" in the function with "man-preview" after you included OS X in
+# the .zshrc \ No newline at end of file
diff --git a/plugins/mercurial/README.md b/plugins/mercurial/README.md
new file mode 100644
index 000000000..f42212d68
--- /dev/null
+++ b/plugins/mercurial/README.md
@@ -0,0 +1,60 @@
+# Mercurial plugin
+### Usage
+Update .zshrc:
+
+1. Add name to the list of plugins, e.g. `plugins=(... mercurial ...)`
+ (that is pretty obvious).
+2. Switch to a theme which uses `hg_prompt_info`.
+
+ Or, customize the `$PROMPT` variable of your current theme to contain current folder mercurial repo info. This can be done by putting a custom version of the theme in `$ZSH_CUSTOM` or by changing `$PROMPT` in `.zshrc` after loading the theme.
+
+ The `robbyrussell` theme is used by default, so you need to modify `$PROMPT` var by adding `$(hg_prompt_info)` after `$(git_prompt_info)`, so it looks like this:
+
+ ```zsh
+ PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)$(hg_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}'
+ ```
+
+3. Initialize additional vars used in plugin. So in short put next in **.zshrc**:
+
+ ```
+ ZSH_THEME_HG_PROMPT_PREFIX="%{$fg_bold[magenta]%}hg:(%{$fg[red]%}"
+ ZSH_THEME_HG_PROMPT_SUFFIX="%{$reset_color%}"
+ ZSH_THEME_HG_PROMPT_DIRTY="%{$fg[magenta]%}) %{$fg[yellow]%}✗%{$reset_color%}"
+ ZSH_THEME_HG_PROMPT_CLEAN="%{$fg[magenta]%})"
+ ```
+
+### What's inside?
+#### Adds handy aliases:
+###### general
+* `hgc` - `hg commit`
+* `hgb` - `hg branch`
+* `hgba` - `hg branches`
+* `hgbk` - `hg bookmarks`
+* `hgco` - `hg checkout`
+* `hgd` - `hg diff`
+* `hged` - `hg diffmerge`
+
+###### pull and update
+* `hgi` - `hg incoming`
+* `hgl` - `hg pull -u`
+* `hglr` - `hg pull --rebase`
+* `hgo` - `hg outgoing`
+* `hgp` - `hg push`
+* `hgs` - `hg status`
+* `hgsl` - `hg log --limit 20 --template "{node|short} | {date|isodatesec} | {author|user}: {desc|strip|firstline}\n"`
+
+###### this is the 'git commit --amend' equivalent
+* `hgca` - `hg qimport -r tip ; hg qrefresh -e ; hg qfinish tip`
+
+###### list unresolved files (since hg does not list unmerged files in the status command)
+* `hgun` - `hg resolve --list`
+
+#### Displays repo branch and directory status in prompt
+This is the same as git plugin does.
+
+**Note**: Additional changes to **.zshrc**, or using a theme designed to use `hg_prompt_info`, are required in order for this to work.
+
+### Mantainers
+[ptrv](https://github.com/ptrv) - original creator
+
+[oshybystyi](https://github.com/oshybystyi) - created this README and know how most of code works
diff --git a/plugins/mercurial/mercurial.plugin.zsh b/plugins/mercurial/mercurial.plugin.zsh
index 86200ccf6..3ae59496e 100644
--- a/plugins/mercurial/mercurial.plugin.zsh
+++ b/plugins/mercurial/mercurial.plugin.zsh
@@ -14,8 +14,7 @@ alias hgo='hg outgoing'
alias hgp='hg push'
alias hgs='hg status'
alias hgsl='hg log --limit 20 --template "{node|short} | {date|isodatesec} | {author|user}: {desc|strip|firstline}\n" '
-# this is the 'git commit --amend' equivalent
-alias hgca='hg qimport -r tip ; hg qrefresh -e ; hg qfinish tip'
+alias hgca='hg commit --amend'
# list unresolved files (since hg does not list unmerged files in the status command)
alias hgun='hg resolve --list'
diff --git a/plugins/mix-fast/README.md b/plugins/mix-fast/README.md
new file mode 100644
index 000000000..9a5eccc3f
--- /dev/null
+++ b/plugins/mix-fast/README.md
@@ -0,0 +1,28 @@
+# mix-fast
+
+Fast mix autocompletion plugin.
+
+This script caches the output for later usage and significantly speeds it up.
+It generates a .mix_tasks cache file for current project. Currently if you want
+to update cache you should remove .mix_tasks file
+
+Inspired by and based on rake-fast zsh plugin.
+
+This is entirely based on [this pull request by Ullrich Schäfer](https://github.com/robb/.dotfiles/pull/10/), which is inspired by [this Ruby on Rails trick from 2006](http://weblog.rubyonrails.org/2006/3/9/fast-mix-task-completion-for-zsh/).
+
+
+## Installation
+
+Just add the plugin to your `.zshrc`:
+
+```bash
+plugins=(foo bar mix-fast)
+```
+
+You might consider adding `.mix_tasks` to your [global .gitignore](https://help.github.com/articles/ignoring-files#global-gitignore)
+
+## Usage
+
+`mix`, then press tab
+
+Currently maintained by [styx](https://github.com/styx/) \ No newline at end of file
diff --git a/plugins/mix-fast/mix-fast.plugin.zsh b/plugins/mix-fast/mix-fast.plugin.zsh
new file mode 100644
index 000000000..3719c3525
--- /dev/null
+++ b/plugins/mix-fast/mix-fast.plugin.zsh
@@ -0,0 +1,29 @@
+_mix_refresh () {
+ if [ -f .mix_tasks ]; then
+ rm .mix_tasks
+ fi
+ echo "Generating .mix_tasks..." > /dev/stderr
+ _mix_generate
+ cat .mix_tasks
+}
+
+_mix_does_task_list_need_generating () {
+ [ ! -f .mix_tasks ];
+}
+
+_mix_generate () {
+ mix --help | grep -v 'iex -S' | tail -n +2 | cut -d " " -f 2 > .mix_tasks
+}
+
+_mix () {
+ if [ -f mix.exs ]; then
+ if _mix_does_task_list_need_generating; then
+ echo "\nGenerating .mix_tasks..." > /dev/stderr
+ _mix_generate
+ fi
+ compadd `cat .mix_tasks`
+ fi
+}
+
+compdef _mix mix
+alias mix_refresh='_mix_refresh'
diff --git a/plugins/mix/_mix b/plugins/mix/_mix
index b7c982e0a..319932b3f 100644
--- a/plugins/mix/_mix
+++ b/plugins/mix/_mix
@@ -1,28 +1,43 @@
-#compdef mix
+#compdef mix
#autoload
# Elixir mix zsh completion
local -a _1st_arguments
_1st_arguments=(
- 'archive:Archive this project into a .ez file'
- 'clean:Clean generated application files'
+ 'app.start:Start all registered apps'
+ 'archive:List all archives'
+ 'archive.build:Archive this project into a .ez file'
+ 'archive.install:Install an archive locally'
+ 'archive.uninstall:Uninstall archives'
+ 'clean:Delete generated application files'
+ 'cmd:Executes the given command'
'compile:Compile source files'
+ 'compile.protocols:Consolidates all protocols in all paths'
'deps:List dependencies and their status'
- "deps.clean:Remove dependencies' files"
+ "deps.clean:Remove the given dependencies' files"
'deps.compile:Compile dependencies'
'deps.get:Get all out of date dependencies'
'deps.unlock:Unlock the given dependencies'
- 'deps.update:Update dependencies'
- 'do:Executes the commands separated by comma'
- 'escriptize:Generates an escript for the project'
+ 'deps.update:Update the given dependencies'
+ 'do:Executes the tasks separated by comma'
+ 'escript.build:Builds an escript for the project'
'help:Print help information for tasks'
+ 'hex:Print hex help information'
+ 'hex.config:Read or update hex config'
+ 'hex.docs:Publish docs for package'
+ 'hex.info:Print hex information'
+ 'hex.key:Hex API key tasks'
+ 'hex.outdated:Shows outdated hex deps for the current project'
+ 'hex.owner:Hex package ownership tasks'
+ 'hex.publish:Publish a new package version'
+ 'hex.search:Search for package names'
+ 'hex.user:Hex user tasks'
+ 'loadconfig:Loads and persists the given configuration'
'local:List local tasks'
- 'local.install:Install a task or an archive locally'
+ 'local.hex:Install hex locally'
'local.rebar:Install rebar locally'
- 'local.uninstall:Uninstall local tasks or archives'
- 'local.hex:Install Hex locally'
- 'new:Creates a new Elixir project'
+ 'new:Create a new Elixir project'
'run:Run the given file or expression'
"test:Run a project's tests"
'--help:Describe available tasks'
@@ -34,7 +49,7 @@ __task_list ()
local expl
declare -a tasks
- tasks=(archive clean compile deps deps.clean deps.compile deps.get deps.unlock deps.update do escriptize help local local.install local.rebar local.uninstall new run test)
+ tasks=(app.start archive archive.build archive.install archive.uninstall clean cmd compile compile.protocols deps deps.clean deps.compile deps.get deps.unlock deps.update do escript.build help hex hex.config hex.docs hex.info hex.key hex.outdated hex.owner hex.publish hex.search hex.user loadconfig local local.hex local.rebar new run test)
_wanted tasks expl 'help' compadd $tasks
}
@@ -57,7 +72,7 @@ case $state in
(options)
case $line[1] in
(help)
- _arguments ':feature:__task_list'
+ _arguments ':feature:__task_list'
esac
;;
esac
diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh
index 865b15235..8324c495b 100644
--- a/plugins/mvn/mvn.plugin.zsh
+++ b/plugins/mvn/mvn.plugin.zsh
@@ -1,24 +1,24 @@
# mvn-color based on https://gist.github.com/1027800
-export BOLD=`tput bold`
-export UNDERLINE_ON=`tput smul`
-export UNDERLINE_OFF=`tput rmul`
-export TEXT_BLACK=`tput setaf 0`
-export TEXT_RED=`tput setaf 1`
-export TEXT_GREEN=`tput setaf 2`
-export TEXT_YELLOW=`tput setaf 3`
-export TEXT_BLUE=`tput setaf 4`
-export TEXT_MAGENTA=`tput setaf 5`
-export TEXT_CYAN=`tput setaf 6`
-export TEXT_WHITE=`tput setaf 7`
-export BACKGROUND_BLACK=`tput setab 0`
-export BACKGROUND_RED=`tput setab 1`
-export BACKGROUND_GREEN=`tput setab 2`
-export BACKGROUND_YELLOW=`tput setab 3`
-export BACKGROUND_BLUE=`tput setab 4`
-export BACKGROUND_MAGENTA=`tput setab 5`
-export BACKGROUND_CYAN=`tput setab 6`
-export BACKGROUND_WHITE=`tput setab 7`
-export RESET_FORMATTING=`tput sgr0`
+BOLD=`tput bold`
+UNDERLINE_ON=`tput smul`
+UNDERLINE_OFF=`tput rmul`
+TEXT_BLACK=`tput setaf 0`
+TEXT_RED=`tput setaf 1`
+TEXT_GREEN=`tput setaf 2`
+TEXT_YELLOW=`tput setaf 3`
+TEXT_BLUE=`tput setaf 4`
+TEXT_MAGENTA=`tput setaf 5`
+TEXT_CYAN=`tput setaf 6`
+TEXT_WHITE=`tput setaf 7`
+BACKGROUND_BLACK=`tput setab 0`
+BACKGROUND_RED=`tput setab 1`
+BACKGROUND_GREEN=`tput setab 2`
+BACKGROUND_YELLOW=`tput setab 3`
+BACKGROUND_BLUE=`tput setab 4`
+BACKGROUND_MAGENTA=`tput setab 5`
+BACKGROUND_CYAN=`tput setab 6`
+BACKGROUND_WHITE=`tput setab 7`
+RESET_FORMATTING=`tput sgr0`
# Wrapper function for Maven's mvn command.
diff --git a/plugins/n98-magerun/n98-magerun.plugin.zsh b/plugins/n98-magerun/n98-magerun.plugin.zsh
new file mode 100755
index 000000000..bfcf27b98
--- /dev/null
+++ b/plugins/n98-magerun/n98-magerun.plugin.zsh
@@ -0,0 +1,34 @@
+# ------------------------------------------------------------------------------
+# FILE: n98-magerun.plugin.zsh
+# DESCRIPTION: oh-my-zsh n98-magerun plugin file. Adapted from composer plugin
+# AUTHOR: Andrew Dwyer (andrewrdwyer at gmail dot com)
+# VERSION: 1.0.0
+# ------------------------------------------------------------------------------
+
+# n98-magerun basic command completion
+_n98_magerun_get_command_list () {
+ $_comp_command1 --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z\-:]+/ { print $1 }'
+}
+
+
+_n98_magerun () {
+ _arguments '1: :->command' '*:optional arg:_files'
+
+ case $state in
+ command)
+ compadd $(_n98_magerun_get_command_list)
+ ;;
+ *)
+ esac
+}
+
+compdef _n98_magerun n98-magerun.phar
+compdef _n98_magerun n98-magerun
+
+# Aliases
+alias n98='n98-magerun.phar'
+alias mage='n98-magerun.phar'
+alias magefl='n98-magerun.phar cache:flush'
+
+# Install n98-magerun into the current directory
+alias mage-get='wget https://raw.github.com/netz98/n98-magerun/master/n98-magerun.phar'
diff --git a/plugins/nmap/README.md b/plugins/nmap/README.md
index 8bb8e0648..5cd646277 100644
--- a/plugins/nmap/README.md
+++ b/plugins/nmap/README.md
@@ -19,14 +19,19 @@ Nmap options are:
## Aliases explained
- * nmap_open_ports - scan for open ports on target
- * nmap_list_interfaces - list all network interfaces on host where the command runs
- * nmap_slow - slow scan that avoids to spam the targets logs
- * nmap_fin - scan to see if hosts are up with TCP FIN scan
- * nmap_full - aggressive full scan that scans all ports, tries to determine OS and service versions
+ * nmap_open_ports - Scan for open ports on target
+ * nmap_list_interfaces - List all network interfaces on host where the command runs
+ * nmap_slow - Slow scan that avoids to spam the targets logs
+ * nmap_fin - Scan to see if hosts are up with TCP FIN scan
+ * nmap_full - Aggressive full scan that scans all ports, tries to determine OS and service versions
* nmap_check_for_firewall - TCP ACK scan to check for firewall existence
* nmap_ping_through_firewall - Host discovery with SYN and ACK probes instead of just pings to avoid firewall
restrictions
* nmap_fast - Fast scan of the top 300 popular ports
- * nmap_detect_versions - detects versions of services and OS, runs on all ports
- * nmap_check_for_vulns - uses vulscan script to check target services for vulnerabilities
+ * nmap_detect_versions - Detects versions of services and OS, runs on all ports
+ * nmap_check_for_vulns - Uses vulscan script to check target services for vulnerabilities
+ * nmap_full_udp - Same as full but via UDP
+ * nmap_traceroute - Try to traceroute using the most common ports
+ * nmap_full_with_scripts - Same as nmap_full but also runs all the scripts
+ * nmap_web_safe_osscan - Little "safer" scan for OS version as connecting to only HTTP and HTTPS ports doesn't look so attacking.
+
diff --git a/plugins/nmap/nmap.plugin.zsh b/plugins/nmap/nmap.plugin.zsh
index f3603f622..d09f2c615 100644
--- a/plugins/nmap/nmap.plugin.zsh
+++ b/plugins/nmap/nmap.plugin.zsh
@@ -22,7 +22,11 @@ alias nmap_fin="nmap -sF -v"
alias nmap_full="nmap -sS -T4 -PE -PP -PS80,443 -PY -g 53 -A -p1-65535 -v"
alias nmap_check_for_firewall="nmap -sA -p1-65535 -v -T4"
alias nmap_ping_through_firewall="nmap -PS -PA"
-alias nmap_fast="nmap -F -T5 --top-ports 300"
+alias nmap_fast="nmap -F -T5 --version-light --top-ports 300"
alias nmap_detect_versions="nmap -sV -p1-65535 -O --osscan-guess -T4 -Pn"
alias nmap_check_for_vulns="nmap --script=vulscan"
+alias nmap_full_udp="nmap -sS -sU -T4 -A -v -PE -PS22,25,80 -PA21,23,80,443,3389 "
+alias nmap_traceroute="nmap -sP -PE -PS22,25,80 -PA21,23,80,3389 -PU -PO --traceroute "
+alias nmap_full_with_scripts="sudo nmap -sS -sU -T4 -A -v -PE -PP -PS21,22,23,25,80,113,31339 -PA80,113,443,10042 -PO --script all "
+alias nmap_web_safe_osscan="sudo nmap -p 80,443 -O -v --osscan-guess --fuzzy "
diff --git a/plugins/node/node.plugin.zsh b/plugins/node/node.plugin.zsh
index 39d8b10d9..2463815ac 100644
--- a/plugins/node/node.plugin.zsh
+++ b/plugins/node/node.plugin.zsh
@@ -1,13 +1,5 @@
# Open the node api for your current version to the optional section.
# TODO: Make the section part easier to use.
function node-docs {
- # get the open command
- local open_cmd
- if [[ "$OSTYPE" = darwin* ]]; then
- open_cmd='open'
- else
- open_cmd='xdg-open'
- fi
-
- $open_cmd "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1"
+ open_command "http://nodejs.org/docs/$(node --version)/api/all.html#all_$1"
}
diff --git a/plugins/npm/npm.plugin.zsh b/plugins/npm/npm.plugin.zsh
index 68ec5fabd..38e699ea0 100644
--- a/plugins/npm/npm.plugin.zsh
+++ b/plugins/npm/npm.plugin.zsh
@@ -1,8 +1,9 @@
eval "$(npm completion 2>/dev/null)"
+# Install dependencies globally
+alias npmg="npm i -g "
# npm package names are lowercase
-# - https://twitter.com/substack/status/23122603153150361
# Thus, we've used camelCase for the following aliases:
# Install and save to dependencies in your package.json
@@ -12,3 +13,10 @@ alias npmS="npm i -S "
# Install and save to dev-dependencies in your package.json
# npmd is used by https://github.com/dominictarr/npmd
alias npmD="npm i -D "
+
+# Execute command from node_modules folder based on current directory
+# i.e npmE gulp
+alias npmE='PATH="$(npm bin)":"$PATH"'
+
+# Check which npm modules are outdated
+alias npmO="npm outdated"
diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh
index d0f9f009a..a1516dcce 100644
--- a/plugins/osx/osx.plugin.zsh
+++ b/plugins/osx/osx.plugin.zsh
@@ -5,29 +5,35 @@
# VERSION: 1.1.0
# ------------------------------------------------------------------------------
-function tab() {
- local command="cd \\\"$PWD\\\"; clear; "
- (( $# > 0 )) && command="${command}; $*"
-
- the_app=$(
+function _omz_osx_get_frontmost_app() {
+ local the_app=$(
osascript 2>/dev/null <<EOF
tell application "System Events"
name of first item of (every process whose frontmost is true)
end tell
EOF
)
+ echo "$the_app"
+}
- [[ "$the_app" == 'Terminal' ]] && {
- osascript 2>/dev/null <<EOF
+function tab() {
+ # Must not have trailing semicolon, for iTerm compatibility
+ local command="cd \\\"$PWD\\\"; clear"
+ (( $# > 0 )) && command="${command}; $*"
+
+ local the_app=$(_omz_osx_get_frontmost_app)
+
+ if [[ "$the_app" == 'Terminal' ]]; then
+ # Discarding stdout to quash "tab N of window id XXX" output
+ osascript >/dev/null <<EOF
tell application "System Events"
tell process "Terminal" to keystroke "t" using command down
- tell application "Terminal" to do script "${command}" in front window
end tell
+ tell application "Terminal" to do script "${command}" in front window
EOF
- }
- [[ "$the_app" == 'iTerm' ]] && {
- osascript 2>/dev/null <<EOF
+ elif [[ "$the_app" == 'iTerm' ]]; then
+ osascript <<EOF
tell application "iTerm"
set current_terminal to current terminal
tell current_terminal
@@ -35,29 +41,27 @@ EOF
set current_session to current session
tell current_session
write text "${command}"
- keystroke return
end tell
end tell
end tell
EOF
- }
+
+ else
+ echo "tab: unsupported terminal app: $the_app"
+ false
+
+ fi
}
function vsplit_tab() {
- local command="cd \\\"$PWD\\\""
+ local command="cd \\\"$PWD\\\"; clear"
(( $# > 0 )) && command="${command}; $*"
- the_app=$(
- osascript 2>/dev/null <<EOF
- tell application "System Events"
- name of first item of (every process whose frontmost is true)
- end tell
-EOF
- )
+ local the_app=$(_omz_osx_get_frontmost_app)
- [[ "$the_app" == 'iTerm' ]] && {
- osascript 2>/dev/null <<EOF
- tell application "iTerm" to activate
+ if [[ "$the_app" == 'iTerm' ]]; then
+ osascript <<EOF
+ -- tell application "iTerm" to activate
tell application "System Events"
tell process "iTerm"
@@ -65,26 +69,24 @@ EOF
click
end tell
end tell
- keystroke "${command}; clear;"
- keystroke return
+ keystroke "${command} \n"
end tell
EOF
- }
+
+ else
+ echo "$0: unsupported terminal app: $the_app" >&2
+ false
+
+ fi
}
function split_tab() {
- local command="cd \\\"$PWD\\\""
+ local command="cd \\\"$PWD\\\"; clear"
(( $# > 0 )) && command="${command}; $*"
- the_app=$(
- osascript 2>/dev/null <<EOF
- tell application "System Events"
- name of first item of (every process whose frontmost is true)
- end tell
-EOF
- )
+ local the_app=$(_omz_osx_get_frontmost_app)
- [[ "$the_app" == 'iTerm' ]] && {
+ if [[ "$the_app" == 'iTerm' ]]; then
osascript 2>/dev/null <<EOF
tell application "iTerm" to activate
@@ -94,11 +96,15 @@ EOF
click
end tell
end tell
- keystroke "${command}; clear;"
- keystroke return
+ keystroke "${command} \n"
end tell
EOF
- }
+
+ else
+ echo "$0: unsupported terminal app: $the_app" >&2
+ false
+
+ fi
}
function pfd() {
@@ -138,23 +144,6 @@ function man-preview() {
man -t "$@" | open -f -a Preview
}
-function trash() {
- local trash_dir="${HOME}/.Trash"
- local temp_ifs="$IFS"
- IFS=$'\n'
- for item in "$@"; do
- if [[ -e "$item" ]]; then
- item_name="$(basename $item)"
- if [[ -e "${trash_dir}/${item_name}" ]]; then
- mv -f "$item" "${trash_dir}/${item_name} $(date "+%H-%M-%S")"
- else
- mv -f "$item" "${trash_dir}/"
- fi
- fi
- done
- IFS=$temp_ifs
-}
-
function vncviewer() {
open vnc://$@
}
@@ -178,6 +167,17 @@ function itunes() {
vol)
opt="set sound volume to $1" #$1 Due to the shift
;;
+ playing|status)
+ local state=`osascript -e 'tell application "iTunes" to player state as string'`
+ if [[ "$state" = "playing" ]]; then
+ currenttrack=`osascript -e 'tell application "iTunes" to name of current track as string'`
+ currentartist=`osascript -e 'tell application "iTunes" to artist of current track as string'`
+ echo -E "Listening to $fg[yellow]$currenttrack$reset_color by $fg[yellow]$currentartist$reset_color";
+ else
+ echo "iTunes is" $state;
+ fi
+ return 0
+ ;;
shuf|shuff|shuffle)
# The shuffle property of current playlist can't be changed in iTunes 12,
# so this workaround uses AppleScript to simulate user input instead.
@@ -216,6 +216,7 @@ EOF
echo "\tnext|previous\tplay next or previous track"
echo "\tshuf|shuffle [on|off|toggle]\tSet shuffled playback. Default: toggle. Note: toggle doesn't support the MiniPlayer."
echo "\tvol\tSet the volume, takes an argument from 0 to 100"
+ echo "\tplaying|status\tShow what song is currently playing in iTunes."
echo "\thelp\tshow this message and exit"
return 0
;;
diff --git a/plugins/paver/paver.plugin.zsh b/plugins/paver/paver.plugin.zsh
new file mode 100644
index 000000000..40bdbd12f
--- /dev/null
+++ b/plugins/paver/paver.plugin.zsh
@@ -0,0 +1,16 @@
+_paver_does_target_list_need_generating () {
+ [ ! -f .paver_targets ] && return 0;
+ [ pavement.py -nt .paver_targets ] && return 0;
+ return 1;
+}
+
+_paver () {
+ if [ -f pavement.py ]; then
+ if _paver_does_target_list_need_generating; then
+ paver --help 2>&1 |grep '-'|grep -v -e '--'|awk -F '-' '{print $1}'|tr -d ' ' > .paver_targets
+ fi
+ compadd `cat .paver_targets`
+ fi
+}
+
+compdef _paver paver
diff --git a/plugins/pod/_pod b/plugins/pod/_pod
index 8c0f4460f..508a47102 100644
--- a/plugins/pod/_pod
+++ b/plugins/pod/_pod
@@ -1,389 +1,682 @@
#compdef pod
#autoload
+# setopt XTRACE VERBOSE
+# vim: ft=zsh sw=2 ts=2 et
+
# -----------------------------------------------------------------------------
# FILE: _pod
-# DESCRIPTION: Cocoapods (0.27.1) autocomplete plugin for Oh-My-Zsh
+# DESCRIPTION: Cocoapods (0.33.1) autocomplete plugin for Oh-My-Zsh
# http://cocoapods.org
+# Generated with `pod --completion-script
# AUTHOR: Alexandre Joly (alexandre.joly@mekanics.ch)
# GITHUB: https://github.com/mekanics
# TWITTER: @jolyAlexandre
-# VERSION: 0.0.3
-# LICENSE: MIT
+# VERSION: 0.0.5
# -----------------------------------------------------------------------------
-local -a _1st_arguments
-_1st_arguments=(
- 'help:Show help for the given command'
- 'init:Generate a Podfile for the current directory'
- 'install:Install project dependencies'
- 'ipc:Inter-process communication'
- 'list:List pods'
- 'outdated:Show outdated project dependencies'
- 'podfile-info:Shows information on installed Pods'
- 'push:Push new specifications to a spec-repo'
- 'repo:Manage spec-repositories'
- 'search:Searches for pods'
- 'setup:Setup the CocoaPods environment'
- 'spec:Manage pod specs'
- 'update:Update outdated project dependencies'
-)
-
-local -a _repo_arguments
-_repo_arguments=(
- 'add:Add a spec repo'
- 'lint:Validates all specs in a repo'
- 'remove:Remove a spec repo.'
- 'update:Update a spec repo'
-)
-
-local -a _spec_arguments
-_spec_arguments=(
- 'cat:Prints a spec file'
- 'create:Create spec file stub'
- 'edit:Edit a spec file'
- 'lint:Validates a spec file'
- 'which:Prints the path of the given spec'
-)
-
-local -a _ipc_arguments
-_ipc_arguments=(
- 'list:Lists the specifications know to CocoaPods'
- 'podfile:Converts a Podfile to YAML'
- 'repl:The repl listens to commands on standard input'
- 'spec:Converts a podspec to YAML'
- 'update-search-index:Updates the search index'
-)
-
-local -a _list_arguments
-_list_arguments=(
- 'new:Lists pods introduced in the master spec-repo since the last check'
-)
-
-local -a _inherited_options
-_inherited_options=(
- '(--silent)--silent[Show nothing]' \
- '(--version)--version[Show the version of CocoaPods]' \
- '(--no-color)--no-color[Show output without color]' \
- '(--verbose)--verbose[Show more debugging information]' \
- '(--help)--help[Show help banner of specified command]'
-)
-
-local -a _install_options
-_install_options=(
- '(--no-clean)--no-clean[Leave SCM dirs like `.git` and `.svn` intact after downloading]' \
- '(--no-integrate)--no-integrate[Skip integration of the Pods libraries in the Xcode project(s)]' \
- '(--no-repo-update)--no-repo-update[Skip running `pod repo update` before install]'
-)
-
-local -a _update_options
-_update_options=(
- '(--no-clean)--no-clean[Leave SCM dirs like `.git` and `.svn intact after downloading]' \
- '(--no-integrate)--no-integrate[Skip integration of the Pods libraries in the Xcode project(s)]' \
- '(--no-repo-update)--no-repo-update[Skip running `pod repo update before install]'
-)
-
-local -a _outdated_options
-_outdated_options=(
- '(--no-repo-update)--no-repo-update[Skip running `pod repo update` before install]'
-)
-
-local -a _search_options
-_search_options=(
- '(--full)--full[Search by name, summary, and description]' \
- '(--stats)--stats[Show additional stats (like GitHub watchers and forks)]' \
- '(--ios)--ios[Restricts the search to Pods supported on iOS]' \
- '(--osx)--osx[Restricts the search to Pods supported on OS X]'
-)
-
-local -a _list_options
-_list_options=(
- '(--update)--update[Run `pod repo update` before listing]'
-)
-
-local -a _podfile_info_options
-_podfile_info_options=(
- '(--all)--all[Show information about all Pods with dependencies that are used in a project]' \
- '(--md)--md[Output information in Markdown format]' \
- '*:script or directory:_files'
-)
-
-local -a _push_options
-_push_options=(
- '(--allow-warnings)--allow-warnings[Allows pushing even if there are warnings]' \
- '(--local-only)--local-only[Does not perform the step of pushing REPO to its remote]' \
- '*:script or directory:_files'
-)
-
-local -a _repo_lint_options
-_repo_lint_options=(
- '(--only-errors)--only-errors[Lint presents only the errors]'
-)
-
-local -a _setup_options
-_setup_options=(
- '(--push)--push[Use this option to enable push access once granted]'
-)
-
-local -a _spec_lint_options
-_spec_lint_options=(
- '(--quick)--quick[Lint skips checks that would require to download and build the spec]' \
- '(--only-errors)--only-errors[Lint validates even if warnings are present]' \
- '(--no-clean)--no-clean[Lint leaves the build directory intact for inspection]' \
- '*:script or directory:_files'
-)
-
-local -a _spec_cat_options
-_spec_cat_options=(
- '(--show-all)--show-all[Pick from all versions of the given podspec]'
-)
-
-local -a _spec_which_options
-_spec_which_options=(
- '(--show-all)--show-all[Print all versions of the given podspec]'
-)
-
-local -a _spec_edit_options
-_spec_edit_options=(
- '(--show-all)--show-all[Pick which spec to edit from all available versions of the given podspec]'
-)
-
-
-__first_command_list ()
-{
- local expl
- declare -a tasks
-
- tasks=(install ipc list outdated podfile-info push repo search setup spec update)
-
- _wanted tasks expl 'help' compadd $tasks
-}
-
-__repo_list() {
- _wanted application expl 'repo' compadd $(command ls -1 ~/.cocoapods/repos 2>/dev/null | sed -e 's/ /\\ /g')
-}
-
-__pod-repo() {
- local curcontext="$curcontext" state line
- typeset -A opt_args
-
- _arguments -C \
- ':command:->command' \
- '*::options:->options'
-
- case $state in
- (command)
- _describe -t commands "pod repo" _repo_arguments
- return
- ;;
-
- (options)
- case $line[1] in
- (lint)
- _arguments \
- $_inherited_options \
- $_repo_lint_options \
- ':feature:__repo_list'
- ;;
-
- (update)
- _arguments \
- $_inherited_options \
- ':feature:__repo_list'
- ;;
-
- (add)
- _arguments \
- $_inherited_options
-
- (remove)
- _arguments \
- $_inherited_options \
- ':feature:__repo_list'
- ;;
- esac
- ;;
+local -a _subcommands
+local -a _options
+
+case "$words[2]" in
+ help)
+ case "$words[3]" in
+ *) # pod help
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod help options" _options
+ ;;
esac
-}
-
-__pod-spec() {
- local curcontext="$curcontext" state line
- typeset -A opt_args
-
- _arguments -C \
- ':command:->command' \
- '*::options:->options'
-
- case $state in
- (command)
- _describe -t commands "pod spec" _spec_arguments
- return
- ;;
-
- (options)
- case $line[1] in
- (create)
- _arguments \
- $_inherited_options
- ;;
-
- (lint)
- _arguments \
- $_inherited_options \
- $_spec_lint_options
- ;;
-
- (cat)
- _arguments \
- $_inherited_options \
- $_spec_cat_options
- ;;
-
- (which)
- _arguments \
- $_inherited_options \
- $_spec_which_options
- ;;
-
- (edit)
- _arguments \
- $_inherited_options \
- $_spec_edit_options
- ;;
- esac
- return
- ;;
+ ;;
+ ipc)
+ case "$words[3]" in
+ list)
+ case "$words[4]" in
+ *) # pod ipc list
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod ipc list options" _options
+ ;;
+ esac
+ ;;
+ podfile)
+ case "$words[4]" in
+ *) # pod ipc podfile
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod ipc podfile options" _options
+ ;;
+ esac
+ ;;
+ repl)
+ case "$words[4]" in
+ *) # pod ipc repl
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod ipc repl options" _options
+ ;;
+ esac
+ ;;
+ spec)
+ case "$words[4]" in
+ *) # pod ipc spec
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod ipc spec options" _options
+ ;;
+ esac
+ ;;
+ update-search-index)
+ case "$words[4]" in
+ *) # pod ipc update-search-index
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod ipc update-search-index options" _options
+ ;;
+ esac
+ ;;
+ *) # pod ipc
+ _subcommands=(
+ "list:Lists the specifications known to CocoaPods."
+ "podfile:Converts a Podfile to YAML."
+ "repl:The repl listens to commands on standard input."
+ "spec:Converts a podspec to JSON."
+ "update-search-index:Updates the search index."
+ )
+ _describe -t commands "pod ipc subcommands" _subcommands
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod ipc options" _options
+ ;;
esac
-}
-
-__pod-ipc() {
- local curcontext="$curcontext" state line
- typeset -A opt_args
-
- _arguments -C \
- ':command:->command' \
- '*::options:->options'
-
- case $state in
- (command)
- _describe -t commands "pod ipc" _ipc_arguments
- return
- ;;
-
- (options)
- _arguments -C \
- $_inherited_options
- return
- ;;
+ ;;
+ init)
+ case "$words[3]" in
+ *) # pod init
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod init options" _options
+ ;;
esac
-}
-
-__pod-list() {
- local curcontext="$curcontext" state line
- typeset -A opt_args
-
- _arguments -C \
- $_inherited_options \
- $_list_options \
- ':command:->command' \
- '*::options:->options'
-
- case $state in
- (command)
- _describe -t commands "pod list" _list_arguments
- return
- ;;
-
- (options)
- _arguments -C \
- $_inherited_options \
- $_list_options
- return
- ;;
+ ;;
+ install)
+ case "$words[3]" in
+ *) # pod install
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--no-clean:Leave SCM dirs like \`.git\` and \`.svn\` intact after downloading"
+ "--no-integrate:Skip integration of the Pods libraries in the Xcode project(s)"
+ "--no-repo-update:Skip running \`pod repo update\` before install"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod install options" _options
+ ;;
esac
-}
-
-local curcontext="$curcontext" state line
-typeset -A opt_args
-
-_arguments -C \
- $_inherited_options \
- ':command:->command' \
- '*::options:->options'
-
-case $state in
- (command)
- _describe -t commands "pod" _1st_arguments
- return
;;
-
- (options)
- case $line[1] in
- (help)
- _arguments \
- $_inherited_options \
- ':help:__first_command_list'
- ;;
-
- (push)
- _arguments \
- $_inherited_options \
- $_push_options \
- ':repo:__repo_list'
- ;;
-
- (repo)
- __pod-repo
- ;;
-
- (spec)
- __pod-spec
- ;;
-
- (ipc)
- __pod-ipc
- ;;
-
- (list)
- __pod-list
- ;;
-
- (install)
- _arguments \
- $_inherited_options \
- $_install_options
- ;;
-
- (update)
- _arguments \
- $_inherited_options \
- $_update_options
- ;;
-
- (outdated)
- _arguments \
- $_inherited_options \
- $_outdated_options
- ;;
-
- (search)
- _arguments \
- $_inherited_options \
- $_search_options
- ;;
-
- (podfile-info)
- _arguments \
- $_inherited_options \
- $_podfile_info_options
- ;;
-
- (setup)
- _arguments \
- $_inherited_options \
- $_setup_options
- ;;
-
+ lib)
+ case "$words[3]" in
+ create)
+ case "$words[4]" in
+ *) # pod lib create
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod lib create options" _options
+ ;;
+ esac
+ ;;
+ lint)
+ case "$words[4]" in
+ *) # pod lib lint
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--no-clean:Lint leaves the build directory intact for inspection"
+ "--no-subspecs:Lint skips validation of subspecs"
+ "--only-errors:Lint validates even if warnings are present"
+ "--quick:Lint skips checks that would require to download and build the spec"
+ "--silent:Show nothing"
+ "--subspec=NAME:Lint validates only the given subspec"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod lib lint options" _options
+ ;;
+ esac
+ ;;
+ *) # pod lib
+ _subcommands=(
+ "create:Creates a new Pod"
+ "lint:Validates a Pod"
+ )
+ _describe -t commands "pod lib subcommands" _subcommands
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod lib options" _options
+ ;;
+ esac
+ ;;
+ list)
+ case "$words[3]" in
+ new)
+ case "$words[4]" in
+ *) # pod list new
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--update:Run \`pod repo update\` before listing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod list new options" _options
+ ;;
+ esac
+ ;;
+ *) # pod list
+ _subcommands=(
+ "new:Lists pods introduced in the master spec-repo since the last check"
+ )
+ _describe -t commands "pod list subcommands" _subcommands
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--update:Run \`pod repo update\` before listing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod list options" _options
+ ;;
+ esac
+ ;;
+ outdated)
+ case "$words[3]" in
+ *) # pod outdated
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--no-repo-update:Skip running \`pod repo update\` before install"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod outdated options" _options
+ ;;
+ esac
+ ;;
+ plugins)
+ case "$words[3]" in
+ create)
+ case "$words[4]" in
+ *) # pod plugins create
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod plugins create options" _options
+ ;;
+ esac
+ ;;
+ list)
+ case "$words[4]" in
+ *) # pod plugins list
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod plugins list options" _options
+ ;;
+ esac
+ ;;
+ search)
+ case "$words[4]" in
+ *) # pod plugins search
+ _options=(
+ "--full:Search by name, author, and description"
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod plugins search options" _options
+ ;;
+ esac
+ ;;
+ *) # pod plugins
+ _subcommands=(
+ "create:Creates a new plugin"
+ "list:List all known plugins"
+ "search:Search for known plugins"
+ )
+ _describe -t commands "pod plugins subcommands" _subcommands
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod plugins options" _options
+ ;;
+ esac
+ ;;
+ push)
+ case "$words[3]" in
+ *) # pod push
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod push options" _options
+ ;;
+ esac
+ ;;
+ repo)
+ case "$words[3]" in
+ add)
+ case "$words[4]" in
+ *) # pod repo add
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--shallow:Create a shallow clone (fast clone, but no push capabilities)"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod repo add options" _options
+ ;;
+ esac
+ ;;
+ lint)
+ case "$words[4]" in
+ *) # pod repo lint
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--only-errors:Lint presents only the errors"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod repo lint options" _options
+ ;;
+ esac
+ ;;
+ push)
+ case "$words[4]" in
+ *) # pod repo push
+ _options=(
+ "--allow-warnings:Allows pushing even if there are warnings"
+ "--help:Show help banner of specified command"
+ "--local-only:Does not perform the step of pushing REPO to its remote"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod repo push options" _options
+ ;;
+ esac
+ ;;
+ remove)
+ case "$words[4]" in
+ *) # pod repo remove
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod repo remove options" _options
+ ;;
+ esac
+ ;;
+ update)
+ case "$words[4]" in
+ *) # pod repo update
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod repo update options" _options
+ ;;
+ esac
+ ;;
+ *) # pod repo
+ _subcommands=(
+ "add:Add a spec repo."
+ "lint:Validates all specs in a repo."
+ "push:Push new specifications to a spec-repo"
+ "remove:Remove a spec repo"
+ "update:Update a spec repo."
+ )
+ _describe -t commands "pod repo subcommands" _subcommands
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod repo options" _options
+ ;;
esac
;;
+ search)
+ case "$words[3]" in
+ *) # pod search
+ _options=(
+ "--full:Search by name, summary, and description"
+ "--help:Show help banner of specified command"
+ "--ios:Restricts the search to Pods supported on iOS"
+ "--no-ansi:Show output without ANSI codes"
+ "--osx:Restricts the search to Pods supported on OS X"
+ "--stats:Show additional stats (like GitHub watchers and forks)"
+ "--verbose:Show more debugging information"
+ "--web:Searches on cocoapods.org"
+ )
+ _describe -t options "pod search options" _options
+ ;;
+ esac
+ ;;
+ setup)
+ case "$words[3]" in
+ *) # pod setup
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--no-shallow:Clone full history so push will work"
+ "--push:Use this option to enable push access once granted"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod setup options" _options
+ ;;
+ esac
+ ;;
+ spec)
+ case "$words[3]" in
+ cat)
+ case "$words[4]" in
+ *) # pod spec cat
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--show-all:Pick from all versions of the given podspec"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod spec cat options" _options
+ ;;
+ esac
+ ;;
+ create)
+ case "$words[4]" in
+ *) # pod spec create
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod spec create options" _options
+ ;;
+ esac
+ ;;
+ edit)
+ case "$words[4]" in
+ *) # pod spec edit
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--show-all:Pick which spec to edit from all available versions of the given podspec"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod spec edit options" _options
+ ;;
+ esac
+ ;;
+ lint)
+ case "$words[4]" in
+ *) # pod spec lint
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--no-clean:Lint leaves the build directory intact for inspection"
+ "--no-subspecs:Lint skips validation of subspecs"
+ "--only-errors:Lint validates even if warnings are present"
+ "--quick:Lint skips checks that would require to download and build the spec"
+ "--silent:Show nothing"
+ "--subspec=NAME:Lint validates only the given subspec"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod spec lint options" _options
+ ;;
+ esac
+ ;;
+ which)
+ case "$words[4]" in
+ *) # pod spec which
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--show-all:Print all versions of the given podspec"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod spec which options" _options
+ ;;
+ esac
+ ;;
+ *) # pod spec
+ _subcommands=(
+ "cat:Prints a spec file."
+ "create:Create spec file stub."
+ "edit:Edit a spec file."
+ "lint:Validates a spec file."
+ "which:Prints the path of the given spec."
+ )
+ _describe -t commands "pod spec subcommands" _subcommands
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod spec options" _options
+ ;;
+ esac
+ ;;
+ trunk)
+ case "$words[3]" in
+ add-owner)
+ case "$words[4]" in
+ *) # pod trunk add-owner
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod trunk add-owner options" _options
+ ;;
+ esac
+ ;;
+ me)
+ case "$words[4]" in
+ clean-sessions)
+ case "$words[5]" in
+ *) # pod trunk me clean-sessions
+ _options=(
+ "--all:Removes all your sessions, except for the current one"
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod trunk me clean-sessions options" _options
+ ;;
+ esac
+ ;;
+ *) # pod trunk me
+ _subcommands=(
+ "clean-sessions:Remove sessions"
+ )
+ _describe -t commands "pod trunk me subcommands" _subcommands
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod trunk me options" _options
+ ;;
+ esac
+ ;;
+ push)
+ case "$words[4]" in
+ *) # pod trunk push
+ _options=(
+ "--allow-warnings:Allows push even if there are lint warnings"
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod trunk push options" _options
+ ;;
+ esac
+ ;;
+ register)
+ case "$words[4]" in
+ *) # pod trunk register
+ _options=(
+ "--description=DESCRIPTION:An arbitrary description to easily identify your session later on."
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod trunk register options" _options
+ ;;
+ esac
+ ;;
+ *) # pod trunk
+ _subcommands=(
+ "add-owner:Add an owner to a pod"
+ "me:Display information about your sessions"
+ "push:Publish a podspec"
+ "register:Manage sessions"
+ )
+ _describe -t commands "pod trunk subcommands" _subcommands
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod trunk options" _options
+ ;;
+ esac
+ ;;
+ try)
+ case "$words[3]" in
+ *) # pod try
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod try options" _options
+ ;;
+ esac
+ ;;
+ update)
+ case "$words[3]" in
+ *) # pod update
+ _options=(
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--no-clean:Leave SCM dirs like \`.git\` and \`.svn\` intact after downloading"
+ "--no-integrate:Skip integration of the Pods libraries in the Xcode project(s)"
+ "--no-repo-update:Skip running \`pod repo update\` before install"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ )
+ _describe -t options "pod update options" _options
+ ;;
+ esac
+ ;;
+ *) # pod
+ _subcommands=(
+ "help:Show help for the given command."
+ "ipc:Inter-process communication"
+ "init:Generate a Podfile for the current directory."
+ "install:Install project dependencies"
+ "lib:Develop pods"
+ "list:List pods"
+ "outdated:Show outdated project dependencies"
+ "plugins:Show available CocoaPods plugins"
+ "push:Temporary alias for the \`pod repo push\` command"
+ "repo:Manage spec-repositories"
+ "search:Searches for pods"
+ "setup:Setup the CocoaPods environment"
+ "spec:Manage pod specs"
+ "trunk:Interact with the CocoaPods API (e.g. publishing new specs)"
+ "try:Try a Pod!"
+ "update:Update outdated project dependencies"
+ )
+ _describe -t commands "pod subcommands" _subcommands
+ _options=(
+ "--completion-script:Print the auto-completion script"
+ "--help:Show help banner of specified command"
+ "--no-ansi:Show output without ANSI codes"
+ "--silent:Show nothing"
+ "--verbose:Show more debugging information"
+ "--version:Show the version of the tool"
+ )
+ _describe -t options "pod options" _options
+ ;;
esac
diff --git a/plugins/pyenv/pyenv.plugin.zsh b/plugins/pyenv/pyenv.plugin.zsh
index b3dc7aa17..aa1f9488a 100644
--- a/plugins/pyenv/pyenv.plugin.zsh
+++ b/plugins/pyenv/pyenv.plugin.zsh
@@ -17,7 +17,11 @@ for pyenvdir in "${pyenvdirs[@]}" ; do
FOUND_PYENV=1
export PYENV_ROOT=$pyenvdir
export PATH=${pyenvdir}/bin:$PATH
- eval "$(pyenv init --no-rehash - zsh)"
+ eval "$(pyenv init - zsh)"
+
+ if pyenv commands | command grep -q virtualenv-init; then
+ eval "$(pyenv virtualenv-init - zsh)"
+ fi
function pyenv_prompt_info() {
echo "$(pyenv version-name)"
diff --git a/plugins/pylint/pylint.plugin.zsh b/plugins/pylint/pylint.plugin.zsh
index 6760c67b0..57c7c0ac5 100644
--- a/plugins/pylint/pylint.plugin.zsh
+++ b/plugins/pylint/pylint.plugin.zsh
@@ -1,3 +1,3 @@
# Aliases
-alias pylint-quick='pylint --reports=n --include-ids=y'
-compdef _pylint-quick pylint-quick='pylint --reports=n --include-ids=y' \ No newline at end of file
+alias pylint-quick='pylint --reports=n'
+compdef _pylint-quick pylint-quick='pylint --reports=n'
diff --git a/plugins/rails/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh
index 5ed96f8cd..8af1d6301 100644
--- a/plugins/rails/rails.plugin.zsh
+++ b/plugins/rails/rails.plugin.zsh
@@ -42,6 +42,7 @@ alias rp='rails plugin'
alias ru='rails runner'
alias rs='rails server'
alias rsd='rails server --debugger'
+alias rsp='rails server --port'
# Rake aliases
alias rdm='rake db:migrate'
@@ -50,16 +51,20 @@ alias rdr='rake db:rollback'
alias rdc='rake db:create'
alias rds='rake db:seed'
alias rdd='rake db:drop'
+alias rdrs='rake db:reset'
alias rdtc='rake db:test:clone'
alias rdtp='rake db:test:prepare'
alias rdmtc='rake db:migrate db:test:clone'
-
alias rlc='rake log:clear'
alias rn='rake notes'
alias rr='rake routes'
+alias rrg='rake routes | grep'
+alias rt='rake test'
+alias rmd='rake middleware'
+alias rsts='rake stats'
# legacy stuff
-alias ss='thin --stats "/thin/stats" start'
+alias sstat='thin --stats "/thin/stats" start'
alias sg='ruby script/generate'
alias sd='ruby script/destroy'
alias sp='ruby script/plugin'
diff --git a/plugins/rails3/rails3.plugin.zsh b/plugins/rails3/rails3.plugin.zsh
deleted file mode 100644
index 261b92108..000000000
--- a/plugins/rails3/rails3.plugin.zsh
+++ /dev/null
@@ -1,4 +0,0 @@
-echo "It looks like you have been using the 'rails3' plugin,"
-echo "which has been deprecated in favor of a newly consolidated 'rails' plugin."
-echo "You will want to modify your ~/.zshrc configuration to begin using it."
-echo "Learn more at https://github.com/robbyrussell/oh-my-zsh/pull/2240"
diff --git a/plugins/rails4/rails4.plugin.zsh b/plugins/rails4/rails4.plugin.zsh
deleted file mode 100644
index 5452c242c..000000000
--- a/plugins/rails4/rails4.plugin.zsh
+++ /dev/null
@@ -1,4 +0,0 @@
-echo "It looks like you have been using the 'rails4' plugin,"
-echo "which has been deprecated in favor of a newly consolidated 'rails' plugin."
-echo "You will want to modify your ~/.zshrc configuration to begin using it."
-echo "Learn more at https://github.com/robbyrussell/oh-my-zsh/pull/2240"
diff --git a/plugins/rake-fast/rake-fast.plugin.zsh b/plugins/rake-fast/rake-fast.plugin.zsh
index cfc9a079f..d305eb1f0 100644
--- a/plugins/rake-fast/rake-fast.plugin.zsh
+++ b/plugins/rake-fast/rake-fast.plugin.zsh
@@ -8,17 +8,7 @@ _rake_refresh () {
}
_rake_does_task_list_need_generating () {
- if [ ! -f .rake_tasks ]; then return 0;
- else
- if [[ "$OSTYPE" = darwin* ]]; then
- accurate=$(stat -f%m .rake_tasks)
- changed=$(stat -f%m Rakefile)
- else
- accurate=$(stat -c%Y .rake_tasks)
- changed=$(stat -c%Y Rakefile)
- fi
- return $(expr $accurate '>=' $changed)
- fi
+ [[ ! -f .rake_tasks ]] || [[ Rakefile -nt .rake_tasks ]]
}
_rake_generate () {
diff --git a/plugins/rand-quote/rand-quote.plugin.zsh b/plugins/rand-quote/rand-quote.plugin.zsh
index c3bf6234e..8f345d9aa 100644
--- a/plugins/rand-quote/rand-quote.plugin.zsh
+++ b/plugins/rand-quote/rand-quote.plugin.zsh
@@ -18,8 +18,6 @@ if [[ -x `which curl` ]]; then
W=$(echo "$Q" | sed -e 's/.*\/quotes\///g' -e 's/<.*//g' -e 's/.*">//g')
if [ "$W" -a "$TXT" ]; then
echo "${WHO_COLOR}${W}${COLON_COLOR}: ${TEXT_COLOR}“${TXT}â€${END_COLOR}"
- else
- quote
fi
}
#quote
diff --git a/plugins/rbenv/rbenv.plugin.zsh b/plugins/rbenv/rbenv.plugin.zsh
index 213e1beb0..ef5106f2d 100644
--- a/plugins/rbenv/rbenv.plugin.zsh
+++ b/plugins/rbenv/rbenv.plugin.zsh
@@ -2,14 +2,11 @@ _homebrew-installed() {
type brew &> /dev/null
}
-_rbenv-from-homebrew-installed() {
- brew --prefix rbenv &> /dev/null
-}
-
FOUND_RBENV=0
rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv" "/usr/local/opt/rbenv")
-if _homebrew-installed && _rbenv-from-homebrew-installed ; then
- rbenvdirs=($(brew --prefix rbenv) "${rbenvdirs[@]}")
+if _homebrew-installed && rbenv_homebrew_path=$(brew --prefix rbenv 2>/dev/null); then
+ rbenvdirs=($rbenv_homebrew_path "${rbenvdirs[@]}")
+ unset rbenv_homebrew_path
fi
for rbenvdir in "${rbenvdirs[@]}" ; do
diff --git a/plugins/rvm/rvm.plugin.zsh b/plugins/rvm/rvm.plugin.zsh
index 234ac1642..53e809aaf 100644
--- a/plugins/rvm/rvm.plugin.zsh
+++ b/plugins/rvm/rvm.plugin.zsh
@@ -61,11 +61,11 @@ function gems {
local current_ruby=`rvm-prompt i v p`
local current_gemset=`rvm-prompt g`
- gem list $@ | sed \
- -Ee "s/\([0-9, \.]+( .+)?\)/$fg[blue]&$reset_color/g" \
- -Ee "s|$(echo $rvm_path)|$fg[magenta]\$rvm_path$reset_color|g" \
- -Ee "s/$current_ruby@global/$fg[yellow]&$reset_color/g" \
- -Ee "s/$current_ruby$current_gemset$/$fg[green]&$reset_color/g"
+ gem list $@ | sed -E \
+ -e "s/\([0-9, \.]+( .+)?\)/$fg[blue]&$reset_color/g" \
+ -e "s|$(echo $rvm_path)|$fg[magenta]\$rvm_path$reset_color|g" \
+ -e "s/$current_ruby@global/$fg[yellow]&$reset_color/g" \
+ -e "s/$current_ruby$current_gemset$/$fg[green]&$reset_color/g"
}
function _rvm_completion {
diff --git a/plugins/scw/README.md b/plugins/scw/README.md
new file mode 100644
index 000000000..d2312c2e5
--- /dev/null
+++ b/plugins/scw/README.md
@@ -0,0 +1,7 @@
+## Scaleway CLI autocomplete plugin
+
+[scw](https://github.com/scaleway/scaleway-cli): Manage Bare Metal servers from Command Line (as easily as with Docker)
+
+- Adds autocomplete options for all `scw` commands.
+
+Maintainer : Manfred Touron ([@moul](https://github.com/moul))
diff --git a/plugins/scw/_scw b/plugins/scw/_scw
new file mode 100644
index 000000000..f9fdf916e
--- /dev/null
+++ b/plugins/scw/_scw
@@ -0,0 +1,333 @@
+#compdef scw
+#
+# zsh completion for scw (http://scaleway.com)
+#
+# Inspired by https://github.com/felixr/docker-zsh-completion
+
+__scw_get_servers() {
+ local expl
+ declare -a servers
+ servers=(${(f)"$(_call_program commands scw _completion servers-names)"})
+ _describe -t servers "servers" servers
+}
+
+__scw_stoppedservers() {
+ __scw_get_servers
+}
+
+__scw_runningservers() {
+ __scw_get_servers
+}
+
+__scw_servers () {
+ __scw_get_servers
+}
+
+__scw_images () {
+ local expl
+ declare -a images
+ images=(${(f)"$(_call_program commands scw _completion images-names)"})
+ _describe -t images "images" images
+}
+
+__scw_images_and_snapshots () {
+ __scw_images
+ __scw_snapshots
+}
+
+__scw_snapshots () {
+ local expl
+ declare -a snapshots
+ snapshots=(${(f)"$(_call_program commands scw _completion --prefix snapshots-names)"})
+ _describe -t snapshots "snapshots" snapshots
+}
+
+__scw_bootscripts () {
+ local expl
+ declare -a bootscripts
+ bootscripts=(${(f)"$(_call_program commands scw _completion bootscripts-names)"})
+ _describe -t bootscripts "bootscripts" bootscripts
+}
+
+__scw_tags() {
+ __scw_images
+}
+
+__scw_repositories_with_tags() {
+ __scw_images
+}
+
+__scw_search() {
+ # declare -a scwsearch
+ local cache_policy
+ zstyle -s ":completion:${curcontext}:" cache-policy cache_policy
+ if [[ -z "$cache_policy" ]]; then
+ zstyle ":completion:${curcontext}:" cache-policy __scw_caching_policy
+ fi
+
+ local searchterm cachename
+ searchterm="${words[$CURRENT]%/}"
+ cachename=_scw-search-$searchterm
+
+ local expl
+ local -a result
+ if ( [[ ${(P)+cachename} -eq 0 ]] || _cache_invalid ${cachename#_} ) \
+ && ! _retrieve_cache ${cachename#_}; then
+ _message "Searching for ${searchterm}..."
+ result=(${${${(f)"$(_call_program commands scw search ${searchterm})"}%% *}[2,-1]})
+ _store_cache ${cachename#_} result
+ fi
+ _wanted scwsearch expl 'available images' compadd -a result
+}
+
+__scw_caching_policy()
+{
+ oldp=( "$1"(Nmh+1) ) # 1 hour
+ (( $#oldp ))
+}
+
+
+__scw_repositories () {
+ __scw_images
+}
+
+__scw_commands () {
+ # local -a _scw_subcommands
+ local cache_policy
+
+ zstyle -s ":completion:${curcontext}:" cache-policy cache_policy
+ if [[ -z "$cache_policy" ]]; then
+ zstyle ":completion:${curcontext}:" cache-policy __scw_caching_policy
+ fi
+
+ if ( [[ ${+_scw_subcommands} -eq 0 ]] || _cache_invalid scw_subcommands) \
+ && ! _retrieve_cache scw_subcommands;
+ then
+ local -a lines
+ lines=(${(f)"$(_call_program commands scw 2>&1)"})
+ _scw_subcommands=(${${${lines[$((${lines[(i)Commands:]} + 1)),${lines[(I) *]}]}## #}/ ##/:})
+ _scw_subcommands=($_scw_subcommands 'help:Show help for a command')
+ _store_cache scw_subcommands _scw_subcommands
+ fi
+ _describe -t scw-commands "scw command" _scw_subcommands
+}
+
+__scw_subcommand () {
+ local -a _command_args
+ case "$words[1]" in
+ (attach)
+ _arguments \
+ '--no-stdin[Do not attach stdin]' \
+ ':servers:__scw_runningservers'
+ ;;
+ (commit)
+ _arguments \
+ {-v,--volume=0}'[Volume slot]:volume: ' \
+ ':server:__scw_servers' \
+ ':repository:__scw_repositories_with_tags'
+ ;;
+ (cp)
+ _arguments \
+ ':server:->server' \
+ ':hostpath:_files'
+ case $state in
+ (server)
+ if compset -P '*:'; then
+ _files
+ else
+ __scw_servers -qS ":"
+ fi
+ ;;
+ esac
+ ;;
+ (exec)
+ local state ret
+ _arguments \
+ {-T,--timeout=0}'[Set timeout values to seconds]' \
+ {-w,--wait}'[Wait for SSH to be ready]' \
+ ':servers:__scw_runningservers' \
+ '*::command:->anycommand' && ret=0
+
+ case $state in
+ (anycommand)
+ shift 1 words
+ (( CURRENT-- ))
+ _normal
+ ;;
+ esac
+
+ return ret
+ ;;
+ (history)
+ _arguments \
+ '--no-trunc[Do not truncate output]' \
+ {-q,--quiet}'[Only show numeric IDs]' \
+ '*:images:__scw_images'
+ ;;
+ (images)
+ _arguments \
+ {-a,--all}'[Show all images]' \
+ '--no-trunc[Do not truncate output]' \
+ {-q,--quiet}'[Only show numeric IDs]' \
+ ':repository:__scw_repositories'
+ ;;
+ (info)
+ ;;
+ (inspect)
+ _arguments \
+ {-f,--format=-}'[Format the output using the given go template]:template: ' \
+ '*:servers:__scw_servers'
+ ;;
+ (kill)
+ _arguments \
+ '*:servers:__scw_runningservers'
+ ;;
+ (login)
+ _arguments \
+ {-o,--organization=-}'[Organization]:organization: ' \
+ {-t,--token=-}'[Token]:token: ' \
+ ':server: '
+ ;;
+ (logout)
+ _arguments \
+ ':server: '
+ ;;
+ (logs)
+ _arguments \
+ '*:servers:__scw_servers'
+ ;;
+ (port)
+ _arguments \
+ '1:servers:__scw_runningservers' \
+ '2:port:_ports'
+ ;;
+ (start)
+ _arguments \
+ {-T,--timeout=0}'[Set timeout values to seconds]' \
+ {-w,--wait}'[Wait for SSH to be ready]' \
+ '*:servers:__scw_stoppedservers'
+ ;;
+ (rm)
+ _arguments \
+ '*:servers:__scw_stoppedservers'
+ ;;
+ (rmi)
+ _arguments \
+ '*:images:__scw_images'
+ ;;
+ (restart)
+ _arguments \
+ '*:servers:__scw_runningservers'
+ ;;
+ (stop)
+ _arguments \
+ {-t,--terminate}'[Stop and trash a server with its volumes]' \
+ {-w,--wait}'[Synchronous stop. Wait for server to be stopped]' \
+ '*:servers:__scw_runningservers'
+ ;;
+ (top)
+ _arguments \
+ '1:servers:__scw_runningservers' \
+ '(-)*:: :->ps-arguments'
+ case $state in
+ (ps-arguments)
+ _ps
+ ;;
+ esac
+ ;;
+ (ps)
+ _arguments \
+ {-a,--all}'[Show all servers. Only running servers are shown by default]' \
+ {-l,--latest}'[Show only the latest created server]' \
+ '-n[Show n last created servers, include non-running one]:n:(1 5 10 25 50)' \
+ '--no-trunc[Do not truncate output]' \
+ {-q,--quiet}'[Only show numeric IDs]'
+ ;;
+ (tag)
+ _arguments \
+ {-f,--force}'[force]'\
+ ':image:__scw_images'\
+ ':repository:__scw_repositories_with_tags'
+ ;;
+ (create|run)
+ _arguments \
+ {-a,--attach}'[Attach to stdin, stdout or stderr]' \
+ '*'{-e,--environment=-}'[Set environment variables]:environment variable: ' \
+ '--name=-[Server name]:name: ' \
+ '--bootscript=-[Assign a bootscript]:bootscript:__scw_bootscripts ' \
+ '*-v[Bind mount a volume]:volume: '\
+ '(-):images:__scw_images_and_snapshots' \
+ '(-):command: _command_names -e' \
+ '*::arguments: _normal'
+
+ case $state in
+ (link)
+ if compset -P '*:'; then
+ _wanted alias expl 'Alias' compadd -E ""
+ else
+ __scw_runningservers -qS ":"
+ fi
+ ;;
+ esac
+ ;;
+ (rename)
+ _arguments \
+ ':old name:__scw_servers' \
+ ':new name: '
+ ;;
+ (search)
+ _arguments \
+ '--no-trunc[Do not truncate output]' \
+ ':term: '
+ ;;
+ (wait)
+ _arguments '*:servers:__scw_runningservers'
+ ;;
+ (help)
+ _arguments ':subcommand:__scw_commands'
+ ;;
+ (*)
+ _message 'Unknown sub command'
+ esac
+
+}
+
+_scw () {
+ # Support for subservices, which allows for `compdef _scw scw-shell=_scw_servers`.
+ # Based on /usr/share/zsh/functions/Completion/Unix/_git without support for `ret`.
+ if [[ $service != scw ]]; then
+ _call_function - _$service
+ return
+ fi
+
+ local curcontext="$curcontext" state line
+ typeset -A opt_args
+
+ _arguments -C \
+ '-H[tcp://host:port to bind/connect to]:socket: ' \
+ '(-): :->command' \
+ '(-)*:: :->option-or-argument'
+
+ if (( CURRENT == 1 )); then
+
+ fi
+ case $state in
+ (command)
+ __scw_commands
+ ;;
+ (option-or-argument)
+ curcontext=${curcontext%:*:*}:scw-$words[1]:
+ __scw_subcommand
+ ;;
+ esac
+}
+
+_scw "$@"
+
+# Local Variables:
+# mode: Shell-Script
+# sh-indentation: 4
+# indent-tabs-mode: nil
+# sh-basic-offset: 4
+# End:
+# vim: ft=zsh sw=4 ts=4 et
diff --git a/plugins/spring/README.md b/plugins/spring/README.md
new file mode 100644
index 000000000..62bfd8013
--- /dev/null
+++ b/plugins/spring/README.md
@@ -0,0 +1,25 @@
+# Spring Boot oh-my-zsh plugin
+oh-my-zsh Spring Boot plugin
+
+## Spring Boot autocomplete plugin
+
+- Adds autocomplete options for all spring boot commands.
+
+## Manual Install
+
+ $ cd ~/.oh-my-zsh/plugins
+ $ git clone git@github.com:linux-china/oh-my-zsh-spring-boot-plugin.git spring
+
+Adjust your .zshrc file and add spring to plugins=(...)
+
+## Tips
+
+* Install Spring Cloud plugin: spring install org.springframework.cloud:spring-cloud-cli:1.0.2.RELEASE
+
+## Reference
+
+* Spring Boot: http://projects.spring.io/spring-boot/
+* Spring Boot CLI: http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#cli
+
+Maintainer : linux_china ([@linux_china](https://twitter.com/linux_china))
+
diff --git a/plugins/spring/_spring b/plugins/spring/_spring
new file mode 100644
index 000000000..93f19517d
--- /dev/null
+++ b/plugins/spring/_spring
@@ -0,0 +1,29 @@
+#compdef spring 'spring'
+#autoload
+
+_spring() {
+
+ local cword
+ let cword=CURRENT-1
+
+ local hints
+ hints=()
+
+ local reply
+ while read -r line; do
+ reply=`echo "$line" | awk '{printf $1 ":"; for (i=2; i<NF; i++) printf $i " "; print $NF}'`
+ hints+=("$reply")
+ done < <(spring hint ${cword} ${words[*]})
+
+ if ((cword == 1)) {
+ _describe -t commands 'commands' hints
+ return 0
+ }
+
+ _describe -t options 'options' hints
+ _files
+
+ return 0
+}
+
+_spring "$@" \ No newline at end of file
diff --git a/plugins/stack/stack.plugin.zsh b/plugins/stack/stack.plugin.zsh
new file mode 100644
index 000000000..a149208d0
--- /dev/null
+++ b/plugins/stack/stack.plugin.zsh
@@ -0,0 +1,37 @@
+function _stack_commands() {
+ local ret=1 state
+ _arguments ':subcommand:->subcommand' && ret=0
+
+ case $state in
+ subcommand)
+ subcommands=(
+ "build:Build the project(s) in this directory/configuration"
+ "install:Build executables and install to a user path"
+ "test:Build and test the project(s) in this directory/configuration"
+ "bench:Build and benchmark the project(s) in this directory/configuration"
+ "haddock:Generate haddocks for the project(s) in this directory/configuration"
+ "new:Create a brand new project"
+ "init:Initialize a stack project based on one or more stack packages"
+ "solver:Use a dependency solver to try and determine missing extra-deps"
+ "setup:Get the appropriate ghc for your project"
+ "path:Print out handy path information"
+ "unpack:Unpack one or more packages locally"
+ "update:Update the package index"
+ "upgrade:Upgrade to the latest stack (experimental)"
+ "upload:Upload a package to Hackage"
+ "dot:Visualize your project's dependency graph using Graphviz dot"
+ "exec:Execute a command"
+ "ghc:Run ghc"
+ "ghci:Run ghci in the context of project(s)"
+ "ide:Run ide-backend-client with the correct arguments"
+ "runghc:Run runghc"
+ "clean:Clean the local packages"
+ "docker:Subcommands specific to Docker use"
+ )
+ _describe -t subcommands 'stack subcommands' subcommands && ret=0
+ esac
+
+ return ret
+}
+
+compdef _stack_commands stack
diff --git a/plugins/sublime/README.md b/plugins/sublime/README.md
index e38cf66dc..e1e666f05 100644
--- a/plugins/sublime/README.md
+++ b/plugins/sublime/README.md
@@ -14,4 +14,6 @@ Plugin for Sublime Text, a cross platform text and code editor, available for Li
* If `st` is passed a file, open it in Sublime Text
- * if `stt` command is called, it is equivalent to `st .`, opening the current folder in Sublime Text \ No newline at end of file
+ * If `stt` command is called, it is equivalent to `st .`, opening the current folder in Sublime Text
+
+ * If `sst` command is called, it is like `sudo st`, opening the file or folder in Sublime Text. Useful for editing system protected files. \ No newline at end of file
diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh
index 38a7596fd..a5d63cde6 100644
--- a/plugins/sublime/sublime.plugin.zsh
+++ b/plugins/sublime/sublime.plugin.zsh
@@ -1,13 +1,14 @@
-# Sublime Text 2 Aliases
-
if [[ $('uname') == 'Linux' ]]; then
local _sublime_linux_paths > /dev/null 2>&1
_sublime_linux_paths=(
"$HOME/bin/sublime_text"
"/opt/sublime_text/sublime_text"
+ "/opt/sublime_text_3/sublime_text"
"/usr/bin/sublime_text"
"/usr/local/bin/sublime_text"
"/usr/bin/subl"
+ "/opt/sublime_text_3/sublime_text"
+ "/usr/bin/subl3"
)
for _sublime_path in $_sublime_linux_paths; do
if [[ -a $_sublime_path ]]; then
@@ -30,14 +31,28 @@ elif [[ "$OSTYPE" = darwin* ]]; then
"$HOME/Applications/Sublime Text 3.app/Contents/SharedSupport/bin/subl"
"$HOME/Applications/Sublime Text 2.app/Contents/SharedSupport/bin/subl"
)
-
for _sublime_path in $_sublime_darwin_paths; do
if [[ -a $_sublime_path ]]; then
- alias subl="'$_sublime_path'"
+ subl () { "$_sublime_path" $* }
+ alias st=subl
+ break
+ fi
+ done
+
+elif [[ "$OSTYPE" = 'cygwin' ]]; then
+ local _sublime_cygwin_paths > /dev/null 2>&1
+ _sublime_cygwin_paths=(
+ "$(cygpath $ProgramW6432/Sublime\ Text\ 2)/sublime_text.exe"
+ "$(cygpath $ProgramW6432/Sublime\ Text\ 3)/sublime_text.exe"
+ )
+ for _sublime_path in $_sublime_cygwin_paths; do
+ if [[ -a $_sublime_path ]]; then
+ subl () { "$_sublime_path" $* }
alias st=subl
break
fi
done
+
fi
alias stt='st .'
diff --git a/plugins/sudo/sudo.plugin.zsh b/plugins/sudo/sudo.plugin.zsh
index e3ba39918..0ba8bed5b 100644
--- a/plugins/sudo/sudo.plugin.zsh
+++ b/plugins/sudo/sudo.plugin.zsh
@@ -14,7 +14,11 @@
sudo-command-line() {
[[ -z $BUFFER ]] && zle up-history
- [[ $BUFFER != sudo\ * ]] && LBUFFER="sudo $LBUFFER"
+ if [[ $BUFFER == sudo\ * ]]; then
+ LBUFFER="${LBUFFER#sudo }"
+ else
+ LBUFFER="sudo $LBUFFER"
+ fi
}
zle -N sudo-command-line
# Defined shortcut keys: [Esc] [Esc]
diff --git a/plugins/svn/svn.plugin.zsh b/plugins/svn/svn.plugin.zsh
index 9f7a4c6eb..816055afe 100644
--- a/plugins/svn/svn.plugin.zsh
+++ b/plugins/svn/svn.plugin.zsh
@@ -1,16 +1,17 @@
# vim:ft=zsh ts=2 sw=2 sts=2
#
function svn_prompt_info() {
+ local _DISPLAY
if in_svn; then
if [ "x$SVN_SHOW_BRANCH" = "xtrue" ]; then
unset SVN_SHOW_BRANCH
_DISPLAY=$(svn_get_branch_name)
else
_DISPLAY=$(svn_get_repo_name)
+ _DISPLAY=$(omz_urldecode "${_DISPLAY}")
fi
echo "$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_SVN_PROMPT_PREFIX\
$ZSH_THEME_REPO_NAME_COLOR$_DISPLAY$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_SVN_PROMPT_SUFFIX$ZSH_PROMPT_BASE_COLOR$(svn_dirty)$(svn_dirty_pwd)$ZSH_PROMPT_BASE_COLOR"
- unset _DISPLAY
fi
}
@@ -30,7 +31,7 @@ function svn_get_repo_name() {
}
function svn_get_branch_name() {
- _DISPLAY=$(
+ local _DISPLAY=$(
svn info 2> /dev/null | \
awk -F/ \
'/^URL:/ { \
@@ -49,7 +50,6 @@ function svn_get_branch_name() {
else
echo $_DISPLAY
fi
- unset _DISPLAY
}
function svn_get_rev_nr() {
@@ -60,7 +60,7 @@ function svn_get_rev_nr() {
function svn_dirty_choose() {
if in_svn; then
- root=`svn info 2> /dev/null | sed -n 's/^Working Copy Root Path: //p'`
+ local root=`svn info 2> /dev/null | sed -n 's/^Working Copy Root Path: //p'`
if $(svn status $root 2> /dev/null | command grep -Eq '^\s*[ACDIM!?L]'); then
# Grep exits with 0 when "One or more lines were selected", return "dirty".
echo $1
@@ -77,7 +77,7 @@ function svn_dirty() {
function svn_dirty_choose_pwd () {
if in_svn; then
- root=$PWD
+ local root=$PWD
if $(svn status $root 2> /dev/null | command grep -Eq '^\s*[ACDIM!?L]'); then
# Grep exits with 0 when "One or more lines were selected", return "dirty".
echo $1
diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh
index aa7eb4cc2..fe236a298 100644
--- a/plugins/symfony2/symfony2.plugin.zsh
+++ b/plugins/symfony2/symfony2.plugin.zsh
@@ -5,7 +5,7 @@ _symfony_console () {
}
_symfony2_get_command_list () {
- `_symfony_console` --no-ansi | sed "1,/Available commands/d" | awk '/^ ?[a-z]+/ { print $1 }'
+ `_symfony_console` --no-ansi | sed "1,/Available commands/d" | awk '/^ ?[^ ]+ / { print $1 }'
}
_symfony2 () {
diff --git a/plugins/systemadmin/systemadmin.plugin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh
index 4ae70dfa7..8c2633355 100644
--- a/plugins/systemadmin/systemadmin.plugin.zsh
+++ b/plugins/systemadmin/systemadmin.plugin.zsh
@@ -140,12 +140,16 @@ d0() {
# gather external ip address
geteip() {
- curl http://ifconfig.me
+ curl -s -S https://icanhazip.com
}
# determine local IP address
getip() {
- ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'
+ if (( ${+commands[ip]} )); then
+ ip addr | grep "inet " | grep -v '127.0.0.1' | awk '{print $2}'
+ else
+ ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}'
+ fi
}
# Clear zombie processes
diff --git a/plugins/systemd/systemd.plugin.zsh b/plugins/systemd/systemd.plugin.zsh
index 7d3db0f8e..b19793557 100644
--- a/plugins/systemd/systemd.plugin.zsh
+++ b/plugins/systemd/systemd.plugin.zsh
@@ -1,11 +1,16 @@
user_commands=(
list-units is-active status show help list-unit-files
- is-enabled list-jobs show-environment)
+ is-enabled list-jobs show-environment cat)
sudo_commands=(
start stop reload restart try-restart isolate kill
reset-failed enable disable reenable preset mask unmask
- link load cancel set-environment unset-environment)
+ link load cancel set-environment unset-environment
+ edit)
for c in $user_commands; do; alias sc-$c="systemctl $c"; done
for c in $sudo_commands; do; alias sc-$c="sudo systemctl $c"; done
+
+alias sc-enable-now="sc-enable --now"
+alias sc-disable-now="sc-disable --now"
+alias sc-mask-now="sc-mask --now"
diff --git a/plugins/taskwarrior/README.md b/plugins/taskwarrior/README.md
new file mode 100644
index 000000000..053151e78
--- /dev/null
+++ b/plugins/taskwarrior/README.md
@@ -0,0 +1,13 @@
+# taskwarrior
+
+This plugin adds smart tab completion for [TaskWarrior](http://taskwarrior.org/).
+It uses the zsh tab completion script (`_task`) shipped with TaskWarrior for the
+completion definitions.
+
+The latest version pulled in from the official project is of January 1st, 2015.
+
+
+## Examples
+
+Typing `task [TAB]` will give you a list of commands, `task 66[TAB]` shows a
+list of available modifications for that task, etcetera.
diff --git a/plugins/taskwarrior/_task b/plugins/taskwarrior/_task
index 5cc253152..afa30d45a 100644
--- a/plugins/taskwarrior/_task
+++ b/plugins/taskwarrior/_task
@@ -1,9 +1,6 @@
#compdef task
-# zsh completion for taskwarrior
#
-# taskwarrior - a command line task list manager.
-#
-# Copyright 2010 - 2011 Johannes Schlatow
+# Copyright 2010 - 2015 Johannes Schlatow
# Copyright 2009 P.C. Shyamshankar
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
@@ -30,31 +27,40 @@ typeset -g _task_cmds _task_projects _task_tags _task_config _task_modifiers
_task_projects=($(task _projects))
_task_tags=($(task _tags))
_task_ids=($(task _ids))
+_task_zshids=( ${(f)"$(task _zshids)"} )
_task_config=($(task _config))
_task_columns=($(task _columns))
_task_modifiers=(
- 'before' \
- 'after' \
- 'none' \
- 'any' \
- 'is' \
- 'isnt' \
- 'has' \
- 'hasnt' \
- 'startswith' \
- 'endswith' \
- 'word' \
- 'noword'
+ 'before' \
+ 'after' \
+ 'none' \
+ 'any' \
+ 'is' \
+ 'isnt' \
+ 'has' \
+ 'hasnt' \
+ 'startswith' \
+ 'endswith' \
+ 'word' \
+ 'noword'
)
_task_conjunctions=(
- 'and' \
- 'or' \
- 'xor' \
- '\)'
- '\('
+ 'and' \
+ 'or' \
+ 'xor' \
+ '\)' \
+ '\(' \
+ '<' \
+ '<=' \
+ '=' \
+ '!=' \
+ '>=' \
+ '>'
)
-_task_cmds=($(task _commands))
-_task_zshcmds=( ${(f)"$(task _zshcommands)"} )
+_task_cmds=($(task _commands; task _aliases))
+_task_zshcmds=( ${(f)"$(task _zshcommands)"} sentinel:sentinel:sentinel )
+
+_task_aliases=($(task _aliases))
_task() {
_arguments -s -S \
@@ -68,110 +74,130 @@ word=$'[^\0]#\0'
# priorities
local -a task_priorities
_regex_words values 'task priorities' \
- 'H:High' \
- 'M:Middle' \
- 'L:Low'
+ 'H:High' \
+ 'M:Middle' \
+ 'L:Low'
task_priorities=("$reply[@]")
# projects
local -a task_projects
task_projects=(
- /"$word"/
- ":values:task projects:compadd -a _task_projects"
+ /"$word"/
+ ":values:task projects:compadd -a _task_projects"
)
local -a _task_dates
_regex_words values 'task dates' \
- 'tod*ay:Today' \
- 'yes*terday:Yesterday' \
- 'tom*orrow:Tomorrow' \
- 'sow:Start of week' \
- 'soww:Start of work week' \
- 'socw:Start of calendar week' \
- 'som:Start of month' \
- 'soy:Start of year' \
- 'eow:End of week' \
- 'eoww:End of work week' \
- 'eocw:End of calendar week' \
- 'eom:End of month' \
- 'eoy:End of year' \
- 'mon:Monday' \
- 'tue:Tuesday'\
- 'wed:Wednesday' \
- 'thu:Thursday' \
- 'fri:Friday' \
- 'sat:Saturday' \
- 'sun:Sunday'
+ 'tod*ay:Today' \
+ 'yes*terday:Yesterday' \
+ 'tom*orrow:Tomorrow' \
+ 'sow:Start of week' \
+ 'soww:Start of work week' \
+ 'socw:Start of calendar week' \
+ 'som:Start of month' \
+ 'soq:Start of quarter' \
+ 'soy:Start of year' \
+ 'eow:End of week' \
+ 'eoww:End of work week' \
+ 'eocw:End of calendar week' \
+ 'eom:End of month' \
+ 'eoq:End of quarter' \
+ 'eoy:End of year' \
+ 'mon:Monday' \
+ 'tue:Tuesday'\
+ 'wed:Wednesday' \
+ 'thu:Thursday' \
+ 'fri:Friday' \
+ 'sat:Saturday' \
+ 'sun:Sunday' \
+ 'good*friday:Good Friday' \
+ 'easter:Easter' \
+ 'eastermonday:Easter Monday' \
+ 'ascension:Ascension' \
+ 'pentecost:Pentecost' \
+ 'midsommar:Midsommar' \
+ 'midsommarafton:Midsommarafton' \
+ 'later:Later' \
+ 'someday:Some Day'
_task_dates=("$reply[@]")
local -a _task_reldates
_regex_words values 'task reldates' \
- 'hrs:n hours' \
- 'day:n days' \
- '1st:first' \
- '2nd:second' \
- '3rd:third' \
- 'th:4th, 5th, etc.' \
- 'wks:weeks'
+ 'hrs:n hours' \
+ 'day:n days' \
+ '1st:first' \
+ '2nd:second' \
+ '3rd:third' \
+ 'th:4th, 5th, etc.' \
+ 'wks:weeks'
_task_reldates=("$reply[@]")
task_dates=(
- \( "$_task_dates[@]" \|
+ \( "$_task_dates[@]" \|
\( /$'[0-9][0-9]#'/- \( "$_task_reldates[@]" \) \)
- \)
+ \)
)
+local -a task_zshids
+_regex_words values 'task IDs' $_task_zshids
+task_zshids=("$reply[@]")
+
_regex_words values 'task frequencies' \
- 'daily:Every day' \
- 'day:Every day' \
- 'weekdays:Every day skipping weekend days' \
- 'weekly:Every week' \
- 'biweekly:Every two weeks' \
- 'fortnight:Every two weeks' \
-+ 'monthly:Every month' \
- 'quarterly:Every three months' \
- 'semiannual:Every six months' \
- 'annual:Every year' \
- 'yearly:Every year' \
- 'biannual:Every two years' \
- 'biyearly:Every two years'
+ 'daily:Every day' \
+ 'day:Every day' \
+ 'weekdays:Every day skipping weekend days' \
+ 'weekly:Every week' \
+ 'biweekly:Every two weeks' \
+ 'fortnight:Every two weeks' \
+ 'monthly:Every month' \
+ 'quarterly:Every three months' \
+ 'semiannual:Every six months' \
+ 'annual:Every year' \
+ 'yearly:Every year' \
+ 'biannual:Every two years' \
+ 'biyearly:Every two years'
_task_freqs=("$reply[@]")
local -a _task_frequencies
_regex_words values 'task frequencies' \
- 'd:days' \
- 'w:weeks' \
- 'q:quarters' \
- 'y:years'
+ 'd:days' \
+ 'w:weeks' \
+ 'q:quarters' \
+ 'y:years'
_task_frequencies=("$reply[@]")
task_freqs=(
- \( "$_task_freqs[@]" \|
+ \( "$_task_freqs[@]" \|
\( /$'[0-9][0-9]#'/- \( "$_task_frequencies[@]" \) \)
- \)
+ \)
)
# attributes
local -a task_attributes
_regex_words -t ':' default 'task attributes' \
- 'pro*ject:Project name:$task_projects' \
- 'du*e:Due date:$task_dates' \
- 'wa*it:Date until task becomes pending:$task_dates' \
- 're*cur:Recurrence frequency:$task_freqs' \
- 'pri*ority:priority:$task_priorities' \
- 'un*til:Recurrence end date:$task_dates' \
- 'fg:Foreground color' \
- 'bg:Background color' \
- 'li*mit:Desired number of rows in report'
+ 'des*cription:Task description text' \
+ 'status:Status of task - pending, completed, deleted, waiting' \
+ 'pro*ject:Project name:$task_projects' \
+ 'pri*ority:priority:$task_priorities' \
+ 'du*e:Due date:$task_dates' \
+ 're*cur:Recurrence frequency:$task_freqs' \
+ 'un*til:Expiration date:$task_dates' \
+ 'li*mit:Desired number of rows in report' \
+ 'wa*it:Date until task becomes pending:$task_dates' \
+ 'ent*ry:Date task was created:$task_dates' \
+ 'end:Date task was completed/deleted:$task_dates' \
+ 'st*art:Date task was started:$task_dates' \
+ 'sc*heduled:Date task is scheduled to start:$task_dates' \
+ 'dep*ends:Other tasks that this task depends upon:$task_zshids'
task_attributes=("$reply[@]")
args=(
- \( "$task_attributes[@]" \|
- \( /'(project|due|wait|recur|priority|until|fg|bg|limit).'/- \( /$'[^:]#:'/ ":default:modifiers:compadd -S ':' -a _task_modifiers" \) \) \|
- \( /'(rc).'/- \( /$'[^:]#:'/ ":arguments:config:compadd -S ':' -a _task_config" \) \) \|
- \( /'(+|-)'/- \( /"$word"/ ":values:remove tag:compadd -a _task_tags" \) \) \|
- \( /"$word"/ \)
- \) \#
+ \( "$task_attributes[@]" \|
+ \( /'(project|description|status|entry|end|start|scheduled|depends|due|wait|recur|priority|until|limit).'/- \( /$'[^:]#:'/ ":default:modifiers:compadd -S ':' -a _task_modifiers" \) \) \|
+ \( /'(rc).'/- \( /$'[^:]#:'/ ":arguments:config:compadd -S ':' -a _task_config" \) \) \|
+ \( /'(+|-)'/- \( /"$word"/ ":values:remove tag:compadd -a _task_tags" \) \) \|
+ \( /"$word"/ \)
+ \) \#
)
_regex_arguments _task_attributes "${args[@]}"
@@ -180,43 +206,50 @@ _regex_arguments _task_attributes "${args[@]}"
# filter completion
(( $+functions[_task_filter] )) ||
_task_filter() {
- _task_attributes "$@"
-
- # TODO complete conjunctions only if the previous word is a filter expression, i.e. attribute, ID, any non-command
- _describe -t default 'task conjunctions' _task_conjunctions
-}
-
-# merge completion
-(( $+functions[_task_merge] )) ||
-_task_merge() {
- # TODO match URIs in .taskrc
- _files
-}
-
-# push completion
-(( $+functions[_task_push] )) ||
-_task_push() {
- # TODO match URIs in .taskrc
- _files
-}
+ _task_attributes "$@"
-# pull completion
-(( $+functions[_task_pull] )) ||
-_task_pull() {
- # TODO match URIs in .taskrc
- _files
+ # TODO complete conjunctions only if the previous word is a filter expression, i.e. attribute, ID, any non-command
+ _describe -t default 'task conjunctions' _task_conjunctions
}
# execute completion
(( $+functions[_task_execute] )) ||
_task_execute() {
- _files
+ _files
}
# id-only completion
(( $+functions[_task_id] )) ||
_task_id() {
- _describe -t values 'task IDs' _task_zshids
+ _describe -t values 'task IDs' _task_zshids
+}
+
+# subcommand-only function
+(( $+functions[_task_subcommands] )) ||
+_task_subcommands() {
+ local -a subcommands
+ local _zshcmd
+ local cmd category desc
+ local lastcategory=''
+ # The list is sorted by category, in the right order.
+ for _zshcmd in "$_task_zshcmds[@]"; do
+ # Parse out the three fields
+ cmd=${_zshcmd%%:*}
+ category=${${_zshcmd#*:}%%:*}
+ desc=${_zshcmd#*:*:}
+
+ # Present each category as soon as the first entry in the *next* category
+ # is seen.
+ if [[ $category != $lastcategory && -n $lastcategory ]]; then
+ _describe -t ${lastcategory}-commands "task ${lastcategory} command" subcommands
+ subcommands=()
+ fi
+
+ # Log the subcommand; we will process it in some future iteration.
+ subcommands+=( "$cmd:$desc" )
+
+ lastcategory=$category
+ done
}
## first level completion => task sub-command completion
@@ -224,27 +257,28 @@ _task_id() {
_task_default() {
local cmd ret=1
- integer i=1
- while (( i < $#words ))
- do
- cmd="${_task_cmds[(r)$words[$i]]}"
- if (( $#cmd )); then
- _call_function ret _task_${cmd} ||
- _call_function ret _task_filter ||
- _message "No command remaining."
- return ret
- fi
- (( i++ ))
- done
-
- # update IDs
- _task_zshids=( ${(f)"$(task _zshids)"} )
-
- _describe -t commands 'task command' _task_zshcmds
- _describe -t values 'task IDs' _task_zshids
- _call_function ret _task_filter
-
- return ret
+ integer i=1
+ while (( i < $#words ))
+ do
+ cmd="${_task_cmds[(r)$words[$i]]}"
+ if (( $#cmd )); then
+ _call_function ret _task_${cmd} ||
+ _call_function ret _task_filter ||
+ _message "No command remaining."
+ return ret
+ fi
+ (( i++ ))
+ done
+
+ # update IDs
+ _task_zshids=( ${(f)"$(task _zshids)"} )
+
+ _task_subcommands
+ _describe -t tasks 'task IDs' _task_zshids
+ _describe -t aliases 'task aliases' _task_aliases
+ _call_function ret _task_filter
+
+ return ret
}
-_task
+_task "$@"
diff --git a/plugins/taskwarrior/taskwarrior.plugin.zsh b/plugins/taskwarrior/taskwarrior.plugin.zsh
index c1830042e..ab885943f 100644
--- a/plugins/taskwarrior/taskwarrior.plugin.zsh
+++ b/plugins/taskwarrior/taskwarrior.plugin.zsh
@@ -1,17 +1,3 @@
-################################################################################
-# Author: Pete Clark
-# Email: pete[dot]clark[at]gmail[dot]com
-# Version: 0.1 (05/24/2011)
-# License: WTFPL<http://sam.zoy.org/wtfpl/>
-#
-# This oh-my-zsh plugin adds smart tab completion for
-# TaskWarrior<http://taskwarrior.org/>. It uses the zsh tab completion
-# script (_task) distributed with TaskWarrior for the completion definitions.
-#
-# Typing task[tabtab] will give you a list of current tasks, task 66[tabtab]
-# gives a list of available modifications for that task, etc.
-################################################################################
-
zstyle ':completion:*:*:task:*' verbose yes
zstyle ':completion:*:*:task:*:descriptions' format '%U%B%d%b%u'
diff --git a/plugins/terminalapp/terminalapp.plugin.zsh b/plugins/terminalapp/terminalapp.plugin.zsh
index 6e47ee188..7c0c278b9 100644
--- a/plugins/terminalapp/terminalapp.plugin.zsh
+++ b/plugins/terminalapp/terminalapp.plugin.zsh
@@ -1,39 +1,6 @@
-# Set Apple Terminal.app resume directory
-# based on this answer: http://superuser.com/a/315029
-# 2012-10-26: (javageek) Changed code using the updated answer
-
-# Tell the terminal about the working directory whenever it changes.
-if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then
- update_terminal_cwd() {
- # Identify the directory using a "file:" scheme URL, including
- # the host name to disambiguate local vs. remote paths.
-
- # Percent-encode the pathname.
- local URL_PATH=''
- {
- # Use LANG=C to process text byte-by-byte.
- local i ch hexch LANG=C
- for ((i = 1; i <= ${#PWD}; ++i)); do
- ch="$PWD[i]"
- if [[ "$ch" =~ [/._~A-Za-z0-9-] ]]; then
- URL_PATH+="$ch"
- else
- hexch=$(printf "%02X" "'$ch")
- URL_PATH+="%$hexch"
- fi
- done
- }
-
- local PWD_URL="file://$HOST$URL_PATH"
- #echo "$PWD_URL" # testing
- printf '\e]7;%s\a' "$PWD_URL"
- }
-
- # Register the function so it is called whenever the working
- # directory changes.
- autoload add-zsh-hook
- add-zsh-hook precmd update_terminal_cwd
-
- # Tell the terminal about the initial directory.
- update_terminal_cwd
-fi
+# This file is intentionally empty.
+#
+# The terminalapp plugin is deprecated and may be removed in a future release.
+# Its functionality has been folded in to the core lib/termsupport.zsh, which
+# is loaded for all users. You can remove terminalapp from your $plugins list
+# once all your systems are updated to the current version of Oh My Zsh.
diff --git a/plugins/terraform/README.md b/plugins/terraform/README.md
new file mode 100644
index 000000000..44e38a1c0
--- /dev/null
+++ b/plugins/terraform/README.md
@@ -0,0 +1,11 @@
+## atom
+
+Plugin for Terraform, a tool from Hashicorp for managing infrastructure safely and efficiently.
+
+### Requirements
+
+ * [Terraform](https://terraform.io/)
+
+### Usage
+
+ * Type `terraform` into your prompt and hit `TAB` to see available completion options
diff --git a/plugins/terraform/_terraform b/plugins/terraform/_terraform
new file mode 100644
index 000000000..11740dc48
--- /dev/null
+++ b/plugins/terraform/_terraform
@@ -0,0 +1,177 @@
+#compdef terraform
+
+local -a _terraform_cmds
+_terraform_cmds=(
+ 'apply:Builds or changes infrastructure'
+ 'destroy:Destroy Terraform-managed infrastructure'
+ 'get:Download and install modules for the configuration'
+ 'graph:Create a visual graph of Terraform resources'
+ 'init:Initializes Terraform configuration from a module'
+ 'output:Read an output from a state file'
+ 'plan:Generate and show an execution plan'
+ 'pull:Refreshes the local state copy from the remote server'
+ 'push:Uploads the local state to the remote server'
+ 'refresh:Update local state file against real resources'
+ 'remote:Configures remote state management'
+ 'show:Inspect Terraform state or plan'
+ 'taint:Manually forcing a destroy and recreate on the next plan/apply'
+ 'version:Prints the Terraform version'
+)
+
+__apply() {
+ _arguments \
+ '-backup=[(path) Path to backup the existing state file before modifying. Defaults to the "-state-out" path with ".backup" extension. Set to "-" to disable backup.]' \
+ '-input=[(true) Ask for input for variables if not directly set.]' \
+ '-no-color[If specified, output will not contain any color.]' \
+ '-refresh=[(true) Update state prior to checking for differences. This has no effect if a plan file is given to apply.]' \
+ '-state=[(path) Path to read and save state (unless state-out is specified). Defaults to "terraform.tfstate".]' \
+ '-state-out=[(path) Path to write state to that is different than "-state". This can be used to preserve the old state.]' \
+ '-target=[(resource) A Resource Address to target. Operation will be limited to this resource and its dependencies. This flag can be used multiple times.]' \
+ '-var[("foo=bar") Set a variable in the Terraform configuration. This flag can be set multiple times.]' \
+ '-var-file=[(path) Set variables in the Terraform configuration from a file. If "terraform.tfvars" is present, it will be automatically loaded if this flag is not specified.]'
+}
+
+__destroy() {
+ _arguments \
+ '-backup=[(path) Path to backup the existing state file before modifying. Defaults to the "-state-out" path with ".backup" extension. Set to "-" to disable backup.]' \
+ '-force[If set, then the destroy confirmation will not be shown.]' \
+ '-input=[(true) Ask for input for variables if not directly set.]' \
+ '-no-color[If specified, output will not contain any color.]' \
+ '-refresh=[(true) Update state prior to checking for differences. This has no effect if a plan file is given to apply.]' \
+ '-state=[(path) Path to read and save state (unless state-out is specified). Defaults to "terraform.tfstate".]' \
+ '-state-out=[(path) Path to write state to that is different than "-state". This can be used to preserve the old state.]' \
+ '-target=[(resource) Instead of affecting "dependencies" will instead also destroy any resources that depend on the target(s) specified.]' \
+ '-var[("foo=bar") Set a variable in the Terraform configuration. This flag can be set multiple times.]' \
+ '-var-file=[(path) Set variables in the Terraform configuration from a file. If "terraform.tfvars" is present, it will be automatically loaded if this flag is not specified.]'
+}
+
+__get() {
+ _arguments \
+ '-update=[(false) If true, modules already downloaded will be checked for updates and updated if necessary.]'
+}
+
+__graph() {
+ _arguments \
+ '-draw-cycles[Highlight any cycles in the graph with colored edges. This helps when diagnosing cycle errors.]' \
+ '-module-depth=[(n) The maximum depth to expand modules. By default this is zero, which will not expand modules at all.]' \
+ '-verbose[Generate a verbose, "worst-case" graph, with all nodes for potential operations in place.]'
+}
+
+__init() {
+ _arguments \
+ '-address=[(url) URL of the remote storage server. Required for HTTP backend, optional for Atlas and Consul.]' \
+ '-access-token=[(token) Authentication token for state storage server. Required for Atlas backend, optional for Consul.]' \
+ '-backend=[(atlas) Specifies the type of remote backend. Must be one of Atlas, Consul, or HTTP. Defaults to atlas.]' \
+ '-name=[(name) Name of the state file in the state storage server. Required for Atlas backend.]' \
+ '-path=[(path) Path of the remote state in Consul. Required for the Consul backend.]'
+}
+
+__output() {
+ _arguments \
+ '-state=[(path) Path to the state file to read. Defaults to "terraform.tfstate".]' \
+ '-module=[(module_name) The module path which has needed output. By default this is the root path. Other modules can be specified by a period-separated list.]'
+}
+
+__plan() {
+ _arguments \
+ '-backup=[(path) Path to backup the existing state file before modifying. Defaults to the "-state-out" path with" .backup" extension. Set to "-" to disable backup.]' \
+ '-destroy[If set, a plan will be generated to destroy all resources managed by the given configuration and state.]' \
+ '-detailed-exitcode[Return a detailed exit code when the command exits. When provided, this argument changes the exit codes and their meanings to provide more granular information about what the resulting plan contains]' \
+ '-input=[(true) Ask for input for variables if not directly set.]' \
+ '-module-depth=[(n) Specifies the depth of modules to show in the output. This does not affect the plan itself, only the output shown. By default, this is zero. -1 will expand all.]' \
+ '-no-color[If specified, output will not contain any color.]' \
+ '-out=[(path) Write a plan file to the given path. This can be used as input to the "apply" command.]' \
+ '-refresh=[(true) Update state prior to checking for differences.]' \
+ '-state=[(statefile) Path to a Terraform state file to use to look up Terraform-managed resources. By default it will use the state "terraform.tfstate" if it exists.]' \
+ '-target=[(resource) A Resource Address to target. Operation will be limited to this resource and its dependencies. This flag can be used multiple times.]' \
+ '-var[("foo=bar") Set a variable in the Terraform configuration. This flag can be set multiple times.]' \
+ '-var-file=[(path) Set variables in the Terraform configuration from a file. If "terraform.tfvars" is present, it will be automatically loaded if this flag is not specified.]'
+}
+
+__push() {
+ _arguments \
+ '-atlas-address=[(url) An alternate address to an Atlas instance. Defaults to https://atlas.hashicorp.com.]' \
+ '-upload-modules=[(true) If true (default), then the modules being used are all locked at their current checkout and uploaded completely to Atlas. This prevents Atlas from running terraform get for you.]' \
+ '-name=[(name) Name of the infrastructure configuration in Atlas. The format of this is: "username/name" so that you can upload configurations not just to your account but to other accounts and organizations. This setting can also be set in the configuration in the Atlas section.]' \
+ '-no-color[Disables output with coloring]' \
+ '-overwrite=[(foo) Marks a specific variable to be updated on Atlas. Normally, if a variable is already set in Atlas, Terraform will not send the local value (even if it is different). This forces it to send the local value to Atlas. This flag can be repeated multiple times.]' \
+ '-token=[(token) Atlas API token to use to authorize the upload. If blank or unspecified, the ATLAS_TOKEN environmental variable will be used.]' \
+ '-var=[("foo=bar") Set the value of a variable for the Terraform configuration.]' \
+ '-var-file=[(foo) Set the value of variables using a variable file.]' \
+ '-vcs=[(true) If true (default), then Terraform will detect if a VCS is in use, such as Git, and will only upload files that are comitted to version control. If no version control system is detected, Terraform will upload all files in path (parameter to the command).]'
+}
+
+__refresh() {
+ _arguments \
+ '-backup=[(path) Path to backup the existing state file before modifying. Defaults to the "-state-out" path with ".backup" extension. Set to "-" to disable backup.]' \
+ '-no-color[If specified, output will not contain any color.]' \
+ '-state=[(path) Path to read and save state (unless state-out is specified). Defaults to "terraform.tfstate".]' \
+ '-state-out=[(path) Path to write state to that is different than "-state". This can be used to preserve the old state.]' \
+ '-target=[(resource) A Resource Address to target. Operation will be limited to this resource and its dependencies. This flag can be used multiple times.]' \
+ '-var[("foo=bar") Set a variable in the Terraform configuration. This flag can be set multiple times.]' \
+ '-var-file=[(path) Set variables in the Terraform configuration from a file. If "terraform.tfvars" is present, it will be automatically loaded if this flag is not specified.]'
+}
+
+__remote() {
+ _arguments \
+ '-address=[(url) URL of the remote storage server. Required for HTTP backend, optional for Atlas and Consul.]' \
+ '-access-token=[(token) Authentication token for state storage server. Required for Atlas backend, optional for Consul.]' \
+ '-backend=[(atlas) Specifies the type of remote backend. Must be one of Atlas, Consul, or HTTP. Defaults to atlas.]' \
+ '-backup=[(path) Path to backup the existing state file before modifying. Defaults to the "-state-out" path with ".backup" extension. Set to "-" to disable backup.]' \
+ '-disable[Disables remote state management and migrates the state to the -state path.]' \
+ '-name=[(name) Name of the state file in the state storage server. Required for Atlas backend.]' \
+ '-path=[(path) Path of the remote state in Consul. Required for the Consul backend.]' \
+ '-pull=[(true) Controls if the remote state is pulled before disabling. This defaults to true to ensure the latest state is cached before disabling.]' \
+ '-state=[(path) Path to read and save state (unless state-out is specified). Defaults to "terraform.tfstate".]'
+}
+
+__show() {
+ _arguments \
+ '-module-depth=[(n) The maximum depth to expand modules. By default this is zero, which will not expand modules at all.]' \
+ '-no-color[If specified, output will not contain any color.]'
+}
+
+__taint() {
+ _arguments \
+ '-allow-missing[If specified, the command will succeed (exit code 0) even if the resource is missing.]' \
+ '-backup=[(path) Path to backup the existing state file before modifying. Defaults to the "-state-out" path with ".backup" extension. Set to "-" to disable backup.]' \
+ '-module=[(path) The module path where the resource lives. By default this will be root. Child modules can be specified by names. Ex. "consul" or "consul.vpc" (nested modules).]' \
+ '-no-color[If specified, output will not contain any color.]' \
+ '-state=[(path) Path to read and save state (unless state-out is specified). Defaults to "terraform.tfstate".]' \
+ '-state-out=[(path) Path to write updated state file. By default, the "-state" path will be used.]'
+}
+
+_arguments '*:: :->command'
+
+if (( CURRENT == 1 )); then
+ _describe -t commands "terraform command" _terraform_cmds
+ return
+fi
+
+local -a _command_args
+case "$words[1]" in
+ apply)
+ __apply ;;
+ destroy)
+ __destroy ;;
+ get)
+ __get ;;
+ graph)
+ __graph ;;
+ init)
+ __init ;;
+ output)
+ __output ;;
+ plan)
+ __plan ;;
+ push)
+ __push ;;
+ refresh)
+ __refresh ;;
+ remote)
+ __remote ;;
+ show)
+ __show ;;
+ taint)
+ __taint ;;
+esac
diff --git a/plugins/textmate/textmate.plugin.zsh b/plugins/textmate/textmate.plugin.zsh
index 773c4f8d2..02813de9e 100644
--- a/plugins/textmate/textmate.plugin.zsh
+++ b/plugins/textmate/textmate.plugin.zsh
@@ -1,11 +1,3 @@
-alias et='mate .'
-alias ett='mate Gemfile app config features lib db public spec test Rakefile Capfile Todo'
-alias etp='mate app config lib db public spec test vendor/plugins vendor/gems Rakefile Capfile Todo'
-alias etts='mate app config lib db public script spec test vendor/plugins vendor/gems Rakefile Capfile Todo'
-
-# Edit Ruby app in TextMate
-alias mr='mate CHANGELOG app config db lib public script spec test'
-
# If the tm command is called without an argument, open TextMate in the current directory
# If tm is passed a directory, cd to it and open it in TextMate
# If tm is passed a file, open it in TextMate
diff --git a/plugins/thefuck/README.md b/plugins/thefuck/README.md
new file mode 100644
index 000000000..a9b7550d7
--- /dev/null
+++ b/plugins/thefuck/README.md
@@ -0,0 +1,9 @@
+# The Fuck
+
+[The Fuck](https://github.com/nvbn/thefuck) plugin — magnificent app which corrects your previous console command.
+
+## Usage
+Press `ESC` twice to correct previous console command.
+
+## Notes
+`Esc`-`Esc` key binding conflicts with [sudo](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/sudo) plugin.
diff --git a/plugins/thefuck/thefuck.plugin.zsh b/plugins/thefuck/thefuck.plugin.zsh
new file mode 100644
index 000000000..765e2b9a5
--- /dev/null
+++ b/plugins/thefuck/thefuck.plugin.zsh
@@ -0,0 +1,17 @@
+if [[ -z $commands[thefuck] ]]; then
+ echo 'thefuck is not installed, you should "pip install thefuck" first'
+ return -1
+fi
+
+# Register alias
+eval "$(thefuck --alias)"
+
+fuck-command-line() {
+ local FUCK="$(THEFUCK_REQUIRE_CONFIRMATION=0 thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)"
+ [[ -z $FUCK ]] && echo -n -e "\a" && return
+ BUFFER=$FUCK
+ zle end-of-line
+}
+zle -N fuck-command-line
+# Defined shortcut keys: [Esc] [Esc]
+bindkey "\e\e" fuck-command-line
diff --git a/plugins/tmux-cssh/_tmux-cssh b/plugins/tmux-cssh/_tmux-cssh
new file mode 100644
index 000000000..604e2e478
--- /dev/null
+++ b/plugins/tmux-cssh/_tmux-cssh
@@ -0,0 +1,25 @@
+#compdef tmux-cssh
+
+# tmux-cssh autocompletion for oh-my-zsh
+# Requires: tmux-cssh installed
+# Author: Manfred Touron (@moul)
+
+_arguments \
+'(-h --help)'{-h,--help}'[This help.]' \
+'(-u --user)'{-u,--user}'[User to use.]' \
+'(-c --certificate)'{-c,--certificate}'[Path to ssh-certificate to use.]' \
+'(-sc --ssh)'{-sc,--ssh}'[SSH-connection-string, multiple.]' \
+'(-sa --ssh)'{-sa,--ssh}'[SSH connection arguments, used on every session.]' \
+'(-ts --tmux)'{-ts,--tmux}'[Alternative tmux-session-name, default: tmux-cssh]' \
+'(-ns --new)'{-ns,--new}'[Initializes a new session, like -ts \[name\].]' \
+'(-q --quiet)'{-q,--quiet}'[Quiet-mode.]' \
+'(-f --filename)'{-f,--filename}'[Filename of textfile to get -sc connection-strings from, line separated.]' \
+'(-cs --config)'{-cs,--config}'[Name of config-settings which should be get from config-file "$HOME/.tmux-cssh". Which can be a grep-regular expression to find the name(s).]' \
+ ':hosts:_hosts' \
+ '*:: :->subcmds' \
+ && return 0
+
+if (( CURRENT == 1 )); then
+ _describe -t commands "tmux-cssh command"
+ return
+fi
diff --git a/plugins/tugboat/_tugboat b/plugins/tugboat/_tugboat
new file mode 100644
index 000000000..6bf736920
--- /dev/null
+++ b/plugins/tugboat/_tugboat
@@ -0,0 +1,106 @@
+#compdef tugboat
+#autoload
+
+# Tugboat zsh autocompletion
+
+
+local -a _commands
+_commands=(
+ 'add-key:[NAME] Upload an ssh public key.'
+ 'authorize:Authorize a DigitalOcean account with tugboat.'
+ 'create:[NAME] Create a droplet.'
+ 'destroy:[FUZZY_NAME] Destroy a droplet.'
+ 'destroy_image:[FUZZY_NAME] Destroy an image.'
+ 'droplets:Retrieve a list of your droplets.'
+ 'halt:[FUZZY_NAME] Shutdown a droplet.'
+ 'help:[COMMAND] Describe commands or a specific command.'
+ 'images:Retrieve a list of your images.'
+ 'info:[FUZZY_NAME] [OPTIONS] Show a droplets information.'
+ 'info_image:[FUZZY_NAME] [OPTIONS] Show an images information.'
+ 'keys:Show available SSH keys.'
+ 'password-reset:[FUZZY_NAME] Reset root password.'
+ 'rebuild:[FUZZY_NAME] [IMAGE_NAME] Rebuild a droplet.'
+ 'regions:Show regions.'
+ 'resize:[FUZZY_NAME -s, --size=N] Resize a droplet.'
+ 'restart:[FUZZY_NAME] Restart a droplet.'
+ 'sizes:Show available droplet sizes.'
+ 'snapshot:[SNAPSHOT_NAME] [FUZZY_NAME] [OPTIONS] Queue a snapshot of the droplet.'
+ 'ssh:[FUZZY_NAME] SSH into a droplet.'
+ 'start:[FUZZY_NAME] Start a droplet.'
+ 'verify:Check your DigitalOcean credentials.'
+ 'version:Show version.'
+ 'wait:[FUZZY_NAME] Wait for a droplet to reach a state.'
+)
+
+local -a _create_arguments
+_create_arguments=(
+ '-s:[--size=N] The size_id of the droplet'
+ '-i:[--image=N] The image_id of the droplet'
+ '-r:[--region=N] The region_id of the droplet'
+ '-k:[--keys=KEYS] A comma separated list of SSH key ids to add to the droplet'
+ '-p:[--private-networking] Enable private networking on the droplet'
+ '-b:[--backups-enabled] Enable backups on the droplet'
+ '-q:[--quiet]'
+)
+
+__task_list ()
+{
+ local expl
+ declare -a tasks
+
+ arguments=(add-key authorize create destroy destroy_image droplets halt help images info info_image keys password-reset rebuild regions resize restart sizes snapshot ssh start verify version wait)
+
+ _wanted tasks expl 'help' compadd $arguments
+}
+
+__droplets_list ()
+{
+ _wanted application expl 'command' compadd $(command tugboat droplets | cut -d " " -f1)
+}
+
+__tugboat-create ()
+{
+ local curcontext="$curcontext" state line
+ typeset -A opt_args
+
+ _arguments -C \
+ ':command:->command' \
+ '*::options:->options'
+
+ case $state in
+ (command)
+ _describe -t commands "gem subcommand" _create_arguments
+ return
+ ;;
+ esac
+}
+
+local curcontext="$curcontext" state line
+typeset -A opt_args
+
+_arguments -C \
+ ':command:->command' \
+ '*::options:->options'
+
+case $state in
+ (command)
+ _describe -t commands "gem subcommand" _commands
+ return
+ ;;
+
+ (options)
+ case $line[1] in
+ (help)
+ _arguments ':feature:__task_list'
+ ;;
+
+ (ssh)
+ _arguments ':feature:__droplets_list'
+ ;;
+
+ (create)
+ _arguments ':feature:__tugboat-create'
+ ;;
+ esac
+ ;;
+esac
diff --git a/plugins/ubuntu/ubuntu.plugin.zsh b/plugins/ubuntu/ubuntu.plugin.zsh
index 0211d3374..f08853643 100644
--- a/plugins/ubuntu/ubuntu.plugin.zsh
+++ b/plugins/ubuntu/ubuntu.plugin.zsh
@@ -3,6 +3,7 @@
# https://github.com/dbb
# https://github.com/Mappleconfusers
# Nicolas Jonas nextgenthemes.com
+# https://github.com/loctauxphilippe
#
# Debian, Ubuntu and friends related zsh aliases and functions for zsh
@@ -28,6 +29,7 @@ compdef _ppap ppap='sudo ppa-purge'
alias ag='sudo apt-get' # age - but without sudo
alias aga='sudo apt-get autoclean' # aac
+alias agar='sudo apt-get autoremove'
alias agb='sudo apt-get build-dep' # abd
alias agc='sudo apt-get clean' # adc
alias agd='sudo apt-get dselect-upgrade' # ads
@@ -38,9 +40,11 @@ alias agu='sudo apt-get update' # ad
alias agud='sudo apt-get update && sudo apt-get dist-upgrade' #adu
alias agug='sudo apt-get upgrade' # ag
alias aguu='sudo apt-get update && sudo apt-get upgrade' #adg
+alias agar='sudo apt-get autoremove'
compdef _ag ag='sudo apt-get'
compdef _aga aga='sudo apt-get autoclean'
+compdef _agar agar='sudo apt-get autoremove'
compdef _agb agb='sudo apt-get build-dep'
compdef _agc agc='sudo apt-get clean'
compdef _agd agd='sudo apt-get dselect-upgrade'
@@ -51,6 +55,7 @@ compdef _agu agu='sudo apt-get update'
compdef _agud agud='sudo apt-get update && sudo apt-get dist-upgrade'
compdef _agug agug='sudo apt-get upgrade'
compdef _aguu aguu='sudo apt-get update && sudo apt-get upgrade'
+compdef _agar agar='sudo apt-get autoremove'
# Remove ALL kernel images and headers EXCEPT the one in use
alias kclean='sudo aptitude remove -P ?and(~i~nlinux-(ima|hea) \
@@ -65,7 +70,7 @@ alias mydeb='time dpkg-buildpackage -rfakeroot -us -uc'
# apt-add-repository with automatic install/upgrade of the desired package
# Usage: aar ppa:xxxxxx/xxxxxx [packagename]
-# If packagename is not given as 2nd arument the function will ask for it and guess the defaupt by taking
+# If packagename is not given as 2nd argument the function will ask for it and guess the default by taking
# the part after the / from the ppa name wich is sometimes the right name for the package you want to install
aar() {
if [ -n "$2" ]; then
diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant
index 76f80b0d7..764f89545 100644
--- a/plugins/vagrant/_vagrant
+++ b/plugins/vagrant/_vagrant
@@ -1,4 +1,4 @@
-#compdef vagrant
+#compdef vagrant
#autoload
# vagrant zsh completion
@@ -6,37 +6,45 @@
local -a _1st_arguments
_1st_arguments=(
'box:Box commands'
- 'connect:Connects to a shared, remote Vagrant environment'
+ 'connect:Connects to a remotely shared Vagrant environment'
'destroy:Destroys the vagrant environment'
- 'docker-logs:Shows Docker logs'
- 'docker-run:Run one-off commands against a Docker container'
+ 'docker-logs:Outputs the logs from the Docker container'
+ 'docker-run:Run a one-off command in the context of a container'
'global-status:Reports the status of all active Vagrant environments on the system'
'halt:Halts the currently running vagrant environment'
+ 'help:Shows the help for a subcommand'
'init:[box_name] [box_url] Initializes current folder for Vagrant usage'
+ 'list-commands:Outputs all available Vagrant subcommands, even non-primary ones'
'login:Authenticates against a Vagrant Cloud server to access protected boxes'
'package:Packages a vagrant environment for distribution'
'plugin:Plugin commands'
'provision:Run the provisioner'
+ 'push:Deploys code in this environment to a configured destination'
+ 'rdp:Connects to machine via RDP'
'reload:Reload the vagrant environment'
'resume:Resumes a suspend vagrant environment'
- 'share:Shares the Vagrant environment and allows remote access'
+ 'rsync:Syncs rsync synced folders to remote machine'
+ 'rsync-auto:Syncs rsync synced folders automatically when files change'
+ 'share:Shares your Vagrant environment with anyone in the world'
'ssh:SSH into the currently running environment'
- 'ssh-config:outputs .ssh/config valid syntax for connecting to this environment via ssh'
+ 'ssh-config:Outputs .ssh/config valid syntax for connecting to this environment via ssh'
'status:Shows the status of the current Vagrant environment'
'suspend:Suspends the currently running vagrant environment'
'up:Creates the vagrant environment'
- 'version:Prints the currently installed Vagrant version and checks for new updates'
+ 'version:Prints current and latest Vagrant version'
'--help:[TASK] Describe available tasks or one specific task'
'--version:Prints the Vagrant version information'
)
local -a _box_arguments
_box_arguments=(
- 'add:NAME URI Add a box to the system'
- 'help:COMMAND Describe subcommands or one specific subcommand'
+ 'add:ADDRESS Adds a box to the system'
+ 'help:COMMAND List subcommands'
'list:Lists all installed boxes'
- 'remove:NAME Remove a box from the system'
- 'repackage:NAME Repackage an installed box into a `.box` file.'
+ 'outdated:Checks if a box has newer version'
+ 'remove:NAME Removes a box from the system'
+ 'repackage:NAME PROVIDER VERSION Repackages an installed box into a `.box` file'
+ 'update:Updates box to a newer version, if available'
)
__task_list ()
@@ -78,7 +86,7 @@ __vagrant-box ()
(options)
case $line[1] in
(repackage|remove)
- _arguments ':feature:__box_list'
+ _arguments ':feature:__box_list'
;;
esac
;;
@@ -107,14 +115,14 @@ case $state in
(options)
case $line[1] in
(help)
- _arguments ':feature:__task_list'
+ _arguments ':feature:__task_list'
;;
(box)
__vagrant-box
;;
(up|provision|package|destroy|reload|ssh|ssh-config|halt|resume|status)
- _arguments ':feature:__vm_list'
+ _arguments ':feature:__vm_list'
esac
;;
esac
diff --git a/plugins/vault/README.md b/plugins/vault/README.md
new file mode 100644
index 000000000..0f61c9410
--- /dev/null
+++ b/plugins/vault/README.md
@@ -0,0 +1,18 @@
+## Vault (https://www.vaultproject.io) autocomplete plugin
+
+- Adds autocomplete options for all vault commands.
+
+####Show help for all commands
+![General Help](http://i.imgur.com/yv5Db1r.png "Help for all commands")
+
+
+####Create new Vault token
+![Create token](http://i.imgur.com/xMegNgh.png "Create token")
+
+
+####Enable audit backends
+![Audit backends](http://i.imgur.com/fKLeiSF.png "Audit backends")
+
+
+
+Crafted with <3 by Valentin Bud ([@valentinbud](https://twitter.com/valentinbud)) \ No newline at end of file
diff --git a/plugins/vault/_vault b/plugins/vault/_vault
new file mode 100644
index 000000000..c5338dffa
--- /dev/null
+++ b/plugins/vault/_vault
@@ -0,0 +1,400 @@
+#compdef vault
+
+typeset -a main_args
+main_args=(
+ '(-version)-version[Prints the Vault version]'
+ '(-help)-help[Prints Vault Help]'
+)
+
+typeset -a general_args
+general_args=(
+ '(-help)-help[Prints Help]'
+ '(-address)-address=-[The address of the Vault server. Overrides the VAULT_ADDR environment variable if set.]:address:'
+ '(-ca-cert)-ca-cert=-[Path to a PEM encoded CA cert file to use to verify the Vault server SSL certificate. Overrides the VAULT_CACERT environment variable if set.]:file:_files -g "*.pem"'
+ '(-ca-path)-ca-path=-[Path to a directory of PEM encoded CA cert files to verify the Vault server SSL certificate. If both -ca-cert and -ca-path are specified, -ca-path is used.Overrides the VAULT_CAPATH environment variable if set.]:directory:_directories'
+ '(-client-cert)-client-cert=-[Path to a PEM encoded client certificate for TLS authentication to the Vault server. Must also specify -client-key. Overrides the VAULT_CLIENT_CERT environment variable if set.]:file:_files -g "*.pem"'
+ '(-client-key)-client-key=-[Path to an unencrypted PEM encoded private key matching the client certificate from -client-cert. Overrides the VAULT_CLIENT_KEY environment variable if set.]:file:_files -g "*.pem"'
+ '(-tls-skip-verify)-tls-skip-verify[Do not verify TLS certificate. This is highly not recommended. Verification will also be skipped if VAULT_SKIP_VERIFY is set.]'
+)
+
+typeset -a audit_enable_args
+audit_enable_args=(
+ '(-description)-description=-[A human-friendly description for the backend. This shows up only when querying the enabled backends.]:description:'
+ '(-id)-id=-[Specify a unique ID for this audit backend. This is purely for referencing this audit backend. By default this will be the backend type.]:id:'
+)
+
+typeset -a auth_args
+auth_args=(
+ '(-method)-method=-[Outputs help for the authentication method with the given name for the remote server. If this authentication method is not available, exit with code 1.]:method:(cert ldap github userpass app-id)'
+ '(-method-help)-method-help[If set, the help for the selected method will be shown.]'
+ '(-methods)-methods[List the available auth methods.]'
+ '(-no-verify)-no-verify[Do not verify the token after creation; avoids a use count]'
+)
+
+typeset -a auth_enable_args
+auth_enable_args=(
+ '(-description)-description=-[Human-friendly description of the purpose for the auth provider. This shows up in the auth-list command.]:description:'
+ '(-path)-path=-[Mount point for the auth provider. This defaults to the type of the mount. This will make the auth provider available at "/auth/<path>"]:path:'
+)
+
+typeset -a init_args
+init_args=(
+ '(-key-shares)-key-shares=-[(default: 5) The number of key shares to split the master key into.]:keyshares:'
+ '(-key-threshold)-key-threshold=-[(default: 3) The number of key shares required to reconstruct the master key.]:keythreshold:'
+ '(-pgp-keys)-pgp-keys[If provided, must be a comma-separated list of files on disk containing binary- or base64-format public PGP keys. The number of files must match "key-shares". The output unseal keys will encrypted and hex-encoded, in order, with the given public keys. If you want to use them with the "vault unseal" command, you will need to hex decode and decrypt; this will be the plaintext unseal key.]:pgpkeys:_files'
+)
+
+typeset -a mount_tune_args
+mount_tune_args=(
+ '(-default-lease-ttl)-default-lease-ttl=-[Default lease time-to-live for this backend. If not specified, uses the system default, or the previously set value. Set to "system" to explicitly set it to use the system default.]:defaultleasettl:'
+ '(-max-lease-ttl)-max-lease-ttl=-[Max lease time-to-live for this backend. If not specified, uses the system default, or the previously set value. Set to "system" to explicitly set it to use the system default.]:maxleasettl:'
+)
+
+typeset -a mount_args
+mount_args=(
+ $mount_tune_args
+ '(-path)-path=-[Mount point for the logical backend. This defauls to the type of the mount.]:path:'
+ '(-description)-description=-[Human-friendly description of the purpose for the mount. This shows up in the mounts command.]:description:'
+)
+
+typeset -a rekey_args
+rekey_args=(
+ $init_args
+ '(-init)-init[Initialize the rekey operation by setting the desired number of shares and the key threshold. This can only be done if no rekey is already initiated.]:init:'
+ '(-cancel)-cancel[Reset the rekey process by throwing away prior keys and the rekey configuration.]:cancel:'
+ '(-status)-status[Prints the status of the current rekey operation. This can be used to see the status without attempting to provide an unseal key.]:status:'
+)
+
+typeset -a ssh_args
+ssh_args=(
+ '(-role)-role[Role to be used to create the key. ]:role:'
+ '(-no-exec)-no-exec[Shows the credentials but does not establish connection.]:noexec:'
+ '(-mount-point)-mount-point[Mount point of SSH backend. If the backend is mounted at "ssh", which is the default as well, this parameter can be skipped.]:mountpoint:'
+ '(-format)-format[If no-exec option is enabled, then the credentials will be printed out and SSH connection will not be established. The format of the output can be "json" or "table". JSON output is useful when writing scripts. Default is "table".]:format:(json table)'
+)
+
+typeset -a token_create_args
+token_create_args=(
+ '(-id)-id=-[The token value that clients will use to authenticate with vault. If not provided this defaults to a 36 character UUID. A root token is required to specify the ID of a token.]:id:'
+ '(-display-name)-display-name=-[A display name to associate with this token. This is a non-security sensitive value used to help identify created secrets, i.e. prefixes.]:displayname:'
+ '(-ttl)-ttl=-[TTL to associate with the token. This option enables the tokens to be renewable.]:ttl:'
+ '*-metadata=-[Metadata to associate with the token. This shows up in the audit log. This can be specified multiple times.]:metadata:'
+ '(-orphan)-orphan[If specified, the token will have no parent. Only root tokens can create orphan tokens. This prevents the new token from being revoked with your token.]:orphan:'
+ '(-no-default-policy)-no-default-policy[If specified, the token will not have the "default" policy included in its policy set.]:nodefaultpolicy:'
+ '*-policy=-[Policy to associate with this token. This can be specified multiple times.]:policy:__vault_policies'
+ '(-use-limit)-use-limit=-[The number of times this token can be used until it is automatically revoked.]:uselimit:'
+ '(-format)-format=-[The format for output. By default it is a whitespace-delimited table. This can also be json.]:format:(json table)'
+)
+
+typeset -a server_args
+server_args=(
+ '*-config=-[Path to the configuration file or directory. This can be specified multiple times. If it is a directory, all files with a ".hcl" or ".json" suffix will be loaded.]:config:_files'
+ '-dev[Enables Dev mode. In this mode, Vault is completely in-memory and unsealed. Do not run the Dev server in production!]:dev:'
+ '-log-level=-[Log verbosity. Defaults to "info", will be outputtedto stderr. Supported values: "trace", "debug", "info", "warn", "err"]:loglevel:(trace debug info warn err)'
+)
+
+_vault_audit-list() {
+ _arguments : \
+ ${general_args[@]} && ret=0
+}
+
+_vault_audit-disable() {
+ # vault audit-list doesn't print the backend id so for now
+ # no *smart* autocompletion for this subcommand.
+ _arguments : \
+ ${general_args[@]} \
+ ':::(file syslog)' && ret=0
+}
+
+_vault_audit-enable() {
+ _arguments : \
+ ${general_args[@]} \
+ ${audit_enable_args[@]} \
+ ': :->backends' \
+ '*:: :->backendconfig' && ret=0
+
+ case $state in
+ backends)
+ local -a backends
+ backends=(
+ 'file:The "file" audit backend writes audit logs to a file.'
+ 'syslog:The "syslog" audit backend writes audit logs to syslog.'
+ )
+ _describe -t backends 'vault audit backends' backends && ret=0
+ ;;
+ backendconfig)
+ case ${line[1]} in
+ file)
+ _values -w "Audit Backend File" \
+ 'path[(required) - The path to where the file will be written. If this path exists, the audit backend will append to it.]:file:_files' \
+ 'log_raw[(optional) Should security sensitive information be logged raw. Defaults to "false".]:log_raw:(true false)' && ret=0
+ ;;
+ syslog)
+ _values -w "Audit Backend Syslog" \
+ 'facility[(optional) - The syslog facility to use. Defaults to "AUTH".]:facility:(kern user mail daemon auth syslog lpr news uucp authpriv ftp cron local0 local1 local2 local3 local4 local5 local6 local7)' \
+ 'tag[(optional) - The syslog tag to use. Defaults to "vault".]:tag:' \
+ 'log_raw[(optional) Should security sensitive information be logged raw.]:log_raw:(true false)' && ret=0
+ ;;
+ esac
+ ;;
+ esac
+}
+
+_vault_auth() {
+ _arguments : \
+ ${general_args[@]} \
+ ${auth_args[@]} && ret=0
+}
+
+_vault_auth-enable() {
+ _arguments : \
+ ${general_args[@]} \
+ ${auth_enable_args[@]} \
+ ':::(cert ldap github userpass app-id)' && ret=0
+}
+
+__vault_auth_methods() {
+ local -a authmethods
+ authmethods=($(vault auth -methods | awk 'NR>1{split ($1,a,"/"); print a[1]":["$2"]"}'))
+ _describe -t authmethods 'authmethods' authmethods && ret=0
+}
+
+_vault_auth-disable() {
+ _arguments : \
+ ${general_args[@]} \
+ ':::__vault_auth_methods' && ret=0
+
+}
+
+_vault_init() {
+ _arguments : \
+ ${general_args[@]} \
+ ${init_args[@]} && ret=0
+}
+
+_vault_key-status() {
+ _arguments : \
+ ${general_args[@]} && ret=0
+}
+
+__vault_mounts() {
+ local -a mounts
+ mounts=($(vault mounts | awk 'NR>1{split ($1,a,"/"); print a[1]":["$2"]"}'))
+ _describe -t mounts 'mounts' mounts && ret=0
+}
+
+_vault_mounts() {
+ _arguments : \
+ ${general_args[@]} && ret=0
+}
+
+_vault_mount() {
+ # to find out how many types of backens are there
+ _arguments : \
+ ${general_args[@]} \
+ ${mount_args[@]} \
+ ':::(generic ssh)' && ret=0
+}
+
+_vault_mount-tune() {
+ _arguments : \
+ ${general_args[@]} \
+ ${mount_tune_args[@]} \
+ ':::__vault_mounts' && ret=0
+}
+
+_vault_unmount() {
+ _arguments : \
+ ${general_args[@]} \
+ ':::__vault_mounts' && ret=0
+}
+
+_vault_remount() {
+ _arguments : \
+ ${general_args[@]} \
+ ':::__vault_mounts' \
+ ':::' && ret=0
+}
+
+__vault_policies() {
+ local -a policies
+ policies=($(vault policies | awk '{print $1":["$1"]"}'))
+ _describe -t policies 'policies' policies && ret=0
+}
+
+_vault_policies() {
+ _arguments : \
+ ${general_args[@]} \
+ ':::__vault_policies' && ret=0
+}
+
+_vault_policy-delete() {
+ _arguments : \
+ ${general_args[@]} \
+ ':::__vault_policies' && ret=0
+}
+
+_vault_policy-write() {
+ _arguments : \
+ ${general_args[@]} \
+ ': ::' \
+ '::policy:_files' && ret=0
+}
+
+_vault_status() {
+ _arguments : \
+ ${general_args[@]} && ret=0
+}
+
+_vault_rekey() {
+ _arguments : \
+ ${general_args[@]} \
+ ${rekey_args[@]} \
+ ': ::' && ret=0
+}
+
+_vault_rotate() {
+ _arguments : \
+ ${general_args[@]} && ret=0
+}
+
+_vault_seal() {
+ _arguments : \
+ ${general_args[@]} && ret=0
+}
+
+_vault_ssh() {
+ _arguments : \
+ ${general_args[@]} \
+ ${ssh_args[@]} \
+ ': ::' && ret=0
+}
+
+_vault_token-create() {
+ _arguments : \
+ ${general_args[@]} \
+ ${token_create_args[@]} && ret=0
+}
+
+_vault_token-renew() {
+ _arguments : \
+ ${general_args[@]} \
+ '(-format)-format=-[The format for output. By default it is a whitespace-delimited table. This can also be json.]:format:(json table)' \
+ ': ::' \
+ ': ::' && ret=0
+}
+
+_vault_token-revoke() {
+ _arguments : \
+ ${general_args[@]} \
+ '(-mode)-mode=-[The type of revocation to do. See the documentation above for more information.]:mode:( orphan path)' \
+ ': ::' && ret=0
+}
+
+_vault_unseal() {
+ _arguments : \
+ ${general_args[@]} \
+ '(-reset)-reset[Reset the unsealing process by throwing away prior keys in process to unseal the vault.]:reset:' \
+ ': ::' && ret=0
+}
+
+_vault_version() {
+ # no args
+}
+
+_vault_delete() {
+ _arguments : \
+ ${general_args[@]} \
+ ': ::' && ret=0
+}
+
+_vault_path-help() {
+ _arguments : \
+ ${general_args[@]} \
+ ': ::' && ret=0
+}
+
+_vault_revoke() {
+ _arguments : \
+ ${general_args[@]} \
+ '(-format)-format=-[The format for output. By default it is a whitespace-delimited table. This can also be json.]:format:(json table)' \
+ ': ::' \
+ ': ::' && ret=0
+}
+
+_vault_server() {
+ _arguments : \
+ ${server_args[@]} && ret=0
+
+}
+
+_vault_write() {
+ _arguments : \
+ ${general_args[@]} \
+ '(-f -force)'{-f,-force}'[Force the write to continue without any data values specified. This allows writing to keys that do not need or expect any fields to be specified.]:force:' \
+ ': ::' \
+ ': ::' && ret=0
+}
+
+_vault_read() {
+ _arguments : \
+ ${general_args[@]} \
+ '(-format)-format=-[The format for output. By default it is a whitespace-delimited table. This can also be json.]:format:(json table)' \
+ '(-field)-field=-[If included, the raw value of the specified field will be output raw to stdout.]:field:' \
+ ': ::' && ret=0
+}
+
+_vault_commands() {
+ local -a commands
+
+ commands=(
+ "delete":"Delete operation on secrets in Vault"
+ "path-help":"Look up the help for a path"
+ "read":"Read data or secrets from Vault"
+ "renew":"Renew the lease of a secret"
+ "revoke":"Revoke a secret"
+ "server":"Start a Vault server"
+ "status":"Outputs status of whether Vault is sealed and if HA mode is enabled"
+ "write":"Write secrets or configuration into Vault"
+ "audit-disable":"Disable an audit backend"
+ "audit-enable":"Enable an audit backend"
+ "audit-list":"Lists enabled audit backends in Vault"
+ "auth":"Prints information about how to authenticate with Vault"
+ "auth-disable":"Disable an auth provider"
+ "auth-enable":"Enable a new auth provider"
+ "init":"Initialize a new Vault server"
+ "key-status":"Provides information about the active encryption key"
+ "mount":"Mount a logical backend"
+ "mount-tune":"Tune mount configuration parameters"
+ "mounts":"Lists mounted backends in Vault"
+ "policies":"List the policies on the server"
+ "policy-delete":"Delete a policy from the server"
+ "policy-write":"Write a policy to the server"
+ "rekey":"Rekeys Vault to generate new unseal keys"
+ "remount":"Remount a secret backend to a new path"
+ "rotate":"Rotates the backend encryption key used to persist data"
+ "seal":"Seals the vault server"
+ "ssh":"Initiate a SSH session"
+ "token-create":"Create a new auth token"
+ "token-renew":"Renew an auth token if there is an associated lease"
+ "token-revoke":"Revoke one or more auth tokens"
+ "unmount":"Unmount a secret backend"
+ "unseal":"Unseals the vault server"
+ "version":"Prints the Vault version"
+ )
+
+ _describe -t commands 'vault command' commands && ret=0
+}
+
+local curcontext=$curcontext ret=1
+_arguments : \
+ ${main_args[@]} \
+ '*:: :->subcommands' && ret=0
+if ((CURRENT == 1 )); then
+ _vault_commands && ret=0
+fi
+if [[ $state == subcommands ]]; then
+ # (( CURRENT -- ))
+ curcontext="${curcontext%:*:*}:vault-$words[1]:"
+ _call_function ret _vault_$words[1]
+fi
diff --git a/plugins/vi-mode/README.md b/plugins/vi-mode/README.md
new file mode 100644
index 000000000..8519a5592
--- /dev/null
+++ b/plugins/vi-mode/README.md
@@ -0,0 +1,75 @@
+vi-mode
+=======
+This plugin increase `vi-like` zsh functionality.
+
+Use `ESC` or `CTRL-[` to enter `Normal mode`.
+
+
+History
+-------
+
+- `ctrl-p` : Previous command in history
+- `ctrl-n` : Next command in history
+- `/` : Search backward in history
+- `n` : Repeat the last `/`
+
+
+Mode indicators
+---------------
+
+*Normal mode* is indicated with red `<<<` mark at the right prompt, when it
+wasn't defined by theme.
+
+
+Vim edition
+-----------
+
+- `v` : Edit current command line in Vim
+
+
+Movement
+--------
+
+- `$` : To the end of the line
+- `^` : To the first non-blank character of the line
+- `0` : To the first character of the line
+- `w` : [count] words forward
+- `W` : [count] WORDS forward
+- `e` : Forward to the end of word [count] inclusive
+- `E` : Forward to the end of WORD [count] inclusive
+- `b` : [count] words backward
+- `B` : [count] WORDS backward
+- `t{char}` : Till before [count]'th occurrence of {char} to the right
+- `T{char}` : Till before [count]'th occurrence of {char} to the left
+- `f{char}` : To [count]'th occurrence of {char} to the right
+- `F{char}` : To [count]'th occurrence of {char} to the left
+- `;` : Repeat latest f, t, F or T [count] times
+- `,` : Repeat latest f, t, F or T in opposite direction
+
+
+Insertion
+---------
+
+- `i` : Insert text before the cursor
+- `I` : Insert text before the first character in the line
+- `a` : Append text after the cursor
+- `A` : Append text at the end of the line
+- `o` : Insert new command line below the current one
+- `O` : Insert new command line above the current one
+
+
+Delete and Insert
+-----------------
+
+- `ctrl-h` : While in *Insert mode*: delete character before the cursor
+- `ctrl-w` : While in *Insert mode*: delete word before the cursor
+- `d{motion}` : Delete text that {motion} moves over
+- `dd` : Delete line
+- `D` : Delete characters under the cursor until the end of the line
+- `c{motion}` : Delete {motion} text and start insert
+- `cc` : Delete line and start insert
+- `C` : Delete to the end of the line and start insert
+- `r{char}` : Replace the character under the cursor with {char}
+- `R` : Enter replace mode: Each character replaces existing one
+- `x` : Delete [count] characters under and after the cursor
+- `X` : Delete [count] characters before the cursor
diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh
index 4424bb29a..0e2af5dce 100644
--- a/plugins/vi-mode/vi-mode.plugin.zsh
+++ b/plugins/vi-mode/vi-mode.plugin.zsh
@@ -1,15 +1,5 @@
-# Ensures that $terminfo values are valid and updates editor information when
-# the keymap changes.
-function zle-keymap-select zle-line-init zle-line-finish {
- # The terminal must be in application mode when ZLE is active for $terminfo
- # values to be valid.
- if (( ${+terminfo[smkx]} )); then
- printf '%s' ${terminfo[smkx]}
- fi
- if (( ${+terminfo[rmkx]} )); then
- printf '%s' ${terminfo[rmkx]}
- fi
-
+# Updates editor information when the keymap changes.
+function zle-keymap-select() {
zle reset-prompt
zle -R
}
@@ -19,8 +9,6 @@ TRAPWINCH() {
zle && { zle reset-prompt; zle -R }
}
-zle -N zle-line-init
-zle -N zle-line-finish
zle -N zle-keymap-select
zle -N edit-command-line
diff --git a/plugins/vim-interaction/vim-interaction.plugin.zsh b/plugins/vim-interaction/vim-interaction.plugin.zsh
index b0b9414cd..b774be342 100644
--- a/plugins/vim-interaction/vim-interaction.plugin.zsh
+++ b/plugins/vim-interaction/vim-interaction.plugin.zsh
@@ -4,17 +4,6 @@
# Derek Wyatt (derek@{myfirstnamemylastname}.org
#
-function resolveFile
-{
- if [ -f "$1" ]; then
- echo $(readlink -f "$1")
- elif [[ "${1#/}" == "$1" ]]; then
- echo "$PWD/$1"
- else
- echo $1
- fi
-}
-
function callvim
{
if [[ $# == 0 ]]; then
@@ -48,13 +37,10 @@ EOH
if [[ ${before#:} != $before && ${before%<cr>} == $before ]]; then
before="$before<cr>"
fi
- local files=""
- for f in $@
- do
- files="$files $(resolveFile $f)"
- done
- if [[ -n $files ]]; then
- files=':args! '"$files<cr>"
+ local files
+ if [[ $# -gt 0 ]]; then
+ # absolute path of files resolving symlinks (:A) and quoting special chars (:q)
+ files=':args! '"${@:A:q}<cr>"
fi
cmd="$before$files$after"
gvim --remote-send "$cmd"
diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
index 5faa1a823..6cd30732e 100644
--- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
+++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh
@@ -1,45 +1,63 @@
virtualenvwrapper='virtualenvwrapper.sh'
if (( $+commands[$virtualenvwrapper] )); then
- source ${${virtualenvwrapper}:c}
+ function {
+ setopt local_options
+ unsetopt equals
+ source ${${virtualenvwrapper}:c}
+ }
elif [[ -f "/etc/bash_completion.d/virtualenvwrapper" ]]; then
- virtualenvwrapper="/etc/bash_completion.d/virtualenvwrapper"
- source "/etc/bash_completion.d/virtualenvwrapper"
+ function {
+ setopt local_options
+ unsetopt equals
+ virtualenvwrapper="/etc/bash_completion.d/virtualenvwrapper"
+ source "/etc/bash_completion.d/virtualenvwrapper"
+ }
else
- print "zsh virtualenvwrapper plugin: Cannot find ${virtualenvwrapper}.\n"\
+ print "[oh-my-zsh] virtualenvwrapper plugin: Cannot find ${virtualenvwrapper}.\n"\
"Please install with \`pip install virtualenvwrapper\`" >&2
return
fi
if ! type workon &>/dev/null; then
- print "zsh virtualenvwrapper plugin: shell function 'workon' not defined.\n"\
+ print "[oh-my-zsh] virtualenvwrapper plugin: shell function 'workon' not defined.\n"\
"Please check ${virtualenvwrapper}" >&2
return
fi
if [[ "$WORKON_HOME" == "" ]]; then
- print "\$WORKON_HOME is not defined so ZSH plugin virtualenvwrapper will not work" >&2
+ print "[oh-my-zsh] \$WORKON_HOME is not defined so plugin virtualenvwrapper will not work" >&2
return
fi
if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
- # Automatically activate Git projects's virtual environments based on the
+ # Automatically activate Git projects or other customized virtualenvwrapper projects based on the
# directory name of the project. Virtual environment name can be overridden
- # by placing a .venv file in the project root with a virtualenv name in it
+ # by placing a .venv file in the project root with a virtualenv name in it.
function workon_cwd {
- if [ ! $WORKON_CWD ]; then
- WORKON_CWD=1
+ if [[ -z "$WORKON_CWD" ]]; then
+ local WORKON_CWD=1
# Check if this is a Git repo
- PROJECT_ROOT=`git rev-parse --show-toplevel 2> /dev/null`
- if (( $? != 0 )); then
+ local GIT_REPO_ROOT=""
+ local GIT_TOPLEVEL="$(git rev-parse --show-toplevel 2> /dev/null)"
+ if [[ $? == 0 ]]; then
+ GIT_REPO_ROOT="$GIT_TOPLEVEL"
+ fi
+ # Get absolute path, resolving symlinks
+ local PROJECT_ROOT="${PWD:A}"
+ while [[ "$PROJECT_ROOT" != "/" && ! -e "$PROJECT_ROOT/.venv" \
+ && ! -d "$PROJECT_ROOT/.git" && "$PROJECT_ROOT" != "$GIT_REPO_ROOT" ]]; do
+ PROJECT_ROOT="${PROJECT_ROOT:h}"
+ done
+ if [[ "$PROJECT_ROOT" == "/" ]]; then
PROJECT_ROOT="."
fi
# Check for virtualenv name override
if [[ -f "$PROJECT_ROOT/.venv" ]]; then
- ENV_NAME=`cat "$PROJECT_ROOT/.venv"`
+ ENV_NAME="$(cat "$PROJECT_ROOT/.venv")"
elif [[ -f "$PROJECT_ROOT/.venv/bin/activate" ]];then
ENV_NAME="$PROJECT_ROOT/.venv"
elif [[ "$PROJECT_ROOT" != "." ]]; then
- ENV_NAME=`basename "$PROJECT_ROOT"`
+ ENV_NAME="${PROJECT_ROOT:t}"
else
ENV_NAME=""
fi
@@ -57,8 +75,6 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then
# Note: this only happens if the virtualenv was activated automatically
deactivate && unset CD_VIRTUAL_ENV
fi
- unset PROJECT_ROOT
- unset WORKON_CWD
fi
}
diff --git a/plugins/vundle/vundle.plugin.zsh b/plugins/vundle/vundle.plugin.zsh
index 830774fe3..0f071597a 100644
--- a/plugins/vundle/vundle.plugin.zsh
+++ b/plugins/vundle/vundle.plugin.zsh
@@ -1,27 +1,27 @@
function vundle-init () {
- if [ ! -d ~/.vim/bundle/vundle/ ]
+ if [ ! -d ~/.vim/bundle/Vundle.vim/ ]
then
- mkdir -p ~/.vim/bundle/vundle/
+ mkdir -p ~/.vim/bundle/Vundle.vim/
fi
- if [ ! -d ~/.vim/bundle/vundle/.git ] && [ ! -f ~/.vim/bundle/vundle/.git ]
+ if [ ! -d ~/.vim/bundle/Vundle.vim/.git ] && [ ! -f ~/.vim/bundle/Vundle.vim/.git ]
then
- git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle
- echo "\n\tRead about vim configuration for vundle at https://github.com/gmarik/vundle\n"
+ git clone git://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim
+ echo "\n\tRead about vim configuration for vundle at https://github.com/VundleVim/Vundle.vim\n"
fi
}
function vundle () {
vundle-init
- vim -c "execute \"BundleInstall\" | q | q"
+ vim -c "execute \"PluginInstall\" | qa"
}
function vundle-update () {
vundle-init
- vim -c "execute \"BundleInstall!\" | q | q"
+ vim -c "execute \"PluginInstall!\" | qa"
}
function vundle-clean () {
vundle-init
- vim -c "execute \"BundleClean!\" | q | q"
+ vim -c "execute \"PluginClean!\" | qa"
}
diff --git a/plugins/wd/wd.sh b/plugins/wd/wd.sh
index 3b9548168..cf54713bd 100755
--- a/plugins/wd/wd.sh
+++ b/plugins/wd/wd.sh
@@ -8,7 +8,7 @@
# @github.com/mfaerevaag/wd
# version
-readonly WD_VERSION=0.4
+readonly WD_VERSION=0.4.2
# colors
readonly WD_BLUE="\033[96m"
@@ -143,7 +143,7 @@ wd_warp()
fi
elif [[ ${points[$point]} != "" ]]
then
- cd ${points[$point]}
+ cd ${points[$point]/#\~/$HOME}
else
wd_exit_fail "Unknown warp point '${point}'"
fi
@@ -169,7 +169,7 @@ wd_add()
elif [[ ${points[$2]} == "" ]] || $force
then
wd_remove $point > /dev/null
- printf "%q:%s\n" "${point}" "${PWD}" >> $WD_CONFIG
+ printf "%q:%s\n" "${point}" "${PWD/#$HOME/~}" >> $WD_CONFIG
wd_print_msg $WD_GREEN "Warp point added"
@@ -203,6 +203,21 @@ wd_list_all()
{
wd_print_msg $WD_BLUE "All warp points:"
+ entries=$(sed "s:${HOME}:~:g" $WD_CONFIG)
+
+ max_warp_point_length=0
+ while IFS= read -r line
+ do
+ arr=(${(s,:,)line})
+ key=${arr[1]}
+
+ length=${#key}
+ if [[ length -gt max_warp_point_length ]]
+ then
+ max_warp_point_length=$length
+ fi
+ done <<< $entries
+
while IFS= read -r line
do
if [[ $line != "" ]]
@@ -213,16 +228,16 @@ wd_list_all()
if [[ -z $wd_quiet_mode ]]
then
- printf "%20s -> %s\n" $key $val
+ printf "%${max_warp_point_length}s -> %s\n" $key $val
fi
fi
- done <<< $(sed "s:${HOME}:~:g" $WD_CONFIG)
+ done <<< $entries
}
wd_ls()
{
wd_getdir $1
- ls $dir
+ ls ${dir/#\~/$HOME}
}
wd_path()
@@ -248,6 +263,7 @@ wd_show()
local wd_matches
wd_matches=()
# do a reverse lookup to check whether PWD is in $points
+ PWD="${PWD/$HOME/~}"
if [[ ${points[(r)$PWD]} == $PWD ]]
then
for name in ${(k)points}
diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh
index 572427b0b..d3bf97d75 100644
--- a/plugins/web-search/web-search.plugin.zsh
+++ b/plugins/web-search/web-search.plugin.zsh
@@ -11,18 +11,11 @@ function web_search() {
yahoo "https://search.yahoo.com/search?p="
duckduckgo "https://www.duckduckgo.com/?q="
yandex "https://yandex.ru/yandsearch?text="
+ github "https://github.com/search?q="
+ baidu "https://www.baidu.com/s?wd="
+ ecosia "https://www.ecosia.org/search?q="
)
- # define the open command
- case "$OSTYPE" in
- darwin*) open_cmd="open" ;;
- cygwin*) open_cmd="cygstart" ;;
- linux*) open_cmd="xdg-open" ;;
- *) echo "Platform $OSTYPE not supported"
- return 1
- ;;
- esac
-
# check whether the search engine is supported
if [[ -z "$urls[$1]" ]]; then
echo "Search engine $1 not supported."
@@ -40,7 +33,7 @@ function web_search() {
url="${(j://:)${(s:/:)urls[$1]}[1,2]}"
fi
- nohup $open_cmd "$url" &>/dev/null
+ open_command "$url"
}
@@ -49,6 +42,9 @@ alias google='web_search google'
alias yahoo='web_search yahoo'
alias ddg='web_search duckduckgo'
alias yandex='web_search yandex'
+alias github='web_search github'
+alias baidu='web_search baidu'
+alias ecosia='web_search ecosia'
#add your own !bang searches here
alias wiki='web_search duckduckgo \!w'
diff --git a/plugins/wp-cli/README.md b/plugins/wp-cli/README.md
index 6dda07d17..1a79d60fc 100644
--- a/plugins/wp-cli/README.md
+++ b/plugins/wp-cli/README.md
@@ -43,7 +43,7 @@ WP-CLI is a set of command-line tools for managing WordPress installations. You
- wpps='search'
- wppst='status'
- wppt='toggle'
-- wppu='uninstall'
+- wppun='uninstall'
- wppu='update'
### Post
@@ -55,7 +55,7 @@ WP-CLI is a set of command-line tools for managing WordPress installations. You
- wppol='wp post list'
- wppom='wp post meta'
- wppou='wp post update'
-- wppou='wp post url'
+- wppourl='wp post url'
### Sidebar
- wpsbl='wp sidebar list'
diff --git a/plugins/wp-cli/wp-cli.plugin.zsh b/plugins/wp-cli/wp-cli.plugin.zsh
index 6c70a7a09..7b41c3257 100644
--- a/plugins/wp-cli/wp-cli.plugin.zsh
+++ b/plugins/wp-cli/wp-cli.plugin.zsh
@@ -63,7 +63,7 @@ alias wppp='wp plugin path'
alias wpps='wp plugin search'
alias wppst='wp plugin status'
alias wppt='wp plugin toggle'
-alias wppu='wp plugin uninstall'
+alias wppun='wp plugin uninstall'
alias wppu='wp plugin update'
# Post
@@ -75,7 +75,7 @@ alias wppog='wp post get'
alias wppol='wp post list'
alias wppom='wp post meta'
alias wppou='wp post update'
-alias wppou='wp post url'
+alias wppourl='wp post url'
# Rewrite
diff --git a/plugins/xcode/README.md b/plugins/xcode/README.md
new file mode 100644
index 000000000..15e657859
--- /dev/null
+++ b/plugins/xcode/README.md
@@ -0,0 +1,84 @@
+# Xcode
+
+## Description
+
+This plugin provides a few utilities that can help you on your daily use of Xcode and iOS development.
+
+To start using it, add the `xcode` plugin to your `plugins` array in `~/.zshrc`:
+
+```zsh
+plugins=(... xcode)
+```
+
+
+## Aliases
+
+| Alias | Description | Command |
+|-------|------------------------------------------|------------------------------------------------|
+| xcb | Build Xcode projects and workspaces | xcodebuild |
+| xcdd | Purge all temporary build information | rm -rf ~/Library/Developer/Xcode/DerivedData/* |
+| xcp | Show currently selected Xcode directory | xcode-select --print-path |
+| xcsel | Select different Xcode directory by path | sudo xcode-select --switch |
+
+
+
+## Functions
+
+### `xc`
+
+Opens the current directory in Xcode as an Xcode project. This will open one of the `.xcworkspace` and `.xcodeproj` files that it can find in the current working directory.
+Returns 1 if it didn't find any relevant files.
+
+### `simulator`
+
+Opens the iOS Simulator from your command line, dependent on whichever is the active developer directory for Xcode. (That is, it respects the `xcsel` setting.)
+
+### `xcselv`
+
+Selects different Xcode installations by version name. This is like `xcsel`, except it takes just a version name as an argument instead of the full path to the Xcode installation. Uses the naming conventions described below.
+
+* `xcselv <version>` selects a version
+ * Example: `xcselv 6.2`
+* `xcselv default` selects the default unversioned `Applications/Xcode.app`
+* `xcselv` with no argument lists the available Xcode versions in a human-readable format
+* `xcselv -l` lists the installed Xcode versions
+* `xcselv -L` lists the installed Xcode versions in a short version-name-only format
+* `xcselv -p` prints info about the active Xcode version
+* `xcselv -h` prints a help message
+
+The option parsing for `xcselv` is naive. Options may not be combined, and only the first option is recognized.
+
+## Multiple Xcode Versions
+
+The `xcselv` command provides support for switching between different Xcode installations using just a version number. Different Xcode versions are identified by file naming conventions.
+
+### Versioned Xcode Naming Conventions
+
+Apple does not seem to explicitly define or provide tooling support for a naming convention or other organizational mechanism for managing versioned Xcode installations. Apple seems to have released beta versions with both `Xcode<version>.app` and `Xcode-<version>.app` style names in the past, and both styles show up in forum and blog discussions.
+
+We've adopted the following naming convention:
+
+* Versioned Xcode installations are identified by the name `Xcode-<version>` or `Xcode<version>`.
+* The `-` separating `"Xcode"` and the version name is optional, and may be replaced by a space.
+* The versioned name may be applied to the `Xcode.app` itself, or a subdirectory underneath `Applications/` containing it.
+* You cannot version both the `Xcode.app` filename itself and the containing subfolder.
+* Thus, all of the following are equivalent.
+ * `Applications/Xcode-<version>.app`
+ * `Applications/Xcode-<version>/Xcode.app`
+ * `Applications/Xcode<version>.app`
+ * `Applications/Xcode <version>.app`
+ * `Applications/Xcode <version>/Xcode.app`
+* Both the system `/Applications/` and user `$HOME/Applications/` directories are searched.
+ * The user's `$HOME/Applications/` takes precedence over `/Applications` for a given version.
+ * If multiple naming variants within the same `Applications/` folder indicate the same version (for example, `Xcode-3.2.1.app`, `Xcode3.2.1.app`, and `Xcode-3.2.1/Xcode.app`), the precedence order is unspecified and implementation-dependent.
+* The `<version>` may be any string that is valid in a filename.
+* The special version name `"default"` refers to the "default" unversioned Xcode at `Applications/Xcode.app` (in either `/Applications/` or `$HOME/Applications/`).
+* Version names may not start with ``"-"`` or whitespace.
+
+The restrictions on the naming convention may need to be tightened in the future. In particular, if there are other well-known applications whose names begin with the string `"Xcode"`, the strings allowed for `<version>` may need to be restricted to avoid colliding with other applications. If there's evidence that one of these naming techniques is strongly favored either in practice or by Apple, we may tighten the naming convention to favor it.
+
+## Caveats
+
+Using `xcsel` or `xcselv` to select an Xcode that is installed under your `$HOME` may break things for other users, depending on your system setup. We let you do this anyway because some people run OS X as effectively single-user, or have open permissions so this will work. You could also use `$DEVELOPER_DIR` as an alternative to `xcsel` that is scoped to the current user or session, instead of a global setting.
+
+This does not verify that the version name in the Xcode filename matches the actual version of that binary. It is the user's responsibility to get the names right.
diff --git a/plugins/xcode/_xcselv b/plugins/xcode/_xcselv
new file mode 100644
index 000000000..f9861d54b
--- /dev/null
+++ b/plugins/xcode/_xcselv
@@ -0,0 +1,19 @@
+#compdef xcselv
+#autoload
+
+function _xcselv_compl_list_versions() {
+ _omz_xcode_list_versions short
+}
+
+_arguments \
+ '(-l -L -p)-h[prints a help message]' \
+ '(-L -p -h)-l[lists installed Xcode versions]' \
+ '(-l -p -h)-L[lists installed Xcode versions (long form)]' \
+ '(-h -l -L)-p[prints active Xcode version]' \
+ && ret=0
+
+local _xcode_versions
+_xcode_versions=($(_xcselv_compl_list_versions))
+_describe -t _xcode_versions 'version' _xcode_versions
+
+return 1
diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh
index 1d1205b80..0a2fa0839 100644
--- a/plugins/xcode/xcode.plugin.zsh
+++ b/plugins/xcode/xcode.plugin.zsh
@@ -1,25 +1,188 @@
-#xc function courtesy of http://gist.github.com/subdigital/5420709
+alias xcb='xcodebuild'
+alias xcdd='rm -rf ~/Library/Developer/Xcode/DerivedData/*'
+alias xcp='xcode-select --print-path'
+alias xcsel='sudo xcode-select --switch'
+
+# original author: @subdigital
+# source: http://gist.github.com/subdigital/5420709
function xc {
- xcode_proj=`ls | grep "\.xc" | sort -r | head -1`
- if [[ `echo -n $xcode_proj | wc -m` == 0 ]]
- then
+ local xcode_proj
+ xcode_proj=(*.{xcworkspace,xcodeproj}(N))
+
+ if [[ ${#xcode_proj} -eq 0 ]]; then
echo "No xcworkspace/xcodeproj file found in the current directory."
+ return 1
else
- echo "Found $xcode_proj"
- open "$xcode_proj"
+ echo "Found ${xcode_proj[1]}"
+ open "${xcode_proj[1]}"
fi
}
-function xcsel {
- sudo xcode-select --switch "$*"
+# "XCode-SELect by Version" - select Xcode by just version number
+# Uses naming convention:
+# - different versions of Xcode are named Xcode-<version>.app or stored
+# in a folder named Xcode-<version>
+# - the special version name "default" refers to the "default" Xcode.app with no suffix
+function xcselv {
+ emulate -L zsh
+ if [[ $# == 0 ]]; then
+ echo "xcselv: error: no option or argument given" >&2
+ echo "xcselv: see 'xcselv -h' for help" >&2
+ return 1
+ elif [[ $1 == "-p" ]]; then
+ _omz_xcode_print_active_version
+ return
+ elif [[ $1 == "-l" ]]; then
+ _omz_xcode_list_versions
+ return
+ elif [[ $1 == "-L" ]]; then
+ _omz_xcode_list_versions short
+ return
+ elif [[ $1 == "-h" ]]; then
+ _omz_xcode_print_xcselv_usage
+ return 0
+ elif [[ $1 == -* && $1 != "-" ]]; then
+ echo "xcselv: error: unrecognized option: $1" >&2
+ echo "xcselv: see 'xcselv -h' for help" >&2
+ return 1
+ fi
+ # Main case: "xcselv <version>" to select a version
+ local version=$1
+ local -A xcode_versions
+ _omz_xcode_locate_versions
+ if [[ -z ${xcode_versions[$version]} ]]; then
+ echo "xcselv: error: Xcode version '$version' not found" >&2
+ return 1
+ fi
+ app="${xcode_versions[$version]}"
+ echo "selecting Xcode $version: $app"
+ xcsel "$app"
}
-alias xcb='xcodebuild'
-alias xcp='xcode-select --print-path'
-alias xcdd='rm -rf ~/Library/Developer/Xcode/DerivedData/*'
+function _omz_xcode_print_xcselv_usage {
+ cat << EOF >&2
+Usage:
+ xcselv <version>
+ xcselv [options]
+
+Options:
+ <version> set the active Xcode version
+ -h print this help message and exit
+ -p print the active Xcode version
+ -l list installed Xcode versions (long human-readable form)
+ -L list installed Xcode versions (short form, version names only)
+EOF
+}
+
+# Parses the Xcode version from a filename based on our conventions
+# Only meaningful when called from other _omz_xcode functions
+function _omz_xcode_parse_versioned_file {
+ local file=$1
+ local basename=${app:t}
+ local dir=${app:h}
+ local parent=${dir:t}
+ #echo "parent=$parent basename=$basename verstr=$verstr ver=$ver" >&2
+ local verstr
+ if [[ $parent == Xcode* ]]; then
+ if [[ $basename == "Xcode.app" ]]; then
+ # "Xcode-<version>/Xcode.app" format
+ verstr=$parent
+ else
+ # Both file and parent dir are versioned. Reject.
+ return 1;
+ fi
+ elif [[ $basename == Xcode*.app ]]; then
+ # "Xcode-<version>.app" format
+ verstr=${basename:r}
+ else
+ # Invalid naming pattern
+ return 1;
+ fi
-if [[ -d $(xcode-select -p)/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app ]]; then
- alias simulator='open $(xcode-select -p)/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app'
-else
- alias simulator='open $(xcode-select -p)/Applications/iOS\ Simulator.app'
-fi
+ local ver=${verstr#Xcode}
+ ver=${ver#[- ]}
+ if [[ -z $ver ]]; then
+ # Unversioned "default" installation location
+ ver="default"
+ fi
+ print -- "$ver"
+}
+
+# Print the active version, using xcselv's notion of versions
+function _omz_xcode_print_active_version {
+ emulate -L zsh
+ local -A xcode_versions
+ local versions version active_path
+ _omz_xcode_locate_versions
+ active_path=$(xcode-select -p)
+ active_path=${active_path%%/Contents/Developer*}
+ versions=(${(kni)xcode_versions})
+ for version ($versions); do
+ if [[ "${xcode_versions[$version]}" == $active_path ]]; then
+ printf "%s (%s)\n" $version $active_path
+ return
+ fi
+ done
+ printf "%s (%s)\n" "<unknown>" $active_path
+}
+
+# Locates all the installed versions of Xcode on this system, for this
+# plugin's internal use.
+# Populates the $xcode_versions associative array variable
+# Caller should local-ize $xcode_versions with `local -A xcode_versions`
+function _omz_xcode_locate_versions {
+ emulate -L zsh
+ local -a app_dirs
+ local app_dir apps app xcode_ver
+ # In increasing precedence order:
+ app_dirs=(/Applications $HOME/Applications)
+ for app_dir ($app_dirs); do
+ apps=( $app_dir/Xcode*.app(N) $app_dir/Xcode*/Xcode.app(N) )
+ for app ($apps); do
+ xcode_ver=$(_omz_xcode_parse_versioned_file $app)
+ if [[ $? != 0 ]]; then
+ continue
+ fi
+ xcode_versions[$xcode_ver]=$app
+ done
+ done
+}
+
+function _omz_xcode_list_versions {
+ emulate -L zsh
+ local -A xcode_versions
+ _omz_xcode_locate_versions
+ local width=1 width_i versions do_short=0
+ if [[ $1 == "short" ]]; then
+ do_short=1
+ fi
+ versions=(${(kni)xcode_versions})
+ for version ($versions); do
+ if [[ $#version > $width ]]; then
+ width=$#version;
+ fi
+ done
+ for version ($versions); do
+ if [[ $do_short == 1 ]]; then
+ printf "%s\n" $version
+ else
+ printf "%-${width}s -> %s\n" "$version" "${xcode_versions[$version]}"
+ fi
+ done
+}
+
+function simulator {
+ local devfolder
+ devfolder="$(xcode-select -p)"
+
+ # Xcode ≤ 5.x
+ if [[ -d "${devfolder}/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app" ]]; then
+ open "${devfolder}/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app"
+ # Xcode ≥ 6.x
+ elif [[ -d "${devfolder}/Applications/iOS Simulator.app" ]]; then
+ open "${devfolder}/Applications/iOS Simulator.app"
+ # Xcode ≥ 7.x
+ else
+ open "${devfolder}/Applications/Simulator.app"
+ fi
+}
diff --git a/plugins/z/README b/plugins/z/README
index ec5abc6f5..7de82a4c7 100644
--- a/plugins/z/README
+++ b/plugins/z/README
@@ -6,7 +6,7 @@ NAME
z - jump around
SYNOPSIS
- z [-chlrt] [regex1 regex2 ... regexn]
+ z [-chlrtx] [regex1 regex2 ... regexn]
AVAILABILITY
bash, zsh
@@ -15,10 +15,13 @@ DESCRIPTION
Tracks your most used directories, based on 'frecency'.
After a short learning phase, z will take you to the most 'frecent'
- directory that matches ALL of the regexes given on the command line.
+ directory that matches ALL of the regexes given on the command line, in
+ order.
+
+ For example, z foo bar would match /foo/bar but not /bar/foo.
OPTIONS
- -c restrict matches to subdirectories of the current directory.
+ -c restrict matches to subdirectories of the current directory
-h show a brief help message
@@ -28,10 +31,12 @@ OPTIONS
-t match by recent access only
+ -x remove the current directory from the datafile
+
EXAMPLES
z foo cd to most frecent dir matching foo
- z foo bar cd to most frecent dir matching foo and bar
+ z foo bar cd to most frecent dir matching foo, then bar
z -r foo cd to highest ranked dir matching foo
@@ -55,8 +60,9 @@ NOTES
Set $_Z_NO_RESOLVE_SYMLINKS to prevent symlink resolution.
Set $_Z_NO_PROMPT_COMMAND to handle PROMPT_COMMAND/precmd your-
self.
- Set $_Z_EXCLUDE_DIRS to an array of directories to exclude.
- (These settings should go in .bashrc/.zshrc before the lines
+ Set $_Z_EXCLUDE_DIRS to an array of directory trees to exclude.
+ Set $_Z_OWNER to allow usage when in 'sudo -s' mode.
+ (These settings should go in .bashrc/.zshrc before the line
added above.)
Install the provided man page z.1 somewhere like
/usr/local/man/man1.
@@ -64,12 +70,12 @@ NOTES
Aging:
The rank of directories maintained by z undergoes aging based on a sim-
ple formula. The rank of each entry is incremented every time it is
- accessed. When the sum of ranks is greater than 6000, all ranks are
- multiplied by 0.99. Entries with a rank lower than 1 are forgotten.
+ accessed. When the sum of ranks is over 9000, all ranks are multiplied
+ by 0.99. Entries with a rank lower than 1 are forgotten.
Frecency:
- Frecency is a portmantaeu of 'recent' and 'frequency'. It is a weighted
- rank that depends on how often and how recently something occured. As
+ Frecency is a portmanteau of 'recent' and 'frequency'. It is a weighted
+ rank that depends on how often and how recently something occurred. As
far as I know, Mozilla came up with the term.
To z, a directory that has low ranking but has been accessed recently
@@ -107,20 +113,23 @@ ENVIRONMENT
resolving of symlinks. If it is not set, symbolic links will be
resolved when added to the datafile.
- In bash, z prepends a command to the PROMPT_COMMAND environment vari-
- able to maintain its database. In zsh, z appends a function _z_precmd
- to the precmd_functions array.
+ In bash, z appends a command to the PROMPT_COMMAND environment variable
+ to maintain its database. In zsh, z appends a function _z_precmd to the
+ precmd_functions array.
The environment variable $_Z_NO_PROMPT_COMMAND can be set if you want
to handle PROMPT_COMMAND or precmd yourself.
The environment variable $_Z_EXCLUDE_DIRS can be set to an array of
- directories to exclude from tracking. $HOME is always excluded. Direc-
- tories must be full paths without trailing slashes.
+ directory trees to exclude from tracking. $HOME is always excluded.
+ Directories must be full paths without trailing slashes.
+
+ The environment variable $_Z_OWNER can be set to your username, to
+ allow usage of z when your sudo enviroment keeps $HOME set.
FILES
- Data is stored in $HOME/.z. This can be overridden by setting the
- $_Z_DATA environment variable. When initialized, z will raise an error
+ Data is stored in $HOME/.z. This can be overridden by setting the
+ $_Z_DATA environment variable. When initialized, z will raise an error
if this path is a directory, and not function correctly.
A man page (z.1) is provided.
diff --git a/plugins/z/z.1 b/plugins/z/z.1
index 022a4b35d..cc99910bf 100644
--- a/plugins/z/z.1
+++ b/plugins/z/z.1
@@ -4,7 +4,7 @@ NAME
z \- jump around
.SH
SYNOPSIS
-z [\-chlrt] [regex1 regex2 ... regexn]
+z [\-chlrtx] [regex1 regex2 ... regexn]
.SH
AVAILABILITY
bash, zsh
@@ -13,12 +13,14 @@ DESCRIPTION
Tracks your most used directories, based on 'frecency'.
.P
After a short learning phase, \fBz\fR will take you to the most 'frecent'
-directory that matches ALL of the regexes given on the command line.
+directory that matches ALL of the regexes given on the command line, in order.
+
+For example, \fBz foo bar\fR would match \fB/foo/bar\fR but not \fB/bar/foo\fR.
.SH
OPTIONS
.TP
\fB\-c\fR
-restrict matches to subdirectories of the current directory.
+restrict matches to subdirectories of the current directory
.TP
\fB\-h\fR
show a brief help message
@@ -31,13 +33,16 @@ match by rank only
.TP
\fB\-t\fR
match by recent access only
+.TP
+\fB\-x\fR
+remove the current directory from the datafile
.SH EXAMPLES
.TP 14
\fBz foo\fR
cd to most frecent dir matching foo
.TP 14
\fBz foo bar\fR
-cd to most frecent dir matching foo and bar
+cd to most frecent dir matching foo, then bar
.TP 14
\fBz -r foo\fR
cd to highest ranked dir matching foo
@@ -76,10 +81,13 @@ Set \fB$_Z_NO_RESOLVE_SYMLINKS\fR to prevent symlink resolution.
Set \fB$_Z_NO_PROMPT_COMMAND\fR to handle \fBPROMPT_COMMAND/precmd\fR yourself.
.RE
.RS
-Set \fB$_Z_EXCLUDE_DIRS\fR to an array of directories to exclude.
+Set \fB$_Z_EXCLUDE_DIRS\fR to an array of directory trees to exclude.
+.RE
+.RS
+Set \fB$_Z_OWNER\fR to allow usage when in 'sudo -s' mode.
.RE
.RS
-(These settings should go in .bashrc/.zshrc before the lines added above.)
+(These settings should go in .bashrc/.zshrc before the line added above.)
.RE
.RS
Install the provided man page \fBz.1\fR somewhere like \fB/usr/local/man/man1\fR.
@@ -88,12 +96,12 @@ Install the provided man page \fBz.1\fR somewhere like \fB/usr/local/man/man1\fR
Aging:
The rank of directories maintained by \fBz\fR undergoes aging based on a simple
formula. The rank of each entry is incremented every time it is accessed. When
-the sum of ranks is greater than 6000, all ranks are multiplied by 0.99. Entries
-with a rank lower than 1 are forgotten.
+the sum of ranks is over 9000, all ranks are multiplied by 0.99. Entries with a
+rank lower than 1 are forgotten.
.SS
Frecency:
-Frecency is a portmantaeu of 'recent' and 'frequency'. It is a weighted rank
-that depends on how often and how recently something occured. As far as I
+Frecency is a portmanteau of 'recent' and 'frequency'. It is a weighted rank
+that depends on how often and how recently something occurred. As far as I
know, Mozilla came up with the term.
.P
To \fBz\fR, a directory that has low ranking but has been accessed recently
@@ -131,7 +139,7 @@ The environment variable \fB$_Z_NO_RESOLVE_SYMLINKS\fR can be set to prevent
resolving of symlinks. If it is not set, symbolic links will be resolved when
added to the datafile.
.P
-In bash, \fBz\fR prepends a command to the \fBPROMPT_COMMAND\fR environment
+In bash, \fBz\fR appends a command to the \fBPROMPT_COMMAND\fR environment
variable to maintain its database. In zsh, \fBz\fR appends a function
\fB_z_precmd\fR to the \fBprecmd_functions\fR array.
.P
@@ -139,8 +147,11 @@ The environment variable \fB$_Z_NO_PROMPT_COMMAND\fR can be set if you want to
handle \fBPROMPT_COMMAND\fR or \fBprecmd\fR yourself.
.P
The environment variable \fB$_Z_EXCLUDE_DIRS\fR can be set to an array of
-directories to exclude from tracking. \fB$HOME\fR is always excluded.
+directory trees to exclude from tracking. \fB$HOME\fR is always excluded.
Directories must be full paths without trailing slashes.
+.P
+The environment variable \fB$_Z_OWNER\fR can be set to your username, to
+allow usage of \fBz\fR when your sudo enviroment keeps \fB$HOME\fR set.
.SH
FILES
Data is stored in \fB$HOME/.z\fR. This can be overridden by setting the
diff --git a/plugins/z/z.plugin.zsh b/plugins/z/z.plugin.zsh
index 196b88b12..96abee890 100644
--- a/plugins/z/z.plugin.zsh
+++ b/plugins/z/z.plugin.zsh
@@ -1,6 +1 @@
-_load_z() {
- source $1/z.sh
-}
-
-[[ -f $ZSH_CUSTOM/plugins/z/z.plugin.zsh ]] && _load_z $ZSH_CUSTOM/plugins/z
-[[ -f $ZSH/plugins/z/z.plugin.zsh ]] && _load_z $ZSH/plugins/z
+source "${0:h}/z.sh"
diff --git a/plugins/z/z.sh b/plugins/z/z.sh
index 7e444ef46..d0eeb97ef 100644
--- a/plugins/z/z.sh
+++ b/plugins/z/z.sh
@@ -3,29 +3,25 @@
# maintains a jump-list of the directories you actually use
#
# INSTALL:
-# * put something like this in your .bashrc/.zshrc:
-# . /path/to/z.sh
-# * cd around for a while to build up the db
-# * PROFIT!!
-# * optionally:
-# set $_Z_CMD in .bashrc/.zshrc to change the command (default z).
-# set $_Z_DATA in .bashrc/.zshrc to change the datafile (default ~/.z).
-# set $_Z_NO_RESOLVE_SYMLINKS to prevent symlink resolution.
-# set $_Z_NO_PROMPT_COMMAND if you're handling PROMPT_COMMAND yourself.
-# set $_Z_EXCLUDE_DIRS to an array of directories to exclude.
+# * put something like this in your .bashrc/.zshrc:
+# . /path/to/z.sh
+# * cd around for a while to build up the db
+# * PROFIT!!
+# * optionally:
+# set $_Z_CMD in .bashrc/.zshrc to change the command (default z).
+# set $_Z_DATA in .bashrc/.zshrc to change the datafile (default ~/.z).
+# set $_Z_NO_RESOLVE_SYMLINKS to prevent symlink resolution.
+# set $_Z_NO_PROMPT_COMMAND if you're handling PROMPT_COMMAND yourself.
+# set $_Z_EXCLUDE_DIRS to an array of directories to exclude.
+# set $_Z_OWNER to your username if you want use z while sudo with $HOME kept
#
# USE:
-# * z foo # cd to most frecent dir matching foo
-# * z foo bar # cd to most frecent dir matching foo and bar
-# * z -r foo # cd to highest ranked dir matching foo
-# * z -t foo # cd to most recently accessed dir matching foo
-# * z -l foo # list matches instead of cd
-# * z -c foo # restrict matches to subdirs of $PWD
-
-case $- in
- *i*) ;;
- *) echo 'ERROR: z.sh is meant to be sourced, not directly executed.'
-esac
+# * z foo # cd to most frecent dir matching foo
+# * z foo bar # cd to most frecent dir matching foo and bar
+# * z -r foo # cd to highest ranked dir matching foo
+# * z -t foo # cd to most recently accessed dir matching foo
+# * z -l foo # list matches instead of cd
+# * z -c foo # restrict matches to subdirs of $PWD
[ -d "${_Z_DATA:-$HOME/.z}" ] && {
echo "ERROR: z.sh's datafile (${_Z_DATA:-$HOME/.z}) is a directory."
@@ -33,196 +29,215 @@ esac
_z() {
- local datafile="${_Z_DATA:-$HOME/.z}"
-
- # bail out if we don't own ~/.z (we're another user but our ENV is still set)
- [ -f "$datafile" -a ! -O "$datafile" ] && return
-
- # add entries
- if [ "$1" = "--add" ]; then
- shift
-
- # $HOME isn't worth matching
- [ "$*" = "$HOME" ] && return
-
- # don't track excluded dirs
- local exclude
- for exclude in "${_Z_EXCLUDE_DIRS[@]}"; do
- [ "$*" = "$exclude" ] && return
- done
-
- # maintain the file
- local tempfile
- tempfile="$(mktemp "$datafile.XXXXXX")" || return
- while read line; do
- [ -d "${line%%\|*}" ] && echo $line
- done < "$datafile" | awk -v path="$*" -v now="$(date +%s)" -F"|" '
- BEGIN {
- rank[path] = 1
- time[path] = now
- }
- $2 >= 1 {
- if( $1 == path ) {
- rank[$1] = $2 + 1
- time[$1] = now
- } else {
- rank[$1] = $2
- time[$1] = $3
- }
- count += $2
- }
- END {
- if( count > 6000 ) {
- for( i in rank ) print i "|" 0.99*rank[i] "|" time[i] # aging
- } else for( i in rank ) print i "|" rank[i] "|" time[i]
- }
- ' 2>/dev/null >| "$tempfile"
- if [ $? -ne 0 -a -f "$datafile" ]; then
- env rm -f "$tempfile"
- else
- env mv -f "$tempfile" "$datafile"
- fi
-
- # tab completion
- elif [ "$1" = "--complete" ]; then
- while read line; do
- [ -d "${line%%\|*}" ] && echo $line
- done < "$datafile" | awk -v q="$2" -F"|" '
- BEGIN {
- if( q == tolower(q) ) nocase = 1
- split(substr(q,3),fnd," ")
- }
- {
- if( nocase ) {
- for( i in fnd ) tolower($1) !~ tolower(fnd[i]) && $1 = ""
- } else {
- for( i in fnd ) $1 !~ fnd[i] && $1 = ""
- }
- if( $1 ) print $1
- }
- ' 2>/dev/null
-
- else
- # list/go
- while [ "$1" ]; do case "$1" in
- --) while [ "$1" ]; do shift; local fnd="$fnd $1";done;;
- -*) local opt=${1:1}; while [ "$opt" ]; do case ${opt:0:1} in
- c) local fnd="^$PWD $fnd";;
- h) echo "${_Z_CMD:-z} [-chlrt] args" >&2; return;;
- l) local list=1;;
- r) local typ="rank";;
- t) local typ="recent";;
- esac; opt=${opt:1}; done;;
- *) local fnd="$fnd $1";;
- esac; local last=$1; shift; done
- [ "$fnd" -a "$fnd" != "^$PWD " ] || local list=1
-
- # if we hit enter on a completion just go there
- case "$last" in
- # completions will always start with /
- /*) [ -z "$list" -a -d "$last" ] && cd "$last" && return;;
- esac
-
- # no file yet
- [ -f "$datafile" ] || return
-
- local cd
- cd="$(while read line; do
- [ -d "${line%%\|*}" ] && echo $line
- done < "$datafile" | awk -v t="$(date +%s)" -v list="$list" -v typ="$typ" -v q="$fnd" -F"|" '
- function frecent(rank, time) {
- dx = t-time
- if( dx < 3600 ) return rank*4
- if( dx < 86400 ) return rank*2
- if( dx < 604800 ) return rank/2
- return rank/4
- }
- function output(files, toopen, override) {
- if( list ) {
- cmd = "sort -n >&2"
- for( i in files ) if( files[i] ) printf "%-10s %s\n", files[i], i | cmd
- if( override ) printf "%-10s %s\n", "common:", override > "/dev/stderr"
- } else {
- if( override ) toopen = override
- print toopen
- }
- }
- function common(matches) {
- # shortest match
- for( i in matches ) {
- if( matches[i] && (!short || length(i) < length(short)) ) short = i
- }
- if( short == "/" ) return
- # shortest match must be common to each match. escape special characters in
- # a copy when testing, so we can return the original.
- clean_short = short
- gsub(/[\(\)\[\]\|]/, "\\\\&", clean_short)
- for( i in matches ) if( matches[i] && i !~ clean_short ) return
- return short
- }
- BEGIN { split(q, a, " "); oldf = noldf = -9999999999 }
- {
- if( typ == "rank" ) {
- f = $2
- } else if( typ == "recent" ) {
- f = $3-t
- } else f = frecent($2, $3)
- wcase[$1] = nocase[$1] = f
- for( i in a ) {
- if( $1 !~ a[i] ) delete wcase[$1]
- if( tolower($1) !~ tolower(a[i]) ) delete nocase[$1]
- }
- if( wcase[$1] && wcase[$1] > oldf ) {
- cx = $1
- oldf = wcase[$1]
- } else if( nocase[$1] && nocase[$1] > noldf ) {
- ncx = $1
- noldf = nocase[$1]
- }
- }
- END {
- if( cx ) {
- output(wcase, cx, common(wcase))
- } else if( ncx ) output(nocase, ncx, common(nocase))
- }
- ')"
- [ $? -gt 0 ] && return
- [ "$cd" ] && cd "$cd"
- fi
+ local datafile="${_Z_DATA:-$HOME/.z}"
+
+ # bail if we don't own ~/.z and $_Z_OWNER not set
+ [ -z "$_Z_OWNER" -a -f "$datafile" -a ! -O "$datafile" ] && return
+
+ # add entries
+ if [ "$1" = "--add" ]; then
+ shift
+
+ # $HOME isn't worth matching
+ [ "$*" = "$HOME" ] && return
+
+ # don't track excluded directory trees
+ local exclude
+ for exclude in "${_Z_EXCLUDE_DIRS[@]}"; do
+ case "$*" in "$exclude*") return;; esac
+ done
+
+ # maintain the data file
+ local tempfile="$datafile.$RANDOM"
+ while read line; do
+ # only count directories
+ [ -d "${line%%\|*}" ] && echo $line
+ done < "$datafile" | awk -v path="$*" -v now="$(date +%s)" -F"|" '
+ BEGIN {
+ rank[path] = 1
+ time[path] = now
+ }
+ $2 >= 1 {
+ # drop ranks below 1
+ if( $1 == path ) {
+ rank[$1] = $2 + 1
+ time[$1] = now
+ } else {
+ rank[$1] = $2
+ time[$1] = $3
+ }
+ count += $2
+ }
+ END {
+ if( count > 9000 ) {
+ # aging
+ for( x in rank ) print x "|" 0.99*rank[x] "|" time[x]
+ } else for( x in rank ) print x "|" rank[x] "|" time[x]
+ }
+ ' 2>/dev/null >| "$tempfile"
+ # do our best to avoid clobbering the datafile in a race condition
+ if [ $? -ne 0 -a -f "$datafile" ]; then
+ env rm -f "$tempfile"
+ else
+ [ "$_Z_OWNER" ] && chown $_Z_OWNER:$(id -ng $_Z_OWNER) "$tempfile"
+ env mv -f "$tempfile" "$datafile" || env rm -f "$tempfile"
+ fi
+
+ # tab completion
+ elif [ "$1" = "--complete" -a -s "$datafile" ]; then
+ while read line; do
+ [ -d "${line%%\|*}" ] && echo $line
+ done < "$datafile" | awk -v q="$2" -F"|" '
+ BEGIN {
+ if( q == tolower(q) ) imatch = 1
+ q = substr(q, 3)
+ gsub(" ", ".*", q)
+ }
+ {
+ if( imatch ) {
+ if( tolower($1) ~ tolower(q) ) print $1
+ } else if( $1 ~ q ) print $1
+ }
+ ' 2>/dev/null
+
+ else
+ # list/go
+ while [ "$1" ]; do case "$1" in
+ --) while [ "$1" ]; do shift; local fnd="$fnd${fnd:+ }$1";done;;
+ -*) local opt=${1:1}; while [ "$opt" ]; do case ${opt:0:1} in
+ c) local fnd="^$PWD $fnd";;
+ h) echo "${_Z_CMD:-z} [-chlrtx] args" >&2; return;;
+ x) sed -i -e "\:^${PWD}|.*:d" "$datafile";;
+ l) local list=1;;
+ r) local typ="rank";;
+ t) local typ="recent";;
+ esac; opt=${opt:1}; done;;
+ *) local fnd="$fnd${fnd:+ }$1";;
+ esac; local last=$1; [ "$#" -gt 0 ] && shift; done
+ [ "$fnd" -a "$fnd" != "^$PWD " ] || local list=1
+
+ # if we hit enter on a completion just go there
+ case "$last" in
+ # completions will always start with /
+ /*) [ -z "$list" -a -d "$last" ] && cd "$last" && return;;
+ esac
+
+ # no file yet
+ [ -f "$datafile" ] || return
+
+ local cd
+ cd="$(while read line; do
+ [ -d "${line%%\|*}" ] && echo $line
+ done < "$datafile" | awk -v t="$(date +%s)" -v list="$list" -v typ="$typ" -v q="$fnd" -F"|" '
+ function frecent(rank, time) {
+ # relate frequency and time
+ dx = t - time
+ if( dx < 3600 ) return rank * 4
+ if( dx < 86400 ) return rank * 2
+ if( dx < 604800 ) return rank / 2
+ return rank / 4
+ }
+ function output(files, out, common) {
+ # list or return the desired directory
+ if( list ) {
+ cmd = "sort -n >&2"
+ for( x in files ) {
+ if( files[x] ) printf "%-10s %s\n", files[x], x | cmd
+ }
+ if( common ) {
+ printf "%-10s %s\n", "common:", common > "/dev/stderr"
+ }
+ } else {
+ if( common ) out = common
+ print out
+ }
+ }
+ function common(matches) {
+ # find the common root of a list of matches, if it exists
+ for( x in matches ) {
+ if( matches[x] && (!short || length(x) < length(short)) ) {
+ short = x
+ }
+ }
+ if( short == "/" ) return
+ # use a copy to escape special characters, as we want to return
+ # the original. yeah, this escaping is awful.
+ clean_short = short
+ gsub(/\[\(\)\[\]\|\]/, "\\\\&", clean_short)
+ for( x in matches ) if( matches[x] && x !~ clean_short ) return
+ return short
+ }
+ BEGIN {
+ gsub(" ", ".*", q)
+ hi_rank = ihi_rank = -9999999999
+ }
+ {
+ if( typ == "rank" ) {
+ rank = $2
+ } else if( typ == "recent" ) {
+ rank = $3 - t
+ } else rank = frecent($2, $3)
+ if( $1 ~ q ) {
+ matches[$1] = rank
+ } else if( tolower($1) ~ tolower(q) ) imatches[$1] = rank
+ if( matches[$1] && matches[$1] > hi_rank ) {
+ best_match = $1
+ hi_rank = matches[$1]
+ } else if( imatches[$1] && imatches[$1] > ihi_rank ) {
+ ibest_match = $1
+ ihi_rank = imatches[$1]
+ }
+ }
+ END {
+ # prefer case sensitive
+ if( best_match ) {
+ output(matches, best_match, common(matches))
+ } else if( ibest_match ) {
+ output(imatches, ibest_match, common(imatches))
+ }
+ }
+ ')"
+ [ $? -gt 0 ] && return
+ [ "$cd" ] && cd "$cd"
+ fi
}
alias ${_Z_CMD:-z}='_z 2>&1'
[ "$_Z_NO_RESOLVE_SYMLINKS" ] || _Z_RESOLVE_SYMLINKS="-P"
-if compctl &> /dev/null; then
- [ "$_Z_NO_PROMPT_COMMAND" ] || {
- # zsh populate directory list, avoid clobbering any other precmds
- if [ "$_Z_NO_RESOLVE_SYMLINKS" ]; then
- _z_precmd() {
- _z --add "${PWD:a}"
+if type compctl >/dev/null 2>&1; then
+ # zsh
+ [ "$_Z_NO_PROMPT_COMMAND" ] || {
+ # populate directory list, avoid clobbering any other precmds.
+ if [ "$_Z_NO_RESOLVE_SYMLINKS" ]; then
+ _z_precmd() {
+ _z --add "${PWD:a}"
+ }
+ else
+ _z_precmd() {
+ _z --add "${PWD:A}"
+ }
+ fi
+ [[ -n "${precmd_functions[(r)_z_precmd]}" ]] || {
+ precmd_functions[$(($#precmd_functions+1))]=_z_precmd
+ }
+ }
+ _z_zsh_tab_completion() {
+ # tab completion
+ local compl
+ read -l compl
+ reply=(${(f)"$(_z --complete "$compl")"})
}
- else
- _z_precmd() {
- _z --add "${PWD:A}"
+ compctl -U -K _z_zsh_tab_completion _z
+elif type complete >/dev/null 2>&1; then
+ # bash
+ # tab completion
+ complete -o filenames -C '_z --complete "$COMP_LINE"' ${_Z_CMD:-z}
+ [ "$_Z_NO_PROMPT_COMMAND" ] || {
+ # populate directory list. avoid clobbering other PROMPT_COMMANDs.
+ grep "_z --add" <<< "$PROMPT_COMMAND" >/dev/null || {
+ PROMPT_COMMAND="$PROMPT_COMMAND"$'\n''_z --add "$(command pwd '$_Z_RESOLVE_SYMLINKS' 2>/dev/null)" 2>/dev/null;'
+ }
}
- fi
- precmd_functions+=(_z_precmd)
- }
- # zsh tab completion
- _z_zsh_tab_completion() {
- local compl
- read -l compl
- reply=(${(f)"$(_z --complete "$compl")"})
- }
- compctl -U -K _z_zsh_tab_completion _z
-elif complete &> /dev/null; then
- # bash tab completion
- complete -o filenames -C '_z --complete "$COMP_LINE"' ${_Z_CMD:-z}
- [ "$_Z_NO_PROMPT_COMMAND" ] || {
- # bash populate directory list. avoid clobbering other PROMPT_COMMANDs.
- echo $PROMPT_COMMAND | grep -q "_z --add" || {
- PROMPT_COMMAND='_z --add "$(pwd '$_Z_RESOLVE_SYMLINKS' 2>/dev/null)" 2>/dev/null;'"$PROMPT_COMMAND"
- }
- }
fi
diff --git a/plugins/zeus/README.md b/plugins/zeus/README.md
index 8964eaaec..451880049 100644
--- a/plugins/zeus/README.md
+++ b/plugins/zeus/README.md
@@ -42,12 +42,15 @@
* `zsw` aliases `rm .zeus.sock`
* `zweep` aliases `rm .zeus.sock`
-`zdbr` aliases `zeus rake db:reset db:test:prepare`
-`zdbreset` aliases `zeus rake db:reset db:test:prepare`
+* `zdbr` aliases `zeus rake db:reset db:test:prepare`
+* `zdbreset` aliases `zeus rake db:reset db:test:prepare`
-`zdbm` aliases `zeus rake db:migrate db:test:prepare`
-`zdbmigrate` aliases `zeus rake db:migrate db:test:prepare`
+* `zdbm` aliases `zeus rake db:migrate db:test:prepare`
+* `zdbmigrate` aliases `zeus rake db:migrate db:test:prepare`
-`zdbc` aliases `zeus rake db:create`
+* `zdbc` aliases `zeus rake db:create`
-`zdbcm` aliases `zeus rake db:create db:migrate db:test:prepare`
+* `zdbcm` aliases `zeus rake db:create db:migrate db:test:prepare`
+
+## Installation
+Add zeus to the plugins line of your `.zshconfig` file (e.g. `plugins=(rails git zeus)`)
diff --git a/plugins/zeus/zeus.plugin.zsh b/plugins/zeus/zeus.plugin.zsh
index 5ec9fa579..0c01083a5 100644
--- a/plugins/zeus/zeus.plugin.zsh
+++ b/plugins/zeus/zeus.plugin.zsh
@@ -19,8 +19,8 @@ alias zsr='zeus server'
alias zerver='zeus server'
# Rake
-alias zr='zeus rake'
-alias zake='zeus rake'
+alias zr='noglob zeus rake'
+alias zake='noglob zeus rake'
# Generate
alias zg='zeus generate'
diff --git a/plugins/zsh-navigation-tools/.config/znt/README.txt b/plugins/zsh-navigation-tools/.config/znt/README.txt
new file mode 100644
index 000000000..c3d6c821a
--- /dev/null
+++ b/plugins/zsh-navigation-tools/.config/znt/README.txt
@@ -0,0 +1 @@
+These are skeletons, configuration is read from ~/.config/znt/*
diff --git a/plugins/zsh-navigation-tools/.config/znt/n-aliases.conf b/plugins/zsh-navigation-tools/.config/znt/n-aliases.conf
new file mode 100644
index 000000000..98f4625f1
--- /dev/null
+++ b/plugins/zsh-navigation-tools/.config/znt/n-aliases.conf
@@ -0,0 +1,5 @@
+# How should be current element of the list drawn. Possible values: reverse,
+# underline. Default (without option set) is reverse
+# On Linux virtual terminal this will be enforced to reverse (because of poor
+# underline support on that terminal)
+# local active_text=underline
diff --git a/plugins/zsh-navigation-tools/.config/znt/n-cd.conf b/plugins/zsh-navigation-tools/.config/znt/n-cd.conf
new file mode 100644
index 000000000..7ed7828ea
--- /dev/null
+++ b/plugins/zsh-navigation-tools/.config/znt/n-cd.conf
@@ -0,0 +1,26 @@
+# Hotlist
+# Try to use $ZSH_VERSION, e.g. /usr/share/zsh/$ZSH_VERSION/functions
+local hotlist
+hotlist=(
+ ~/.config/znt
+ /usr/share/zsh/site-functions
+ /usr/share/zsh
+ /usr/local/share/zsh/site-functions
+ /usr/local/share/zsh
+ /usr/local/bin
+)
+
+# Suppress adding (to directory stack) directories visited by n-cd
+# Value 0 is the default (directories will be added to dirstack)
+local NCD_DONT_PUSHD=0
+
+# How should be current element of the list drawn. Possible values: reverse,
+# underline. Default (without option set) is reverse
+# On Linux virtual terminal this will be enforced to reverse (because of poor
+# underline support on that terminal)
+# local active_text=underline
+
+# Colorize last segments of the paths
+# (#s) is ^, (#e) is $, # is *, ## is + (comparing to regex)
+local NLIST_COLORING_PATTERN="[a-zA-Z0-9 ._-]##/#(#e)"
+local NLIST_COLORING_COLOR=$'\x1b[00;33m'
diff --git a/plugins/zsh-navigation-tools/.config/znt/n-env.conf b/plugins/zsh-navigation-tools/.config/znt/n-env.conf
new file mode 100644
index 000000000..0c4bdce64
--- /dev/null
+++ b/plugins/zsh-navigation-tools/.config/znt/n-env.conf
@@ -0,0 +1,9 @@
+# How should be current element of the list drawn. Possible values: reverse,
+# underline. Default (without option set) is reverse
+# On Linux virtual terminal this will be enforced to reverse (because of poor
+# underline support on that terminal)
+# local active_text=underline
+
+# (#s) is ^, (#e) is $, # is *, ## is + (comparing to regex)
+local NLIST_COLORING_PATTERN="[a-zA-Z0-9_]##"
+local NLIST_COLORING_MATCH_MULTIPLE=0
diff --git a/plugins/zsh-navigation-tools/.config/znt/n-functions.conf b/plugins/zsh-navigation-tools/.config/znt/n-functions.conf
new file mode 100644
index 000000000..93d31e8fd
--- /dev/null
+++ b/plugins/zsh-navigation-tools/.config/znt/n-functions.conf
@@ -0,0 +1,10 @@
+# Which editor to use, zed or vared
+# vared is the default
+local feditor="zed"
+# local feditor="vared"
+
+# How should be current element of the list drawn. Possible values: reverse,
+# underline. Default (without option set) is reverse
+# On Linux virtual terminal this will be enforced to reverse (because of poor
+# underline support on that terminal)
+# local active_text=underline
diff --git a/plugins/zsh-navigation-tools/.config/znt/n-history.conf b/plugins/zsh-navigation-tools/.config/znt/n-history.conf
new file mode 100644
index 000000000..5d4bad822
--- /dev/null
+++ b/plugins/zsh-navigation-tools/.config/znt/n-history.conf
@@ -0,0 +1,10 @@
+# How should be current element of the list drawn. Possible values: reverse,
+# underline. Default (without option set) is reverse
+# On Linux virtual terminal this will be enforced to reverse (because of poor
+# underline support on that terminal)
+local active_text=underline
+
+# Highlight a few keywords
+local NLIST_COLORING_PATTERN="(while|for |sudo|make|(#s)git|vim(#e)|vim |emacs(#e)|emacs )"
+local NLIST_COLORING_COLOR=$'\x1b[00;33m'
+local NLIST_COLORING_MATCH_MULTIPLE=1
diff --git a/plugins/zsh-navigation-tools/.config/znt/n-kill.conf b/plugins/zsh-navigation-tools/.config/znt/n-kill.conf
new file mode 100644
index 000000000..f1c4f02da
--- /dev/null
+++ b/plugins/zsh-navigation-tools/.config/znt/n-kill.conf
@@ -0,0 +1,13 @@
+# How should be current element of the list drawn. Possible values: reverse,
+# underline. Default (without option set) is reverse
+# On Linux virtual terminal this will be enforced to reverse (because of poor
+# underline support on that terminal)
+# local active_text=underline
+
+# Colorize first number column and last path segment
+# This doesn't cover scripts named "[0-9]## *", which should be very rare
+# (#s) is ^, (#e) is $, # is *, ## is + (comparing to regex)
+# | is alternative, but only in ()
+local NLIST_COLORING_PATTERN="((#s) #[0-9]## |[[][^]]#](#e)|[^ 0-9/?\\\\][^/\\\\]#(#e)|[^ /\\\\]##[^0-9/\\\\ ]##[^/\\\\]#(#e))"
+local NLIST_COLORING_COLOR=$'\x1b[00;33m'
+local NLIST_COLORING_MATCH_MULTIPLE=1
diff --git a/plugins/zsh-navigation-tools/.config/znt/n-list.conf b/plugins/zsh-navigation-tools/.config/znt/n-list.conf
new file mode 100644
index 000000000..cf9d2a3be
--- /dev/null
+++ b/plugins/zsh-navigation-tools/.config/znt/n-list.conf
@@ -0,0 +1,3 @@
+# Should the list (text, borders) be drawn in bold
+# Value 1 is the default
+local bold=1
diff --git a/plugins/zsh-navigation-tools/.config/znt/n-options.conf b/plugins/zsh-navigation-tools/.config/znt/n-options.conf
new file mode 100644
index 000000000..98f4625f1
--- /dev/null
+++ b/plugins/zsh-navigation-tools/.config/znt/n-options.conf
@@ -0,0 +1,5 @@
+# How should be current element of the list drawn. Possible values: reverse,
+# underline. Default (without option set) is reverse
+# On Linux virtual terminal this will be enforced to reverse (because of poor
+# underline support on that terminal)
+# local active_text=underline
diff --git a/plugins/zsh-navigation-tools/.config/znt/n-panelize.conf b/plugins/zsh-navigation-tools/.config/znt/n-panelize.conf
new file mode 100644
index 000000000..98f4625f1
--- /dev/null
+++ b/plugins/zsh-navigation-tools/.config/znt/n-panelize.conf
@@ -0,0 +1,5 @@
+# How should be current element of the list drawn. Possible values: reverse,
+# underline. Default (without option set) is reverse
+# On Linux virtual terminal this will be enforced to reverse (because of poor
+# underline support on that terminal)
+# local active_text=underline
diff --git a/plugins/zsh-navigation-tools/LICENSE b/plugins/zsh-navigation-tools/LICENSE
new file mode 100644
index 000000000..075c80ccd
--- /dev/null
+++ b/plugins/zsh-navigation-tools/LICENSE
@@ -0,0 +1,700 @@
+This software is dual-licensed under MIT and GPLv3.
+
+MIT License
+-----------
+
+Permission is hereby granted, free of charge, to any person obtaining a copy
+of this software and associated documentation files (the "Software"), to deal
+in the Software without restriction, including without limitation the rights
+to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
+copies of the Software, and to permit persons to whom the Software is
+furnished to do so, subject to the following conditions:
+
+The above copyright notice and this permission notice shall be included in
+all copies or substantial portions of the Software.
+
+THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
+IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
+FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
+AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
+LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
+OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
+THE SOFTWARE.
+
+GPLv3 License
+--------------
+
+ GNU GENERAL PUBLIC LICENSE
+ Version 3, 29 June 2007
+
+ Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
+ Everyone is permitted to copy and distribute verbatim copies
+ of this license document, but changing it is not allowed.
+
+ Preamble
+
+ The GNU General Public License is a free, copyleft license for
+software and other kinds of works.
+
+ The licenses for most software and other practical works are designed
+to take away your freedom to share and change the works. By contrast,
+the GNU General Public License is intended to guarantee your freedom to
+share and change all versions of a program--to make sure it remains free
+software for all its users. We, the Free Software Foundation, use the
+GNU General Public License for most of our software; it applies also to
+any other work released this way by its authors. You can apply it to
+your programs, too.
+
+ When we speak of free software, we are referring to freedom, not
+price. Our General Public Licenses are designed to make sure that you
+have the freedom to distribute copies of free software (and charge for
+them if you wish), that you receive source code or can get it if you
+want it, that you can change the software or use pieces of it in new
+free programs, and that you know you can do these things.
+
+ To protect your rights, we need to prevent others from denying you
+these rights or asking you to surrender the rights. Therefore, you have
+certain responsibilities if you distribute copies of the software, or if
+you modify it: responsibilities to respect the freedom of others.
+
+ For example, if you distribute copies of such a program, whether
+gratis or for a fee, you must pass on to the recipients the same
+freedoms that you received. You must make sure that they, too, receive
+or can get the source code. And you must show them these terms so they
+know their rights.
+
+ Developers that use the GNU GPL protect your rights with two steps:
+(1) assert copyright on the software, and (2) offer you this License
+giving you legal permission to copy, distribute and/or modify it.
+
+ For the developers' and authors' protection, the GPL clearly explains
+that there is no warranty for this free software. For both users' and
+authors' sake, the GPL requires that modified versions be marked as
+changed, so that their problems will not be attributed erroneously to
+authors of previous versions.
+
+ Some devices are designed to deny users access to install or run
+modified versions of the software inside them, although the manufacturer
+can do so. This is fundamentally incompatible with the aim of
+protecting users' freedom to change the software. The systematic
+pattern of such abuse occurs in the area of products for individuals to
+use, which is precisely where it is most unacceptable. Therefore, we
+have designed this version of the GPL to prohibit the practice for those
+products. If such problems arise substantially in other domains, we
+stand ready to extend this provision to those domains in future versions
+of the GPL, as needed to protect the freedom of users.
+
+ Finally, every program is threatened constantly by software patents.
+States should not allow patents to restrict development and use of
+software on general-purpose computers, but in those that do, we wish to
+avoid the special danger that patents applied to a free program could
+make it effectively proprietary. To prevent this, the GPL assures that
+patents cannot be used to render the program non-free.
+
+ The precise terms and conditions for copying, distribution and
+modification follow.
+
+ TERMS AND CONDITIONS
+
+ 0. Definitions.
+
+ "This License" refers to version 3 of the GNU General Public License.
+
+ "Copyright" also means copyright-like laws that apply to other kinds of
+works, such as semiconductor masks.
+
+ "The Program" refers to any copyrightable work licensed under this
+License. Each licensee is addressed as "you". "Licensees" and
+"recipients" may be individuals or organizations.
+
+ To "modify" a work means to copy from or adapt all or part of the work
+in a fashion requiring copyright permission, other than the making of an
+exact copy. The resulting work is called a "modified version" of the
+earlier work or a work "based on" the earlier work.
+
+ A "covered work" means either the unmodified Program or a work based
+on the Program.
+
+ To "propagate" a work means to do anything with it that, without
+permission, would make you directly or secondarily liable for
+infringement under applicable copyright law, except executing it on a
+computer or modifying a private copy. Propagation includes copying,
+distribution (with or without modification), making available to the
+public, and in some countries other activities as well.
+
+ To "convey" a work means any kind of propagation that enables other
+parties to make or receive copies. Mere interaction with a user through
+a computer network, with no transfer of a copy, is not conveying.
+
+ An interactive user interface displays "Appropriate Legal Notices"
+to the extent that it includes a convenient and prominently visible
+feature that (1) displays an appropriate copyright notice, and (2)
+tells the user that there is no warranty for the work (except to the
+extent that warranties are provided), that licensees may convey the
+work under this License, and how to view a copy of this License. If
+the interface presents a list of user commands or options, such as a
+menu, a prominent item in the list meets this criterion.
+
+ 1. Source Code.
+
+ The "source code" for a work means the preferred form of the work
+for making modifications to it. "Object code" means any non-source
+form of a work.
+
+ A "Standard Interface" means an interface that either is an official
+standard defined by a recognized standards body, or, in the case of
+interfaces specified for a particular programming language, one that
+is widely used among developers working in that language.
+
+ The "System Libraries" of an executable work include anything, other
+than the work as a whole, that (a) is included in the normal form of
+packaging a Major Component, but which is not part of that Major
+Component, and (b) serves only to enable use of the work with that
+Major Component, or to implement a Standard Interface for which an
+implementation is available to the public in source code form. A
+"Major Component", in this context, means a major essential component
+(kernel, window system, and so on) of the specific operating system
+(if any) on which the executable work runs, or a compiler used to
+produce the work, or an object code interpreter used to run it.
+
+ The "Corresponding Source" for a work in object code form means all
+the source code needed to generate, install, and (for an executable
+work) run the object code and to modify the work, including scripts to
+control those activities. However, it does not include the work's
+System Libraries, or general-purpose tools or generally available free
+programs which are used unmodified in performing those activities but
+which are not part of the work. For example, Corresponding Source
+includes interface definition files associated with source files for
+the work, and the source code for shared libraries and dynamically
+linked subprograms that the work is specifically designed to require,
+such as by intimate data communication or control flow between those
+subprograms and other parts of the work.
+
+ The Corresponding Source need not include anything that users
+can regenerate automatically from other parts of the Corresponding
+Source.
+
+ The Corresponding Source for a work in source code form is that
+same work.
+
+ 2. Basic Permissions.
+
+ All rights granted under this License are granted for the term of
+copyright on the Program, and are irrevocable provided the stated
+conditions are met. This License explicitly affirms your unlimited
+permission to run the unmodified Program. The output from running a
+covered work is covered by this License only if the output, given its
+content, constitutes a covered work. This License acknowledges your
+rights of fair use or other equivalent, as provided by copyright law.
+
+ You may make, run and propagate covered works that you do not
+convey, without conditions so long as your license otherwise remains
+in force. You may convey covered works to others for the sole purpose
+of having them make modifications exclusively for you, or provide you
+with facilities for running those works, provided that you comply with
+the terms of this License in conveying all material for which you do
+not control copyright. Those thus making or running the covered works
+for you must do so exclusively on your behalf, under your direction
+and control, on terms that prohibit them from making any copies of
+your copyrighted material outside their relationship with you.
+
+ Conveying under any other circumstances is permitted solely under
+the conditions stated below. Sublicensing is not allowed; section 10
+makes it unnecessary.
+
+ 3. Protecting Users' Legal Rights From Anti-Circumvention Law.
+
+ No covered work shall be deemed part of an effective technological
+measure under any applicable law fulfilling obligations under article
+11 of the WIPO copyright treaty adopted on 20 December 1996, or
+similar laws prohibiting or restricting circumvention of such
+measures.
+
+ When you convey a covered work, you waive any legal power to forbid
+circumvention of technological measures to the extent such circumvention
+is effected by exercising rights under this License with respect to
+the covered work, and you disclaim any intention to limit operation or
+modification of the work as a means of enforcing, against the work's
+users, your or third parties' legal rights to forbid circumvention of
+technological measures.
+
+ 4. Conveying Verbatim Copies.
+
+ You may convey verbatim copies of the Program's source code as you
+receive it, in any medium, provided that you conspicuously and
+appropriately publish on each copy an appropriate copyright notice;
+keep intact all notices stating that this License and any
+non-permissive terms added in accord with section 7 apply to the code;
+keep intact all notices of the absence of any warranty; and give all
+recipients a copy of this License along with the Program.
+
+ You may charge any price or no price for each copy that you convey,
+and you may offer support or warranty protection for a fee.
+
+ 5. Conveying Modified Source Versions.
+
+ You may convey a work based on the Program, or the modifications to
+produce it from the Program, in the form of source code under the
+terms of section 4, provided that you also meet all of these conditions:
+
+ a) The work must carry prominent notices stating that you modified
+ it, and giving a relevant date.
+
+ b) The work must carry prominent notices stating that it is
+ released under this License and any conditions added under section
+ 7. This requirement modifies the requirement in section 4 to
+ "keep intact all notices".
+
+ c) You must license the entire work, as a whole, under this
+ License to anyone who comes into possession of a copy. This
+ License will therefore apply, along with any applicable section 7
+ additional terms, to the whole of the work, and all its parts,
+ regardless of how they are packaged. This License gives no
+ permission to license the work in any other way, but it does not
+ invalidate such permission if you have separately received it.
+
+ d) If the work has interactive user interfaces, each must display
+ Appropriate Legal Notices; however, if the Program has interactive
+ interfaces that do not display Appropriate Legal Notices, your
+ work need not make them do so.
+
+ A compilation of a covered work with other separate and independent
+works, which are not by their nature extensions of the covered work,
+and which are not combined with it such as to form a larger program,
+in or on a volume of a storage or distribution medium, is called an
+"aggregate" if the compilation and its resulting copyright are not
+used to limit the access or legal rights of the compilation's users
+beyond what the individual works permit. Inclusion of a covered work
+in an aggregate does not cause this License to apply to the other
+parts of the aggregate.
+
+ 6. Conveying Non-Source Forms.
+
+ You may convey a covered work in object code form under the terms
+of sections 4 and 5, provided that you also convey the
+machine-readable Corresponding Source under the terms of this License,
+in one of these ways:
+
+ a) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by the
+ Corresponding Source fixed on a durable physical medium
+ customarily used for software interchange.
+
+ b) Convey the object code in, or embodied in, a physical product
+ (including a physical distribution medium), accompanied by a
+ written offer, valid for at least three years and valid for as
+ long as you offer spare parts or customer support for that product
+ model, to give anyone who possesses the object code either (1) a
+ copy of the Corresponding Source for all the software in the
+ product that is covered by this License, on a durable physical
+ medium customarily used for software interchange, for a price no
+ more than your reasonable cost of physically performing this
+ conveying of source, or (2) access to copy the
+ Corresponding Source from a network server at no charge.
+
+ c) Convey individual copies of the object code with a copy of the
+ written offer to provide the Corresponding Source. This
+ alternative is allowed only occasionally and noncommercially, and
+ only if you received the object code with such an offer, in accord
+ with subsection 6b.
+
+ d) Convey the object code by offering access from a designated
+ place (gratis or for a charge), and offer equivalent access to the
+ Corresponding Source in the same way through the same place at no
+ further charge. You need not require recipients to copy the
+ Corresponding Source along with the object code. If the place to
+ copy the object code is a network server, the Corresponding Source
+ may be on a different server (operated by you or a third party)
+ that supports equivalent copying facilities, provided you maintain
+ clear directions next to the object code saying where to find the
+ Corresponding Source. Regardless of what server hosts the
+ Corresponding Source, you remain obligated to ensure that it is
+ available for as long as needed to satisfy these requirements.
+
+ e) Convey the object code using peer-to-peer transmission, provided
+ you inform other peers where the object code and Corresponding
+ Source of the work are being offered to the general public at no
+ charge under subsection 6d.
+
+ A separable portion of the object code, whose source code is excluded
+from the Corresponding Source as a System Library, need not be
+included in conveying the object code work.
+
+ A "User Product" is either (1) a "consumer product", which means any
+tangible personal property which is normally used for personal, family,
+or household purposes, or (2) anything designed or sold for incorporation
+into a dwelling. In determining whether a product is a consumer product,
+doubtful cases shall be resolved in favor of coverage. For a particular
+product received by a particular user, "normally used" refers to a
+typical or common use of that class of product, regardless of the status
+of the particular user or of the way in which the particular user
+actually uses, or expects or is expected to use, the product. A product
+is a consumer product regardless of whether the product has substantial
+commercial, industrial or non-consumer uses, unless such uses represent
+the only significant mode of use of the product.
+
+ "Installation Information" for a User Product means any methods,
+procedures, authorization keys, or other information required to install
+and execute modified versions of a covered work in that User Product from
+a modified version of its Corresponding Source. The information must
+suffice to ensure that the continued functioning of the modified object
+code is in no case prevented or interfered with solely because
+modification has been made.
+
+ If you convey an object code work under this section in, or with, or
+specifically for use in, a User Product, and the conveying occurs as
+part of a transaction in which the right of possession and use of the
+User Product is transferred to the recipient in perpetuity or for a
+fixed term (regardless of how the transaction is characterized), the
+Corresponding Source conveyed under this section must be accompanied
+by the Installation Information. But this requirement does not apply
+if neither you nor any third party retains the ability to install
+modified object code on the User Product (for example, the work has
+been installed in ROM).
+
+ The requirement to provide Installation Information does not include a
+requirement to continue to provide support service, warranty, or updates
+for a work that has been modified or installed by the recipient, or for
+the User Product in which it has been modified or installed. Access to a
+network may be denied when the modification itself materially and
+adversely affects the operation of the network or violates the rules and
+protocols for communication across the network.
+
+ Corresponding Source conveyed, and Installation Information provided,
+in accord with this section must be in a format that is publicly
+documented (and with an implementation available to the public in
+source code form), and must require no special password or key for
+unpacking, reading or copying.
+
+ 7. Additional Terms.
+
+ "Additional permissions" are terms that supplement the terms of this
+License by making exceptions from one or more of its conditions.
+Additional permissions that are applicable to the entire Program shall
+be treated as though they were included in this License, to the extent
+that they are valid under applicable law. If additional permissions
+apply only to part of the Program, that part may be used separately
+under those permissions, but the entire Program remains governed by
+this License without regard to the additional permissions.
+
+ When you convey a copy of a covered work, you may at your option
+remove any additional permissions from that copy, or from any part of
+it. (Additional permissions may be written to require their own
+removal in certain cases when you modify the work.) You may place
+additional permissions on material, added by you to a covered work,
+for which you have or can give appropriate copyright permission.
+
+ Notwithstanding any other provision of this License, for material you
+add to a covered work, you may (if authorized by the copyright holders of
+that material) supplement the terms of this License with terms:
+
+ a) Disclaiming warranty or limiting liability differently from the
+ terms of sections 15 and 16 of this License; or
+
+ b) Requiring preservation of specified reasonable legal notices or
+ author attributions in that material or in the Appropriate Legal
+ Notices displayed by works containing it; or
+
+ c) Prohibiting misrepresentation of the origin of that material, or
+ requiring that modified versions of such material be marked in
+ reasonable ways as different from the original version; or
+
+ d) Limiting the use for publicity purposes of names of licensors or
+ authors of the material; or
+
+ e) Declining to grant rights under trademark law for use of some
+ trade names, trademarks, or service marks; or
+
+ f) Requiring indemnification of licensors and authors of that
+ material by anyone who conveys the material (or modified versions of
+ it) with contractual assumptions of liability to the recipient, for
+ any liability that these contractual assumptions directly impose on
+ those licensors and authors.
+
+ All other non-permissive additional terms are considered "further
+restrictions" within the meaning of section 10. If the Program as you
+received it, or any part of it, contains a notice stating that it is
+governed by this License along with a term that is a further
+restriction, you may remove that term. If a license document contains
+a further restriction but permits relicensing or conveying under this
+License, you may add to a covered work material governed by the terms
+of that license document, provided that the further restriction does
+not survive such relicensing or conveying.
+
+ If you add terms to a covered work in accord with this section, you
+must place, in the relevant source files, a statement of the
+additional terms that apply to those files, or a notice indicating
+where to find the applicable terms.
+
+ Additional terms, permissive or non-permissive, may be stated in the
+form of a separately written license, or stated as exceptions;
+the above requirements apply either way.
+
+ 8. Termination.
+
+ You may not propagate or modify a covered work except as expressly
+provided under this License. Any attempt otherwise to propagate or
+modify it is void, and will automatically terminate your rights under
+this License (including any patent licenses granted under the third
+paragraph of section 11).
+
+ However, if you cease all violation of this License, then your
+license from a particular copyright holder is reinstated (a)
+provisionally, unless and until the copyright holder explicitly and
+finally terminates your license, and (b) permanently, if the copyright
+holder fails to notify you of the violation by some reasonable means
+prior to 60 days after the cessation.
+
+ Moreover, your license from a particular copyright holder is
+reinstated permanently if the copyright holder notifies you of the
+violation by some reasonable means, this is the first time you have
+received notice of violation of this License (for any work) from that
+copyright holder, and you cure the violation prior to 30 days after
+your receipt of the notice.
+
+ Termination of your rights under this section does not terminate the
+licenses of parties who have received copies or rights from you under
+this License. If your rights have been terminated and not permanently
+reinstated, you do not qualify to receive new licenses for the same
+material under section 10.
+
+ 9. Acceptance Not Required for Having Copies.
+
+ You are not required to accept this License in order to receive or
+run a copy of the Program. Ancillary propagation of a covered work
+occurring solely as a consequence of using peer-to-peer transmission
+to receive a copy likewise does not require acceptance. However,
+nothing other than this License grants you permission to propagate or
+modify any covered work. These actions infringe copyright if you do
+not accept this License. Therefore, by modifying or propagating a
+covered work, you indicate your acceptance of this License to do so.
+
+ 10. Automatic Licensing of Downstream Recipients.
+
+ Each time you convey a covered work, the recipient automatically
+receives a license from the original licensors, to run, modify and
+propagate that work, subject to this License. You are not responsible
+for enforcing compliance by third parties with this License.
+
+ An "entity transaction" is a transaction transferring control of an
+organization, or substantially all assets of one, or subdividing an
+organization, or merging organizations. If propagation of a covered
+work results from an entity transaction, each party to that
+transaction who receives a copy of the work also receives whatever
+licenses to the work the party's predecessor in interest had or could
+give under the previous paragraph, plus a right to possession of the
+Corresponding Source of the work from the predecessor in interest, if
+the predecessor has it or can get it with reasonable efforts.
+
+ You may not impose any further restrictions on the exercise of the
+rights granted or affirmed under this License. For example, you may
+not impose a license fee, royalty, or other charge for exercise of
+rights granted under this License, and you may not initiate litigation
+(including a cross-claim or counterclaim in a lawsuit) alleging that
+any patent claim is infringed by making, using, selling, offering for
+sale, or importing the Program or any portion of it.
+
+ 11. Patents.
+
+ A "contributor" is a copyright holder who authorizes use under this
+License of the Program or a work on which the Program is based. The
+work thus licensed is called the contributor's "contributor version".
+
+ A contributor's "essential patent claims" are all patent claims
+owned or controlled by the contributor, whether already acquired or
+hereafter acquired, that would be infringed by some manner, permitted
+by this License, of making, using, or selling its contributor version,
+but do not include claims that would be infringed only as a
+consequence of further modification of the contributor version. For
+purposes of this definition, "control" includes the right to grant
+patent sublicenses in a manner consistent with the requirements of
+this License.
+
+ Each contributor grants you a non-exclusive, worldwide, royalty-free
+patent license under the contributor's essential patent claims, to
+make, use, sell, offer for sale, import and otherwise run, modify and
+propagate the contents of its contributor version.
+
+ In the following three paragraphs, a "patent license" is any express
+agreement or commitment, however denominated, not to enforce a patent
+(such as an express permission to practice a patent or covenant not to
+sue for patent infringement). To "grant" such a patent license to a
+party means to make such an agreement or commitment not to enforce a
+patent against the party.
+
+ If you convey a covered work, knowingly relying on a patent license,
+and the Corresponding Source of the work is not available for anyone
+to copy, free of charge and under the terms of this License, through a
+publicly available network server or other readily accessible means,
+then you must either (1) cause the Corresponding Source to be so
+available, or (2) arrange to deprive yourself of the benefit of the
+patent license for this particular work, or (3) arrange, in a manner
+consistent with the requirements of this License, to extend the patent
+license to downstream recipients. "Knowingly relying" means you have
+actual knowledge that, but for the patent license, your conveying the
+covered work in a country, or your recipient's use of the covered work
+in a country, would infringe one or more identifiable patents in that
+country that you have reason to believe are valid.
+
+ If, pursuant to or in connection with a single transaction or
+arrangement, you convey, or propagate by procuring conveyance of, a
+covered work, and grant a patent license to some of the parties
+receiving the covered work authorizing them to use, propagate, modify
+or convey a specific copy of the covered work, then the patent license
+you grant is automatically extended to all recipients of the covered
+work and works based on it.
+
+ A patent license is "discriminatory" if it does not include within
+the scope of its coverage, prohibits the exercise of, or is
+conditioned on the non-exercise of one or more of the rights that are
+specifically granted under this License. You may not convey a covered
+work if you are a party to an arrangement with a third party that is
+in the business of distributing software, under which you make payment
+to the third party based on the extent of your activity of conveying
+the work, and under which the third party grants, to any of the
+parties who would receive the covered work from you, a discriminatory
+patent license (a) in connection with copies of the covered work
+conveyed by you (or copies made from those copies), or (b) primarily
+for and in connection with specific products or compilations that
+contain the covered work, unless you entered into that arrangement,
+or that patent license was granted, prior to 28 March 2007.
+
+ Nothing in this License shall be construed as excluding or limiting
+any implied license or other defenses to infringement that may
+otherwise be available to you under applicable patent law.
+
+ 12. No Surrender of Others' Freedom.
+
+ If conditions are imposed on you (whether by court order, agreement or
+otherwise) that contradict the conditions of this License, they do not
+excuse you from the conditions of this License. If you cannot convey a
+covered work so as to satisfy simultaneously your obligations under this
+License and any other pertinent obligations, then as a consequence you may
+not convey it at all. For example, if you agree to terms that obligate you
+to collect a royalty for further conveying from those to whom you convey
+the Program, the only way you could satisfy both those terms and this
+License would be to refrain entirely from conveying the Program.
+
+ 13. Use with the GNU Affero General Public License.
+
+ Notwithstanding any other provision of this License, you have
+permission to link or combine any covered work with a work licensed
+under version 3 of the GNU Affero General Public License into a single
+combined work, and to convey the resulting work. The terms of this
+License will continue to apply to the part which is the covered work,
+but the special requirements of the GNU Affero General Public License,
+section 13, concerning interaction through a network will apply to the
+combination as such.
+
+ 14. Revised Versions of this License.
+
+ The Free Software Foundation may publish revised and/or new versions of
+the GNU General Public License from time to time. Such new versions will
+be similar in spirit to the present version, but may differ in detail to
+address new problems or concerns.
+
+ Each version is given a distinguishing version number. If the
+Program specifies that a certain numbered version of the GNU General
+Public License "or any later version" applies to it, you have the
+option of following the terms and conditions either of that numbered
+version or of any later version published by the Free Software
+Foundation. If the Program does not specify a version number of the
+GNU General Public License, you may choose any version ever published
+by the Free Software Foundation.
+
+ If the Program specifies that a proxy can decide which future
+versions of the GNU General Public License can be used, that proxy's
+public statement of acceptance of a version permanently authorizes you
+to choose that version for the Program.
+
+ Later license versions may give you additional or different
+permissions. However, no additional obligations are imposed on any
+author or copyright holder as a result of your choosing to follow a
+later version.
+
+ 15. Disclaimer of Warranty.
+
+ THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
+APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
+HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
+OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
+THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
+PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
+IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
+ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
+
+ 16. Limitation of Liability.
+
+ IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
+WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
+THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
+GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
+USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
+DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
+PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
+EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
+SUCH DAMAGES.
+
+ 17. Interpretation of Sections 15 and 16.
+
+ If the disclaimer of warranty and limitation of liability provided
+above cannot be given local legal effect according to their terms,
+reviewing courts shall apply local law that most closely approximates
+an absolute waiver of all civil liability in connection with the
+Program, unless a warranty or assumption of liability accompanies a
+copy of the Program in return for a fee.
+
+ END OF TERMS AND CONDITIONS
+
+ How to Apply These Terms to Your New Programs
+
+ If you develop a new program, and you want it to be of the greatest
+possible use to the public, the best way to achieve this is to make it
+free software which everyone can redistribute and change under these terms.
+
+ To do so, attach the following notices to the program. It is safest
+to attach them to the start of each source file to most effectively
+state the exclusion of warranty; and each file should have at least
+the "copyright" line and a pointer to where the full notice is found.
+
+ <one line to give the program's name and a brief idea of what it does.>
+ Copyright (C) <year> <name of author>
+
+ This program is free software: you can redistribute it and/or modify
+ it under the terms of the GNU General Public License as published by
+ the Free Software Foundation, either version 3 of the License, or
+ (at your option) any later version.
+
+ This program is distributed in the hope that it will be useful,
+ but WITHOUT ANY WARRANTY; without even the implied warranty of
+ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ GNU General Public License for more details.
+
+ You should have received a copy of the GNU General Public License
+ along with this program. If not, see <http://www.gnu.org/licenses/>.
+
+Also add information on how to contact you by electronic and paper mail.
+
+ If the program does terminal interaction, make it output a short
+notice like this when it starts in an interactive mode:
+
+ <program> Copyright (C) <year> <name of author>
+ This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
+ This is free software, and you are welcome to redistribute it
+ under certain conditions; type `show c' for details.
+
+The hypothetical commands `show w' and `show c' should show the appropriate
+parts of the General Public License. Of course, your program's commands
+might be different; for a GUI interface, you would use an "about box".
+
+ You should also get your employer (if you work as a programmer) or school,
+if any, to sign a "copyright disclaimer" for the program, if necessary.
+For more information on this, and how to apply and follow the GNU GPL, see
+<http://www.gnu.org/licenses/>.
+
+ The GNU General Public License does not permit incorporating your program
+into proprietary programs. If your program is a subroutine library, you
+may consider it more useful to permit linking proprietary applications with
+the library. If this is what you want to do, use the GNU Lesser General
+Public License instead of this License. But first, please read
+<http://www.gnu.org/philosophy/why-not-lgpl.html>.
diff --git a/plugins/zsh-navigation-tools/README.md b/plugins/zsh-navigation-tools/README.md
new file mode 100644
index 000000000..32a86bba9
--- /dev/null
+++ b/plugins/zsh-navigation-tools/README.md
@@ -0,0 +1,111 @@
+# Zsh Navigation Tools
+
+http://imageshack.com/a/img633/7967/ps6rKR.png
+
+Set of tools like n-history – multi-word history searcher, n-cd – directory
+bookmark manager, n-kill – htop like kill utility, and more. Based on
+n-list, a tool generating selectable curses-based list of elements that has
+access to current Zsh session, i.e. has broad capabilities to work together
+with it. Feature highlights include incremental multi-word searching, ANSI
+coloring, unique mode, horizontal scroll, non-selectable elements, grepping and
+various integrations with Zsh.
+
+## History Widget
+
+To have n-history as multi-word incremental searcher bound to Ctrl-R copy znt-*
+files into the */site-functions dir (unless you use Oh My Zsh) and
+add:
+
+ autoload znt-history-widget
+ zle -N znt-history-widget
+ bindkey "^R" znt-history-widget
+
+to .zshrc. This is done automatically when using Oh My Zsh. Two other
+widgets exist, znt-cd-widget and znt-kill-widget, they can be too assigned
+to key combinations (no need for autoload when using Oh My Zsh):
+
+ zle -N znt-cd-widget
+ bindkey "^A" znt-cd-widget
+ zle -N znt-kill-widget
+ bindkey "^Y" znt-kill-widget
+
+Oh My Zsh stores history into ~/.zsh_history. When you switch to OMZ you could
+want to copy your previous data (from e.g. ~/.zhistory) into the new location.
+
+## Introduction
+
+The tools are:
+
+- n-aliases - browses aliases, relegates editing to vared
+- n-cd - browses dirstack and bookmarked directories, allows to enter selected directory
+- n-functions - browses functions, relegates editing to zed or vared
+- n-history - browses history, allows to edit and run commands from it
+- n-kill - browses processes list, allows to send signal to selected process
+- n-env - browses environment, relegates editing to vared
+- n-options - browses options, allows to toggle their state
+- n-panelize - loads output of given command into the list for browsing
+
+All tools support horizontal scroll with <,>, {,}, h,l or left and right
+cursors. Other keys are:
+
+- [,] - jump directory bookmarks in n-cd and typical signals in n-kill
+- Ctrl-d, Ctrl-u - half page up or down
+- Ctrl-p, Ctrl-n - previous and next (also done with vim's j,k)
+- Ctrl-l - redraw of whole display
+- g, G - beginning and end of the list
+- Ctrl-o, o - enter uniq mode (no duplicate lines)
+- / - start incremental search
+- Enter - finish incremental search, retaining filter
+- Esc - exit incremental search, clearing filter
+- Ctrl-w (in incremental search) - delete whole word
+- Ctrl-k (in incremental search) - delete whole line
+
+## Programming
+
+The function n-list is used as follows:
+
+ n-list {element1} [element2] ... [elementN]
+
+This is all that is needed to be done to have the features like ANSI coloring,
+incremental multi-word search, unique mode, horizontal scroll, non-selectable
+elements (grepping is done outside n-list, see the tools for how it can be
+done). To set up non-selectable entries add their indices into array
+NLIST_NONSELECTABLE_ELEMENTS:
+
+ typeset -a NLIST_NONSELECTABLE_ELEMENTS
+ NLIST_NONSELECTABLE_ELEMENTS=( 1 )
+
+Result is stored as $reply[REPLY] ($ isn't needed before REPLY because
+of arithmetic context inside []). The returned array might be different from
+input arguments as n-list can process them via incremental search or uniq
+mode. $REPLY is the index in that possibly processed array. If $REPLY
+equals -1 it means that no selection have been made (user quitted via q
+key).
+
+To set up entries that can be jumped to with [,] keys add their indices to
+NLIST_HOP_INDEXES array:
+
+ typeset -a NLIST_HOP_INDEXES
+ NLIST_HOP_INDEXES=( 1 10 )
+
+n-list can automatically colorize entries according to a Zsh pattern.
+Following example will colorize all numbers with blue:
+
+ local NLIST_COLORING_PATTERN="[0-9]##"
+ local NLIST_COLORING_COLOR=$'\x1b[00;34m'
+ local NLIST_COLORING_END_COLOR=$'\x1b[0m'
+ local NLIST_COLORING_MATCH_MULTIPLE=1
+ n-list "This is a number 123" "This line too has a number: 456"
+
+Blue is the default color, it doesn't have to be set. See zshexpn man page
+for more information on Zsh patterns. Briefly, comparing to regular
+expressions, (#s) is ^, (#e) is $, # is *, ## is +. Alternative
+will work when in parenthesis, i.e. (a|b). BTW by using this method you can
+colorize output of the tools, via their config files (check out e.g. n-cd.conf,
+it uses this).
+
+## Performance
+ZNT are fastest with Zsh before 5.0.6 and starting from 5.2
+
+
+vim:filetype=conf
diff --git a/plugins/zsh-navigation-tools/n-aliases b/plugins/zsh-navigation-tools/n-aliases
new file mode 100644
index 000000000..d81db9253
--- /dev/null
+++ b/plugins/zsh-navigation-tools/n-aliases
@@ -0,0 +1,47 @@
+# Copy this file into /usr/share/zsh/site-functions/
+# and add 'autoload n-aliases` to .zshrc
+#
+# This function allows to choose an alias for edition with vared
+#
+# Uses n-list
+
+emulate -L zsh
+
+setopt extendedglob
+zmodload zsh/curses
+zmodload zsh/parameter
+
+local IFS="
+"
+
+unset NLIST_COLORING_PATTERN
+
+[ -f ~/.config/znt/n-list.conf ] && . ~/.config/znt/n-list.conf
+[ -f ~/.config/znt/n-aliases.conf ] && . ~/.config/znt/n-aliases.conf
+
+local list
+local selected
+
+NLIST_REMEMBER_STATE=0
+
+list=( "${(@k)aliases}" )
+list=( "${(@M)list:#(#i)*$1*}" )
+
+local NLIST_GREP_STRING="$1"
+
+if [ "$#list" -eq 0 ]; then
+ echo "No matching aliases"
+ return 1
+fi
+
+list=( "${(@i)list}" )
+n-list "$list[@]"
+
+if [ "$REPLY" -gt 0 ]; then
+ selected="$reply[REPLY]"
+ echo "Editing \`$selected':"
+ print -rs "vared aliases\\[$selected\\]"
+ vared aliases\[$selected\]
+fi
+
+# vim: set filetype=zsh:
diff --git a/plugins/zsh-navigation-tools/n-cd b/plugins/zsh-navigation-tools/n-cd
new file mode 100644
index 000000000..b1ac5b159
--- /dev/null
+++ b/plugins/zsh-navigation-tools/n-cd
@@ -0,0 +1,68 @@
+# Copy this file into /usr/share/zsh/site-functions/
+# and add 'autoload n-cd` to .zshrc
+#
+# This function allows to choose a directory from pushd stack
+#
+# Uses n-list
+
+emulate -L zsh
+
+setopt extendedglob pushdignoredups
+
+zmodload zsh/curses
+local IFS="
+"
+
+# Unset before configuration is read
+unset NLIST_COLORING_PATTERN
+
+[ -f ~/.config/znt/n-list.conf ] && . ~/.config/znt/n-list.conf
+[ -f ~/.config/znt/n-cd.conf ] && . ~/.config/znt/n-cd.conf
+
+local list
+local selected
+
+NLIST_REMEMBER_STATE=0
+
+list=( `dirs -p` )
+list=( "${(@M)list:#(#i)*$1*}" )
+
+local NLIST_GREP_STRING="$1"
+
+[ "$#list" -eq 0 ] && echo "No matching directories"
+
+if [ "$#hotlist" -ge 1 ]; then
+ typeset -a NLIST_NONSELECTABLE_ELEMENTS NLIST_HOP_INDEXES
+ local tmp_list_size="$#list"
+ NLIST_NONSELECTABLE_ELEMENTS=( $(( tmp_list_size+1 )) $(( tmp_list_size+2 )) )
+ list=( "$list[@]" "" $'\x1b[00;31m'"Hotlist"$'\x1b[00;00m': "$hotlist[@]" )
+ (( tmp_list_size+=3 ))
+ local middle_hop=$(( (tmp_list_size+$#list) / 2 ))
+ [[ "$middle_hop" -eq $tmp_list_size || "$middle_hop" -eq $#list ]] && middle_hop=""
+ [ "$tmp_list_size" -eq $#list ] && tmp_list_size=""
+ NLIST_HOP_INDEXES=( 1 $tmp_list_size $middle_hop $#list )
+else
+ [ "$#list" -eq 0 ] && return 1
+fi
+
+n-list "${list[@]}"
+
+if [ "$REPLY" -gt 0 ]; then
+ selected="$reply[REPLY]"
+ selected="${selected/#\~/$HOME}"
+
+ (( NCD_DONT_PUSHD )) && setopt NO_AUTO_PUSHD
+ cd "$selected"
+ (( NCD_DONT_PUSHD )) && setopt AUTO_PUSHD
+
+ # ZLE?
+ if [ "${(t)CURSOR}" = "integer-local-special" ]; then
+ zle -M "You have selected $selected"
+ else
+ echo "You have selected $selected"
+ fi
+else
+ [ "${(t)CURSOR}" = "integer-local-special" ] && zle redisplay
+fi
+
+# vim: set filetype=zsh:
diff --git a/plugins/zsh-navigation-tools/n-env b/plugins/zsh-navigation-tools/n-env
new file mode 100644
index 000000000..612796c00
--- /dev/null
+++ b/plugins/zsh-navigation-tools/n-env
@@ -0,0 +1,47 @@
+# Copy this file into /usr/share/zsh/site-functions/
+# and add 'autoload n-env` to .zshrc
+#
+# This function allows to choose an environment variable
+# for edition with vared
+#
+# Uses n-list
+
+emulate -L zsh
+
+setopt extendedglob
+unsetopt equals
+zmodload zsh/curses
+
+local IFS="
+"
+
+[ -f ~/.config/znt/n-list.conf ] && . ~/.config/znt/n-list.conf
+[ -f ~/.config/znt/n-env.conf ] && . ~/.config/znt/n-env.conf
+
+local list
+local selected
+
+NLIST_REMEMBER_STATE=0
+
+list=( `env` )
+list=( "${(@M)list:#(#i)*$1*}" )
+
+local NLIST_GREP_STRING="$1"
+
+if [ "$#list" -eq 0 ]; then
+ echo "No matching variables"
+ return 1
+fi
+
+list=( "${(@i)list}" )
+n-list "$list[@]"
+
+if [ "$REPLY" -gt 0 ]; then
+ selected="$reply[REPLY]"
+ selected="${selected%%=*}"
+ echo "Editing \`$selected':"
+ print -rs "vared \"$selected\""
+ vared "$selected"
+fi
+
+# vim: set filetype=zsh:
diff --git a/plugins/zsh-navigation-tools/n-functions b/plugins/zsh-navigation-tools/n-functions
new file mode 100644
index 000000000..6f10a3dec
--- /dev/null
+++ b/plugins/zsh-navigation-tools/n-functions
@@ -0,0 +1,54 @@
+# Copy this file into /usr/share/zsh/site-functions/
+# and add 'autoload n-functions` to .zshrc
+#
+# This function allows to choose a function for edition with vared
+#
+# Uses n-list
+
+emulate -L zsh
+
+setopt extendedglob
+zmodload zsh/curses
+zmodload zsh/parameter
+
+local IFS="
+"
+
+unset NLIST_COLORING_PATTERN
+
+[ -f ~/.config/znt/n-list.conf ] && . ~/.config/znt/n-list.conf
+[ -f ~/.config/znt/n-functions.conf ] && . ~/.config/znt/n-functions.conf
+
+local list
+local selected
+
+NLIST_REMEMBER_STATE=0
+
+list=( "${(@k)functions}" )
+list=( "${(@M)list:#(#i)*$1*}" )
+
+local NLIST_GREP_STRING="$1"
+
+if [ "$#list" -eq 0 ]; then
+ echo "No matching functions"
+ return 1
+fi
+
+list=( "${(@i)list}" )
+n-list "$list[@]"
+
+if [ "$REPLY" -gt 0 ]; then
+ selected="$reply[REPLY]"
+ if [ "$feditor" = "zed" ]; then
+ echo "Editing \`$selected' (ESC ZZ or Ctrl-x-w to finish):"
+ autoload zed
+ print -rs "zed -f -- \"$selected\""
+ zed -f -- "$selected"
+ else
+ echo "Editing \`$selected':"
+ print -rs "vared functions\\[$selected\\]"
+ vared functions\[$selected\]
+ fi
+fi
+
+# vim: set filetype=zsh:
diff --git a/plugins/zsh-navigation-tools/n-history b/plugins/zsh-navigation-tools/n-history
new file mode 100644
index 000000000..9f1d6279b
--- /dev/null
+++ b/plugins/zsh-navigation-tools/n-history
@@ -0,0 +1,54 @@
+# Copy this file into /usr/share/zsh/site-functions/
+# and add 'autoload n-history` to .zshrc
+#
+# This function allows to browse Z shell's history and use the
+# entries
+#
+# Uses n-list
+
+emulate -L zsh
+
+setopt extendedglob
+zmodload zsh/curses
+zmodload zsh/parameter
+
+local IFS="
+"
+
+unset NLIST_COLORING_PATTERN
+
+[ -f ~/.config/znt/n-list.conf ] && . ~/.config/znt/n-list.conf
+[ -f ~/.config/znt/n-history.conf ] && . ~/.config/znt/n-history.conf
+
+local list
+local selected
+
+NLIST_REMEMBER_STATE=0
+
+list=( "$history[@]" )
+list=( "${(@M)list:#(#i)*$1*}" )
+
+if [ "$#list" -eq 0 ]; then
+ echo "No matching history entries"
+ return 1
+fi
+
+local NLIST_GREP_STRING="$1"
+local NLIST_REPLACE_NEWLINES="1"
+n-list "${list[@]}"
+
+if [ "$REPLY" -gt 0 ]; then
+ selected="$reply[REPLY]"
+ # ZLE?
+ if [ "${(t)CURSOR}" = "integer-local-special" ]; then
+ zle redisplay
+ zle kill-buffer
+ zle -U "$selected"
+ else
+ print -zr "$selected"
+ fi
+else
+ [ "${(t)CURSOR}" = "integer-local-special" ] && zle redisplay
+fi
+
+# vim: set filetype=zsh:
diff --git a/plugins/zsh-navigation-tools/n-kill b/plugins/zsh-navigation-tools/n-kill
new file mode 100644
index 000000000..e52082282
--- /dev/null
+++ b/plugins/zsh-navigation-tools/n-kill
@@ -0,0 +1,96 @@
+# Copy this file into /usr/share/zsh/site-functions/
+# and add 'autoload n-kill` to .zshrc
+#
+# This function allows to choose a process and a signal to send to it
+#
+# Uses n-list
+
+emulate -L zsh
+
+setopt extendedglob
+zmodload zsh/curses
+
+local IFS="
+"
+
+[ -f ~/.config/znt/n-list.conf ] && . ~/.config/znt/n-list.conf
+[ -f ~/.config/znt/n-kill.conf ] && . ~/.config/znt/n-kill.conf
+
+typeset -A signals
+signals=(
+ 1 "1 - HUP"
+ 2 "2 - INT"
+ 3 "3 - QUIT"
+ 6 "6 - ABRT"
+ 9 "9 - KILL"
+ 14 "14 - ALRM"
+ 15 "15 - TERM"
+ 17 "17 - STOP"
+ 19 "19 - CONT"
+)
+
+local list
+local selected
+local signal
+local -a signal_names
+local title
+
+NLIST_REMEMBER_STATE=0
+
+typeset -a NLIST_NONSELECTABLE_ELEMENTS
+NLIST_NONSELECTABLE_ELEMENTS=( 1 )
+
+type ps 2>/dev/null 1>&2 || { echo >&2 "Error: \`ps' not found"; return 1 }
+
+case "$(uname)" in
+ CYGWIN*) list=( `command ps -Wa` ) ;;
+ *) list=( `command ps -o pid,uid,command -A` ) ;;
+esac
+
+# Ask of PID
+title=$'\x1b[00;31m'"${list[1]}"$'\x1b[00;00m\0'
+shift list
+list=( "$title" "${(@M)list:#(#i)*$1*}" )
+
+local NLIST_GREP_STRING="$1"
+
+if [ "$#list" -eq 1 ]; then
+ echo "No matching processes"
+ return 1
+fi
+
+n-list "$list[@]"
+
+# Got answer? (could be Ctrl-C or 'q')
+if [ "$REPLY" -gt 0 ]; then
+ selected="$reply[REPLY]"
+ selected="${selected## #}"
+ pid="${selected%% *}"
+
+ # Now ask of signal
+ signal_names=( ${(vin)signals} )
+ typeset -a NLIST_HOP_INDEXES
+ NLIST_HOP_INDEXES=( 3 6 8 )
+ unset NLIST_COLORING_PATTERN
+ n-list $'\x1b[00;31mSelect signal:\x1b[00;00m' "$signal_names[@]"
+
+ if [ "$REPLY" -gt 0 ]; then
+ selected="$reply[REPLY]"
+ signal="${(k)signals[(r)$selected]}"
+
+ # ZLE?
+ if [ "${(t)CURSOR}" = "integer-local-special" ]; then
+ zle redisplay
+ zle kill-whole-line
+ zle -U "kill -$signal $pid"
+ else
+ print -zr "kill -$signal $pid"
+ fi
+ else
+ [ "${(t)CURSOR}" = "integer-local-special" ] && zle redisplay
+ fi
+else
+ [ "${(t)CURSOR}" = "integer-local-special" ] && zle redisplay
+fi
+
+# vim: set filetype=zsh:
diff --git a/plugins/zsh-navigation-tools/n-list b/plugins/zsh-navigation-tools/n-list
new file mode 100644
index 000000000..50159b4a0
--- /dev/null
+++ b/plugins/zsh-navigation-tools/n-list
@@ -0,0 +1,428 @@
+# $1, $2, ... - elements of the list
+# $NLIST_NONSELECTABLE_ELEMENTS - array of indexes (1-based) that cannot be selected
+# $REPLY is the output variable - contains index (1-based) or -1 when no selection
+# $reply (array) is the second part of the output - use the index (REPLY) to get selected element
+#
+# Copy this file into /usr/share/zsh/site-functions/
+# and add 'autoload n-list` to .zshrc
+#
+# This function outputs a list of elements that can be
+# navigated with keyboard. Uses curses library
+
+emulate -LR zsh
+
+setopt typesetsilent extendedglob noshortloops
+
+_nlist_has_terminfo=0
+
+zmodload zsh/curses
+zmodload zsh/terminfo 2>/dev/null && _nlist_has_terminfo=1
+
+trap "REPLY=-2; reply=(); return" TERM INT QUIT
+trap "_nlist_exit" EXIT
+
+# Drawing and input
+autoload n-list-draw n-list-input
+
+# Cleanup before any exit
+_nlist_exit() {
+ setopt localoptions
+ setopt extendedglob
+
+ [[ "$REPLY" = -(#c0,1)[0-9]## ]] || REPLY="-1"
+ zcurses 2>/dev/null delwin inner
+ zcurses 2>/dev/null delwin main
+ zcurses 2>/dev/null refresh
+ zcurses end
+ _nlist_alternate_screen 0
+ _nlist_cursor_visibility 1
+ unset _nlist_has_terminfo
+}
+
+# Outputs a message in the bottom of the screen
+_nlist_status_msg() {
+ # -1 for border, -1 for 0-based indexing
+ zcurses move main $(( term_height - 1 - 1 )) 2
+ zcurses clear main eol
+ zcurses string main "$1"
+ #status_msg_strlen is localized in caller
+ status_msg_strlen=$#1
+}
+
+# Prefer tput, then module terminfo
+_nlist_cursor_visibility() {
+ if type tput 2>/dev/null 1>&2; then
+ [ "$1" = "1" ] && { tput cvvis; tput cnorm }
+ [ "$1" = "0" ] && tput civis
+ elif [ "$_nlist_has_terminfo" = "1" ]; then
+ [ "$1" = "1" ] && { [ -n $terminfo[cvvis] ] && echo -n $terminfo[cvvis];
+ [ -n $terminfo[cnorm] ] && echo -n $terminfo[cnorm] }
+ [ "$1" = "0" ] && [ -n $terminfo[civis] ] && echo -n $terminfo[civis]
+ fi
+}
+
+# Reason for this function is that on some systems
+# smcup and rmcup are not knowing why left empty
+_nlist_alternate_screen() {
+ [ "$_nlist_has_terminfo" -ne "1" ] && return
+ [[ "$1" = "1" && -n "$terminfo[smcup]" ]] && return
+ [[ "$1" = "0" && -n "$terminfo[rmcup]" ]] && return
+
+ case "$TERM" in
+ *rxvt*)
+ [ "$1" = "1" ] && echo -n $'\x1b7\x1b[?47h'
+ [ "$1" = "0" ] && echo -n $'\x1b[2J\x1b[?47l\x1b8'
+ ;;
+ *)
+ [ "$1" = "1" ] && echo -n $'\x1b[?1049h'
+ [ "$1" = "0" ] && echo -n $'\x1b[?1049l'
+ # just to remember two other that work: $'\x1b7\x1b[r\x1b[?47h', $'\x1b[?47l\x1b8'
+ ;;
+ esac
+}
+
+_nlist_compute_user_vars_difference() {
+ if [[ "${(t)NLIST_NONSELECTABLE_ELEMENTS}" != "array" &&
+ "${(t)NLIST_NONSELECTABLE_ELEMENTS}" != "array-local" ]]
+ then
+ last_element_difference=0
+ current_difference=0
+ else
+ last_element_difference=$#NLIST_NONSELECTABLE_ELEMENTS
+ current_difference=0
+ local idx
+ for idx in "${(n)NLIST_NONSELECTABLE_ELEMENTS[@]}"; do
+ [ "$idx" -le "$NLIST_CURRENT_IDX" ] && current_difference+=1 || break
+ done
+ fi
+}
+
+# List was processed, check if variables aren't off range
+_nlist_verify_vars() {
+ [ "$NLIST_CURRENT_IDX" -gt "$last_element" ] && NLIST_CURRENT_IDX="$last_element"
+ [[ "$NLIST_CURRENT_IDX" -eq 0 && "$last_element" -ne 0 ]] && NLIST_CURRENT_IDX=1
+ (( NLIST_FROM_WHAT_IDX_LIST_IS_SHOWN=0+((NLIST_CURRENT_IDX-1)/page_height)*page_height+1 ))
+}
+
+# Compute the variables which are shown to the user
+_nlist_setup_user_vars() {
+ if [ "$1" = "1" ]; then
+ # Basic values when there are no non-selectables
+ NLIST_USER_CURRENT_IDX="$NLIST_CURRENT_IDX"
+ NLIST_USER_LAST_ELEMENT="$last_element"
+ else
+ _nlist_compute_user_vars_difference
+ NLIST_USER_CURRENT_IDX=$(( NLIST_CURRENT_IDX - current_difference ))
+ NLIST_USER_LAST_ELEMENT=$(( last_element - last_element_difference ))
+ fi
+}
+
+_nlist_colorify_disp_list() {
+ local col=$'\x1b[00;34m' reset=$'\x1b[0m'
+ [ -n "$NLIST_COLORING_COLOR" ] && col="$NLIST_COLORING_COLOR"
+ [ -n "$NLIST_COLORING_END_COLOR" ] && reset="$NLIST_COLORING_END_COLOR"
+
+ if [ "$NLIST_COLORING_MATCH_MULTIPLE" -eq 1 ]; then
+ disp_list=( "${(@)disp_list//(#mi)$~NLIST_COLORING_PATTERN/$col${MATCH}$reset}" )
+ else
+ disp_list=( "${(@)disp_list/(#mi)$~NLIST_COLORING_PATTERN/$col${MATCH}$reset}" )
+ fi
+}
+
+#
+# Main code
+#
+
+# Check if there is proper input
+if [ "$#" -lt 1 ]; then
+ echo "Usage: n-list element_1 ..."
+ return 1
+fi
+
+REPLY="-1"
+typeset -ga reply
+reply=()
+
+integer term_height="$LINES"
+integer term_width="$COLUMNS"
+if [[ "$term_height" -lt 1 || "$term_width" -lt 1 ]]; then
+ local stty_out=$( stty size )
+ term_height="${stty_out% *}"
+ term_width="${stty_out#* }"
+fi
+integer inner_height=term_height-3
+integer inner_width=term_width-3
+integer page_height=inner_height
+integer page_width=inner_width
+
+typeset -a list disp_list
+integer last_element=$#
+local action
+local final_key
+integer selection
+integer last_element_difference=0
+integer current_difference=0
+local prev_search_buffer=""
+integer prev_uniq_mode=0
+integer prev_start_idx=-1
+local MBEGIN MEND MATCH mbegin mend match
+
+# Ability to remember the list between calls
+if [[ -z "$NLIST_REMEMBER_STATE" || "$NLIST_REMEMBER_STATE" -eq 0 || "$NLIST_REMEMBER_STATE" -eq 2 ]]; then
+ NLIST_FROM_WHAT_IDX_LIST_IS_SHOWN=1
+ NLIST_CURRENT_IDX=1
+ NLIST_IS_SEARCH_MODE=0
+ NLIST_SEARCH_BUFFER=""
+ NLIST_TEXT_OFFSET=0
+ NLIST_IS_UNIQ_MODE=0
+
+ # Zero - because it isn't known, unless we
+ # confirm that first element is selectable
+ NLIST_USER_CURRENT_IDX=0
+ [[ ${NLIST_NONSELECTABLE_ELEMENTS[(r)1]} != 1 ]] && NLIST_USER_CURRENT_IDX=1
+ NLIST_USER_LAST_ELEMENT=$(( last_element - $#NLIST_NONSELECTABLE_ELEMENTS ))
+
+ # 2 is init once, then remember
+ [ "$NLIST_REMEMBER_STATE" -eq 2 ] && NLIST_REMEMBER_STATE=1
+fi
+
+if [ "$NLIST_START_IN_SEARCH_MODE" -eq 1 ]; then
+ NLIST_START_IN_SEARCH_MODE=0
+ NLIST_IS_SEARCH_MODE=1
+fi
+
+if [ -n "$NLIST_SET_SEARCH_TO" ]; then
+ NLIST_SEARCH_BUFFER="$NLIST_SET_SEARCH_TO"
+ NLIST_SET_SEARCH_TO=""
+fi
+
+if [ "$NLIST_START_IN_UNIQ_MODE" -eq 1 ]; then
+ NLIST_START_IN_UNIQ_MODE=0
+ NLIST_IS_UNIQ_MODE=1
+fi
+
+_nlist_alternate_screen 1
+zcurses init
+zcurses delwin main 2>/dev/null
+zcurses delwin inner 2>/dev/null
+zcurses addwin main "$term_height" "$term_width" 0 0
+zcurses addwin inner "$inner_height" "$inner_width" 1 2
+zcurses bg main white/black
+zcurses bg inner white/black
+if [ "$NLIST_IS_SEARCH_MODE" -ne 1 ]; then
+ _nlist_cursor_visibility 0
+fi
+
+#
+# Listening for input
+#
+
+local key keypad
+
+# Clear input buffer
+zcurses timeout main 0
+zcurses input main key keypad
+zcurses timeout main -1
+key=""
+keypad=""
+
+# This loop makes script faster on some Zsh's (e.g. 5.0.8)
+repeat 1; do
+ list=( "$@" )
+done
+
+last_element="$#list"
+
+while (( 1 )); do
+ # Do searching (filtering with string)
+ if [ -n "$NLIST_SEARCH_BUFFER" ]; then
+ # Compute new list?
+ if [[ "$NLIST_SEARCH_BUFFER" != "$prev_search_buffer" || "$NLIST_IS_UNIQ_MODE" -ne "$prev_uniq_mode" ]]; then
+ prev_search_buffer="$NLIST_SEARCH_BUFFER"
+ prev_uniq_mode="$NLIST_IS_UNIQ_MODE"
+ # regenerating list -> regenerating disp_list
+ prev_start_idx=-1
+
+ # Take all elements, including duplicates and non-selectables
+ typeset +U list
+ repeat 1; do
+ list=( "$@" )
+ done
+
+ # Remove non-selectable elements
+ [ "$#NLIST_NONSELECTABLE_ELEMENTS" -gt 0 ] && for i in "${(nO)NLIST_NONSELECTABLE_ELEMENTS[@]}"; do
+ list[$i]=()
+ done
+
+ # Remove duplicates
+ [ "$NLIST_IS_UNIQ_MODE" -eq 1 ] && typeset -U list
+
+ last_element="$#list"
+
+ # Next do the filtering
+ local search_buffer="${NLIST_SEARCH_BUFFER%% ##}"
+ search_buffer="${search_buffer## ##}"
+ search_buffer="${search_buffer//(#m)[][*?|#~^()><\\]/\\$MATCH}"
+ local search_pattern=""
+ local colsearch_pattern=""
+ if [ -n "$search_buffer" ]; then
+ # Patterns will be *foo*~^*bar* and (foo|bar)
+ search_pattern="${search_buffer// ##/*~^*}"
+ colsearch_pattern="${search_buffer// ##/|}"
+
+ # The repeat will make the matching work on a fresh heap
+ repeat 1; do
+ list=( "${(@M)list:#(#i)*$~search_pattern*}" )
+ done
+
+ last_element="$#list"
+ fi
+
+ # Called after processing list
+ _nlist_verify_vars
+ fi
+
+ _nlist_setup_user_vars 1
+
+ integer end_idx=$(( NLIST_FROM_WHAT_IDX_LIST_IS_SHOWN + page_height - 1 ))
+ [ "$end_idx" -gt "$last_element" ] && end_idx=last_element
+
+ if [ "$prev_start_idx" -ne "$NLIST_FROM_WHAT_IDX_LIST_IS_SHOWN" ]; then
+ prev_start_idx="$NLIST_FROM_WHAT_IDX_LIST_IS_SHOWN"
+ disp_list=( "${(@)list[NLIST_FROM_WHAT_IDX_LIST_IS_SHOWN, end_idx]}" )
+
+ if [ -n "$colsearch_pattern" ]; then
+ local red=$'\x1b[00;31m' reset=$'\x1b[00;00m'
+ # The repeat will make the matching work on a fresh heap
+ repeat 1; do
+ disp_list=( "${(@)disp_list//(#mi)($~colsearch_pattern)/$red${MATCH}$reset}" )
+ done
+ fi
+
+ # We have display list, lets replace newlines with "\n" when needed (1/2)
+ [ "$NLIST_REPLACE_NEWLINES" -eq 1 ] && disp_list=( "${(@)disp_list//$'\n'/\\n}" )
+ fi
+
+ # Output colored list
+ n-list-draw "$(( (NLIST_CURRENT_IDX-1) % page_height + 1 ))" \
+ "$page_height" "$page_width" 0 0 "$NLIST_TEXT_OFFSET" inner \
+ "$disp_list[@]"
+ else
+ # There is no search, but there was in previous loop
+ # OR
+ # Uniq mode was entered or left out
+ # -> compute new list
+ if [[ -n "$prev_search_buffer" || "$NLIST_IS_UNIQ_MODE" -ne "$prev_uniq_mode" ]]; then
+ prev_search_buffer=""
+ prev_uniq_mode="$NLIST_IS_UNIQ_MODE"
+ # regenerating list -> regenerating disp_list
+ prev_start_idx=-1
+
+ # Take all elements, including duplicates and non-selectables
+ typeset +U list
+ repeat 1; do
+ list=( "$@" )
+ done
+
+ # Remove non-selectable elements only when in uniq mode
+ [ "$NLIST_IS_UNIQ_MODE" -eq 1 ] && [ "$#NLIST_NONSELECTABLE_ELEMENTS" -gt 0 ] &&
+ for i in "${(nO)NLIST_NONSELECTABLE_ELEMENTS[@]}"; do
+ list[$i]=()
+ done
+
+ # Remove duplicates when in uniq mode
+ [ "$NLIST_IS_UNIQ_MODE" -eq 1 ] && typeset -U list
+
+ last_element="$#list"
+ # Called after processing list
+ _nlist_verify_vars
+ fi
+
+ # "1" - shouldn't bother with non-selectables
+ _nlist_setup_user_vars "$NLIST_IS_UNIQ_MODE"
+
+ integer end_idx=$(( NLIST_FROM_WHAT_IDX_LIST_IS_SHOWN + page_height - 1 ))
+ [ "$end_idx" -gt "$last_element" ] && end_idx=last_element
+
+ if [ "$prev_start_idx" -ne "$NLIST_FROM_WHAT_IDX_LIST_IS_SHOWN" ]; then
+ prev_start_idx="$NLIST_FROM_WHAT_IDX_LIST_IS_SHOWN"
+ disp_list=( "${(@)list[NLIST_FROM_WHAT_IDX_LIST_IS_SHOWN, end_idx]}" )
+
+ [ -n "$NLIST_COLORING_PATTERN" ] && _nlist_colorify_disp_list
+
+ # We have display list, lets replace newlines with "\n" when needed (2/2)
+ [ "$NLIST_REPLACE_NEWLINES" -eq 1 ] && disp_list=( "${(@)disp_list//$'\n'/\\n}" )
+ fi
+
+ # Output the list
+ n-list-draw "$(( (NLIST_CURRENT_IDX-1) % page_height + 1 ))" \
+ "$page_height" "$page_width" 0 0 "$NLIST_TEXT_OFFSET" inner \
+ "$disp_list[@]"
+ fi
+
+ local status_msg_strlen
+ if [ "$NLIST_IS_SEARCH_MODE" = "1" ]; then
+ local _txt2=""
+ [ "$NLIST_IS_UNIQ_MODE" -eq 1 ] && _txt2="[-UNIQ-] "
+ _nlist_status_msg "${_txt2}Filtering with: ${NLIST_SEARCH_BUFFER// /+}"
+ elif [[ ${NLIST_NONSELECTABLE_ELEMENTS[(r)$NLIST_CURRENT_IDX]} != $NLIST_CURRENT_IDX ||
+ -n "$NLIST_SEARCH_BUFFER" || "$NLIST_IS_UNIQ_MODE" -eq 1 ]]; then
+ local _txt="" _txt2=""
+ [ -n "$NLIST_GREP_STRING" ] && _txt=" [$NLIST_GREP_STRING]"
+ [ "$NLIST_IS_UNIQ_MODE" -eq 1 ] && _txt2="[-UNIQ-] "
+ _nlist_status_msg "${_txt2}Current #$NLIST_USER_CURRENT_IDX (of #$NLIST_USER_LAST_ELEMENT entries)$_txt"
+ else
+ _nlist_status_msg ""
+ fi
+
+ zcurses border main
+
+ local top_msg="${(C)ZSH_NAME} $ZSH_VERSION, shell level $SHLVL, $USER"
+ zcurses move main 0 $(( term_width / 2 - $#top_msg / 2 ))
+ zcurses string main $top_msg
+
+ zcurses refresh main inner
+ zcurses move main $(( term_height - 1 - 1 )) $(( status_msg_strlen + 2 ))
+
+ # Wait for input
+ zcurses input main key keypad
+
+ # Get the special (i.e. "keypad") key or regular key
+ if [ -n "$key" ]; then
+ final_key="$key"
+ elif [ -n "$keypad" ]; then
+ final_key="$keypad"
+ else
+ _nlist_status_msg "Inproper input detected"
+ zcurses refresh main inner
+ fi
+
+ n-list-input "$NLIST_CURRENT_IDX" "$NLIST_FROM_WHAT_IDX_LIST_IS_SHOWN" \
+ "$page_height" "$page_width" "$last_element" "$NLIST_TEXT_OFFSET" \
+ "$final_key" "$NLIST_IS_SEARCH_MODE" "$NLIST_SEARCH_BUFFER" \
+ "$NLIST_IS_UNIQ_MODE"
+
+ selection="$reply[1]"
+ action="$reply[2]"
+ NLIST_CURRENT_IDX="$reply[3]"
+ NLIST_FROM_WHAT_IDX_LIST_IS_SHOWN="$reply[4]"
+ NLIST_TEXT_OFFSET="$reply[5]"
+ NLIST_IS_SEARCH_MODE="$reply[6]"
+ NLIST_SEARCH_BUFFER="$reply[7]"
+ NLIST_IS_UNIQ_MODE="$reply[8]"
+
+ if [ "$action" = "SELECT" ]; then
+ REPLY="$selection"
+ reply=( "$list[@]" )
+ break
+ elif [ "$action" = "QUIT" ]; then
+ REPLY=-1
+ reply=( "$list[@]" )
+ break
+ elif [ "$action" = "REDRAW" ]; then
+ zcurses clear main redraw
+ zcurses clear inner redraw
+ fi
+done
+
+# vim: set filetype=zsh:
diff --git a/plugins/zsh-navigation-tools/n-list-draw b/plugins/zsh-navigation-tools/n-list-draw
new file mode 100644
index 000000000..2f8b1d0d5
--- /dev/null
+++ b/plugins/zsh-navigation-tools/n-list-draw
@@ -0,0 +1,131 @@
+# Copy this file into /usr/share/zsh/site-functions/
+# and add 'autoload n-list-draw` to .zshrc
+#
+# This is an internal function not for direct use
+
+emulate -L zsh
+
+zmodload zsh/curses
+
+setopt typesetsilent extendedglob
+
+_nlist_print_with_ansi() {
+ local win="$1" text="$2" out col chunk Xout
+ integer text_offset="$3" max_text_len="$4" text_len=0 no_match=0 nochunk_text_len to_skip_from_chunk to_chop_off_from_chunk before_len
+
+ # 1 - non-escaped text, 2 - first number in the escaped text, with ;
+ # 3 - second number, 4 - text after whole escape text
+
+ typeset -a c
+ c=( black red green yellow blue magenta cyan white )
+
+ while [[ -n "$text" && "$no_match" -eq 0 ]]; do
+ if [[ "$text" = (#b)([^$'\x1b']#)$'\x1b'\[([0-9](#c0,2))(#B)(\;|)(#b)([0-9](#c0,2))m(*) ]]; then
+ # Text for further processing
+ text="$match[4]"
+ # Text chunk to output now
+ out="$match[1]"
+ # Save color
+ col="$match[2]"
+ (( match[3] >= 30 && match[3] <= 37 )) && col="$match[3]"
+ else
+ out="$text"
+ no_match=1
+ fi
+
+ if [ -n "$out" ]; then
+################ Expand tabs ################
+ chunk="$out"
+ before_len="$text_len"
+ Xout=""
+
+ while [ -n "$chunk" ]; do
+ [[ "$chunk" = (#b)([^$'\t']#)$'\t'(*) ]] && {
+ (( all_text_len=((before_len+${#match[1]})/8+1)*8 ))
+
+ Xout+="${(r:all_text_len-before_len:: :)match[1]}"
+
+ before_len+=all_text_len-before_len
+ chunk="$match[2]"
+ } || {
+ Xout+="$chunk"
+ break
+ }
+ done
+#############################################
+
+ # Input text length without the current chunk
+ nochunk_text_len=text_len
+ # Input text length up to current chunk
+ text_len+="$#Xout"
+
+ # Should start displaying with this chunk?
+ # I.e. stop skipping left part of the input text?
+ if (( text_len > text_offset )); then
+ to_skip_from_chunk=text_offset-nochunk_text_len
+
+ # LEFT - is chunk off the left skip boundary? +1 for 1-based index in string
+ (( to_skip_from_chunk > 0 )) && Xout="${Xout[to_skip_from_chunk+1,-1]}"
+
+ # RIGHT - is text off the screen?
+ if (( text_len-text_offset > max_text_len )); then
+ to_chop_off_from_chunk=0+(text_len-text_offset)-max_text_len
+ Xout="${Xout[1,-to_chop_off_from_chunk-1]}"
+ fi
+
+ [ -n "$Xout" ] && zcurses string "$win" "$Xout"
+ fi
+ fi
+
+ if (( no_match == 0 )); then
+ if (( col >= 30 && col <= 37 )); then
+ zcurses attr "$win" $c[col-29]/black
+ elif [[ "$col" -eq 0 ]]; then
+ zcurses attr "$win" white/black
+ fi
+ fi
+ done
+}
+
+integer highlight="$1"
+integer page_height="$2"
+integer page_width="$3"
+local y_offset="$4"
+local x_offset="$5"
+local text_offset="$6"
+local win="$7"
+shift 7
+integer max_text_len=page_width-x_offset
+
+[ "$bold" = "0" ] && bold="" || bold="+bold"
+[[ "$active_text" = "underline" || "$active_text" = "reverse" ]] || local active_text="reverse"
+# With Linux terminal underline won't work properly
+[ "$TERM" = "linux" ] && active_text="reverse"
+
+integer max_idx=page_height
+integer end_idx=max_idx
+[ "$end_idx" -gt "$#" ] && end_idx="$#"
+integer y=y_offset
+
+zcurses attr "$win" $bold white/black
+
+integer i text_len
+local text
+for (( i=1; i<=end_idx; i++ )); do
+ zcurses move "$win" $y "$x_offset"
+
+ [ "$i" = "$highlight" ] && zcurses attr "$win" +"$active_text"
+ _nlist_print_with_ansi "$win" "$@[i]" "$text_offset" "$max_text_len"
+ zcurses clear "$win" eol
+ [ "$i" = "$highlight" ] && zcurses attr "$win" -"$active_text"
+
+ y+=1
+done
+
+if [ "$end_idx" -lt "$max_idx" ]; then
+ zcurses move "$win" $y "$x_offset"
+ zcurses clear "$win" eol
+fi
+
+zcurses attr "$win" white/black
+# vim: set filetype=zsh:
diff --git a/plugins/zsh-navigation-tools/n-list-input b/plugins/zsh-navigation-tools/n-list-input
new file mode 100644
index 000000000..957cd5a0b
--- /dev/null
+++ b/plugins/zsh-navigation-tools/n-list-input
@@ -0,0 +1,238 @@
+# Copy this file into /usr/share/zsh/site-functions/
+# and add 'autoload n-list-input` to .zshrc
+#
+# This is an internal function not for direct use
+
+emulate -L zsh
+
+zmodload zsh/curses
+
+setopt typesetsilent
+
+# Compute first to show index
+_nlist_compute_first_to_show_idx() {
+ from_what_idx_list_is_shown=0+((current_idx-1)/page_height)*page_height+1
+}
+
+typeset -ga reply
+reply=( -1 '' )
+integer current_idx="$1"
+integer from_what_idx_list_is_shown="$2"
+integer page_height="$3"
+integer page_width="$4"
+integer last_element="$5"
+integer hscroll="$6"
+local key="$7"
+integer search="$8"
+local buffer="$9"
+integer uniq_mode="$10"
+
+#
+# Listening for input
+#
+
+if [ "$search" = "0" ]; then
+
+case "$key" in
+ (UP|k|$'\C-P')
+ # Are there any elements before the current one?
+ [ "$current_idx" -gt 1 ] && current_idx=current_idx-1;
+ _nlist_compute_first_to_show_idx
+ ;;
+ (DOWN|j|$'\C-N')
+ # Are there any elements after the current one?
+ [ "$current_idx" -lt "$last_element" ] && current_idx=current_idx+1;
+ _nlist_compute_first_to_show_idx
+ ;;
+ (PPAGE|$'\b'|$'\C-?'|BACKSPACE)
+ current_idx=current_idx-page_height
+ [ "$current_idx" -lt 1 ] && current_idx=1;
+ _nlist_compute_first_to_show_idx
+ ;;
+ (NPAGE|" ")
+ current_idx=current_idx+page_height
+ [ "$current_idx" -gt "$last_element" ] && current_idx=last_element;
+ _nlist_compute_first_to_show_idx
+ ;;
+ ($'\C-U')
+ current_idx=current_idx-page_height/2
+ [ "$current_idx" -lt 1 ] && current_idx=1;
+ _nlist_compute_first_to_show_idx
+ ;;
+ ($'\C-D')
+ current_idx=current_idx+page_height/2
+ [ "$current_idx" -gt "$last_element" ] && current_idx=last_element;
+ _nlist_compute_first_to_show_idx
+ ;;
+ (HOME|g)
+ current_idx=1
+ _nlist_compute_first_to_show_idx
+ ;;
+ (END|G)
+ current_idx=last_element
+ _nlist_compute_first_to_show_idx
+ ;;
+ ($'\n'|ENTER)
+ # Is that element selectable?
+ # Check for this only when there is no search
+ if [[ "$NLIST_SEARCH_BUFFER" != "" || "$NLIST_IS_UNIQ_MODE" -eq 1 ||
+ ${NLIST_NONSELECTABLE_ELEMENTS[(r)$current_idx]} != $current_idx ]]
+ then
+ # Save current element in the result variable
+ reply=( $current_idx SELECT )
+ fi
+ ;;
+ (q)
+ reply=( -1 QUIT )
+ ;;
+ (/)
+ search=1
+ _nlist_cursor_visibility 1
+ ;;
+ ($'\t')
+ reply=( $current_idx LEAVE )
+ ;;
+ ($'\C-L')
+ reply=( -1 REDRAW )
+ ;;
+ (\])
+ [[ "${(t)NLIST_HOP_INDEXES}" = "array" || "${(t)NLIST_HOP_INDEXES}" = "array-local" ]] &&
+ [ -z "$NLIST_SEARCH_BUFFER" ] && [ "$NLIST_IS_UNIQ_MODE" -eq 0 ] &&
+ for idx in "${(n)NLIST_HOP_INDEXES[@]}"; do
+ if [ "$idx" -gt "$current_idx" ]; then
+ current_idx=$idx
+ _nlist_compute_first_to_show_idx
+ break
+ fi
+ done
+ ;;
+ (\[)
+ [[ "${(t)NLIST_HOP_INDEXES}" = "array" || "${(t)NLIST_HOP_INDEXES}" = "array-local" ]] &&
+ [ -z "$NLIST_SEARCH_BUFFER" ] && [ "$NLIST_IS_UNIQ_MODE" -eq 0 ] &&
+ for idx in "${(nO)NLIST_HOP_INDEXES[@]}"; do
+ if [ "$idx" -lt "$current_idx" ]; then
+ current_idx=$idx
+ _nlist_compute_first_to_show_idx
+ break
+ fi
+ done
+ ;;
+ ('<'|'{'|LEFT|'h')
+ hscroll=hscroll-7
+ [ "$hscroll" -lt 0 ] && hscroll=0
+ ;;
+ ('>'|'}'|RIGHT|'l')
+ hscroll+=7
+ ;;
+ ($'\E')
+ buffer=""
+ ;;
+ (o|$'\C-O')
+ uniq_mode=1-uniq_mode
+ ;;
+ (*)
+ ;;
+esac
+
+else
+
+case "$key" in
+ ($'\n'|ENTER)
+ search=0
+ _nlist_cursor_visibility 0
+ ;;
+ ($'\C-L')
+ reply=( -1 REDRAW )
+ ;;
+
+ #
+ # Slightly limited navigation
+ #
+
+ (UP|$'\C-P')
+ [ "$current_idx" -gt 1 ] && current_idx=current_idx-1;
+ _nlist_compute_first_to_show_idx
+ ;;
+ (DOWN|$'\C-N')
+ [ "$current_idx" -lt "$last_element" ] && current_idx=current_idx+1;
+ _nlist_compute_first_to_show_idx
+ ;;
+ (PPAGE)
+ current_idx=current_idx-page_height
+ [ "$current_idx" -lt 1 ] && current_idx=1;
+ _nlist_compute_first_to_show_idx
+ ;;
+ (NPAGE)
+ current_idx=current_idx+page_height
+ [ "$current_idx" -gt "$last_element" ] && current_idx=last_element;
+ _nlist_compute_first_to_show_idx
+ ;;
+ ($'\C-U')
+ current_idx=current_idx-page_height/2
+ [ "$current_idx" -lt 1 ] && current_idx=1;
+ _nlist_compute_first_to_show_idx
+ ;;
+ ($'\C-D')
+ current_idx=current_idx+page_height/2
+ [ "$current_idx" -gt "$last_element" ] && current_idx=last_element;
+ _nlist_compute_first_to_show_idx
+ ;;
+ (HOME)
+ current_idx=1
+ _nlist_compute_first_to_show_idx
+ ;;
+ (END)
+ current_idx=last_element
+ _nlist_compute_first_to_show_idx
+ ;;
+ (LEFT)
+ hscroll=hscroll-7
+ [ "$hscroll" -lt 0 ] && hscroll=0
+ ;;
+ (RIGHT)
+ hscroll+=7
+ ;;
+ (F1|F2|F3|F4|F5|F6|F7|F8|F9|F10)
+ # ignore
+ ;;
+
+ #
+ # The input
+ #
+
+ ($'\b'|$'\C-?'|BACKSPACE)
+ buffer="${buffer%?}"
+ ;;
+ ($'\C-W')
+ [ "$buffer" = "${buffer% *}" ] && buffer="" || buffer="${buffer% *}"
+ ;;
+ ($'\C-K')
+ buffer=""
+ ;;
+ ($'\E')
+ buffer=""
+ search=0
+ _nlist_cursor_visibility 0
+ ;;
+ ($'\C-O')
+ uniq_mode=1-uniq_mode
+ ;;
+ (*)
+ if [[ $#key == 1 && $((#key)) -lt 31 ]]; then
+ # ignore all other control keys
+ else
+ buffer+="$key"
+ fi
+ ;;
+esac
+
+fi
+
+reply[3]="$current_idx"
+reply[4]="$from_what_idx_list_is_shown"
+reply[5]="$hscroll"
+reply[6]="$search"
+reply[7]="$buffer"
+reply[8]="$uniq_mode"
+
+# vim: set filetype=zsh:
diff --git a/plugins/zsh-navigation-tools/n-options b/plugins/zsh-navigation-tools/n-options
new file mode 100644
index 000000000..91589bd45
--- /dev/null
+++ b/plugins/zsh-navigation-tools/n-options
@@ -0,0 +1,84 @@
+# Copy this file into /usr/share/zsh/site-functions/
+# and add 'autoload n-options` to .zshrc
+#
+# This function allows to browse and toggle shell's options
+#
+# Uses n-list
+
+#emulate -L zsh
+
+zmodload zsh/curses
+
+local IFS="
+"
+
+unset NLIST_COLORING_PATTERN
+
+[ -f ~/.config/znt/n-list.conf ] && . ~/.config/znt/n-list.conf
+[ -f ~/.config/znt/n-options.conf ] && . ~/.config/znt/n-options.conf
+
+# TODO restore options
+unsetopt localoptions
+
+integer kshoptionprint=0
+[[ -o kshoptionprint ]] && kshoptionprint=1
+setopt kshoptionprint
+
+local list
+local selected
+local option
+local state
+
+# 0 - don't remember, 1 - remember, 2 - init once, then remember
+NLIST_REMEMBER_STATE=2
+
+local NLIST_GREP_STRING="${1:=}"
+
+while (( 1 )); do
+ list=( `setopt` )
+ list=( "${(M)list[@]:#*${1:=}*}" )
+ list=( "${list[@]:#kshoptionprint*}" )
+
+ if [ "$#list" -eq 0 ]; then
+ echo "No matching options"
+ break
+ fi
+
+ local red=$'\x1b[00;31m' green=$'\x1b[00;32m' reset=$'\x1b[00;00m'
+ list=( "${list[@]/ off/${red} off$reset}" )
+ #list=( "${list[@]/ on/${green} on$reset}" )
+ list=( "${(i)list[@]}" )
+
+ n-list "${list[@]}"
+
+ if [ "$REPLY" -gt 0 ]; then
+ [[ -o ksharrays ]] && selected="${reply[$(( REPLY - 1 ))]}" || selected="${reply[$REPLY]}"
+ option="${selected%% *}"
+ state="${selected##* }"
+
+ if [[ -o globsubst ]]; then
+ unsetopt globsubst
+ state="${state%$reset}"
+ setopt globsubst
+ else
+ state="${state%$reset}"
+ fi
+
+ # Toggle the option
+ if [ "$state" = "on" ]; then
+ echo "Setting |$option| to off"
+ unsetopt "$option"
+ else
+ echo "Setting |$option| to on"
+ setopt "$option"
+ fi
+ else
+ break
+ fi
+done
+
+NLIST_REMEMBER_STATE=0
+
+[[ "$kshoptionprint" -eq 0 ]] && unsetopt kshoptionprint
+
+# vim: set filetype=zsh:
diff --git a/plugins/zsh-navigation-tools/n-panelize b/plugins/zsh-navigation-tools/n-panelize
new file mode 100644
index 000000000..01d01cb9e
--- /dev/null
+++ b/plugins/zsh-navigation-tools/n-panelize
@@ -0,0 +1,68 @@
+# Copy this file into /usr/share/zsh/site-functions/
+# and add 'autoload n-panelize` to .zshrc
+#
+# This function somewhat reminds the panelize feature from Midnight Commander
+# It allows browsing output of arbitrary command. Example usage:
+# v-panelize ls /usr/local/bin
+#
+# Uses n-list
+
+emulate -L zsh
+
+setopt extendedglob
+zmodload zsh/curses
+
+local IFS="
+"
+
+unset NLIST_COLORING_PATTERN
+
+[ -f ~/.config/znt/n-list.conf ] && . ~/.config/znt/n-list.conf
+[ -f ~/.config/znt/n-panelize.conf ] && . ~/.config/znt/n-panelize.conf
+
+local list
+local selected
+
+NLIST_REMEMBER_STATE=0
+
+if [ -t 0 ]; then
+ # Check if there is proper input
+ if [ "$#" -lt 1 ]; then
+ echo "Usage: n-panelize {command} [option|argument] ... or command | n-panelize"
+ return 1
+ fi
+
+ # This loop makes script faster on some Zsh's (e.g. 5.0.8)
+ repeat 1; do
+ list=( `"$@"` )
+ done
+
+ # TODO: $? doesn't reach user
+ [ "$?" -eq 127 ] && return $?
+else
+ # Check if can reattach to terminal
+ if [[ ! -c /dev/tty && ! -t 2 ]]; then
+ echo "No terminal available (no /dev/tty)"
+ return 1
+ fi
+
+ # This loop makes script faster on some Zsh's (e.g. 5.0.8)
+ repeat 1; do
+ list=( "${(@f)"$(<&0)"}" )
+ done
+
+ if [[ ! -c /dev/tty ]]; then
+ exec <&2
+ else
+ exec </dev/tty
+ fi
+fi
+
+n-list "${list[@]}"
+
+if [ "$REPLY" -gt 0 ]; then
+ selected="$reply[REPLY]"
+ print -zr "# $selected"
+fi
+
+# vim: set filetype=zsh:
diff --git a/plugins/zsh-navigation-tools/znt-cd-widget b/plugins/zsh-navigation-tools/znt-cd-widget
new file mode 100644
index 000000000..6d1be6bff
--- /dev/null
+++ b/plugins/zsh-navigation-tools/znt-cd-widget
@@ -0,0 +1,8 @@
+autoload znt-usetty-wrapper n-cd
+local NLIST_START_IN_SEARCH_MODE=0
+local NLIST_START_IN_UNIQ_MODE=0
+
+znt-usetty-wrapper n-cd "$@"
+
+unset NLIST_START_IN_SEARCH_MODE
+unset NLIST_START_IN_UNIQ_MODE
diff --git a/plugins/zsh-navigation-tools/znt-history-widget b/plugins/zsh-navigation-tools/znt-history-widget
new file mode 100644
index 000000000..a4a26cbfc
--- /dev/null
+++ b/plugins/zsh-navigation-tools/znt-history-widget
@@ -0,0 +1,14 @@
+autoload znt-usetty-wrapper n-history
+local NLIST_START_IN_SEARCH_MODE=1
+local NLIST_START_IN_UNIQ_MODE=1
+
+# Only if current $BUFFER doesn't come from history
+if [ "$HISTCMD" = "$HISTNO" ]; then
+ local NLIST_SET_SEARCH_TO="$BUFFER"
+fi
+
+znt-usetty-wrapper n-history "$@"
+
+unset NLIST_START_IN_SEARCH_MODE
+unset NLIST_START_IN_UNIQ_MODE
+unset NLIST_SET_SEARCH_TO
diff --git a/plugins/zsh-navigation-tools/znt-kill-widget b/plugins/zsh-navigation-tools/znt-kill-widget
new file mode 100644
index 000000000..1aff7bb50
--- /dev/null
+++ b/plugins/zsh-navigation-tools/znt-kill-widget
@@ -0,0 +1,8 @@
+autoload znt-usetty-wrapper n-kill
+local NLIST_START_IN_SEARCH_MODE=0
+local NLIST_START_IN_UNIQ_MODE=0
+
+znt-usetty-wrapper n-kill "$@"
+
+unset NLIST_START_IN_SEARCH_MODE
+unset NLIST_START_IN_UNIQ_MODE
diff --git a/plugins/zsh-navigation-tools/znt-usetty-wrapper b/plugins/zsh-navigation-tools/znt-usetty-wrapper
new file mode 100644
index 000000000..19c5ac8b6
--- /dev/null
+++ b/plugins/zsh-navigation-tools/znt-usetty-wrapper
@@ -0,0 +1,40 @@
+emulate -L zsh
+
+zmodload zsh/curses
+
+test_fd0() {
+ true <&0
+}
+
+local restore=0 FD
+
+# Reattach to terminal
+if [ ! -t 0 ]; then
+ # Check if can reattach to terminal in any way
+ if [[ ! -c /dev/tty && ! -t 2 ]]; then
+ echo "No terminal available (no /dev/tty and no terminal at stderr)"
+ return 1
+ fi
+
+ if test_fd0 2>/dev/null; then
+ exec {FD}<&0
+ restore=2
+ else
+ restore=1
+ fi
+
+ if [[ ! -c /dev/tty ]]; then
+ exec <&2
+ else
+ exec </dev/tty
+ fi
+fi
+
+# Run the command
+"$@"
+
+# Restore FD state
+(( restore == 1 )) && exec <&-
+(( restore == 2 )) && exec <&$FD && exec {FD}<&-
+
+# vim: set filetype=zsh:
diff --git a/plugins/zsh-navigation-tools/zsh-navigation-tools.plugin.zsh b/plugins/zsh-navigation-tools/zsh-navigation-tools.plugin.zsh
new file mode 100755
index 000000000..16247b8db
--- /dev/null
+++ b/plugins/zsh-navigation-tools/zsh-navigation-tools.plugin.zsh
@@ -0,0 +1,38 @@
+#!/usr/bin/env zsh
+
+REPO_DIR="${0%/*}"
+CONFIG_DIR="$HOME/.config/znt"
+
+#
+# Copy configs
+#
+
+if ! test -d "$HOME/.config"; then
+ mkdir "$HOME/.config"
+fi
+
+if ! test -d "$CONFIG_DIR"; then
+ mkdir "$CONFIG_DIR"
+fi
+
+set n-aliases.conf n-env.conf n-history.conf n-list.conf n-panelize.conf n-cd.conf n-functions.conf n-kill.conf n-options.conf
+
+for i; do
+ if ! test -f "$CONFIG_DIR/$i"; then
+ cp "$REPO_DIR/.config/znt/$i" "$CONFIG_DIR"
+ fi
+done
+
+#
+# Load functions
+#
+
+autoload n-aliases n-cd n-env n-functions n-history n-kill n-list n-list-draw n-list-input n-options n-panelize
+autoload znt-usetty-wrapper znt-history-widget znt-cd-widget znt-kill-widget
+alias naliases=n-aliases ncd=n-cd nenv=n-env nfunctions=n-functions nhistory=n-history
+alias nkill=n-kill noptions=n-options npanelize=n-panelize
+
+zle -N znt-history-widget
+bindkey '^R' znt-history-widget
+setopt AUTO_PUSHD HIST_IGNORE_DUPS PUSHD_IGNORE_DUPS
+