From fdb3c0e68d36d20d1b75163755d568d42def5ac1 Mon Sep 17 00:00:00 2001 From: Anton Eicher <antone@antone-3.desktop.amazon.com> Date: Wed, 19 Dec 2012 07:22:03 -0800 Subject: [PATCH 001/488] Added check for .git directory in current, before wasting time querying git. This saves seconds on my pc. --- plugins/git/git.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 154aa6db1..79300a166 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -73,12 +73,14 @@ alias gsd='git svn dcommit' # Usage example: git pull origin $(current_branch) # function current_branch() { + if [ ! -d .git ]; then return; fi 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() { + if [ ! -d .git ]; then return; fi 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) From 9674a96b5bc296a767c2560757626bf2bc3a9ad3 Mon Sep 17 00:00:00 2001 From: Frank Louwers <frank@openminds.be> Date: Wed, 13 Feb 2013 12:02:36 +0100 Subject: [PATCH 002/488] [pj-plugin] delete ugly ls -l | awk print $9 thing to use something not depending on date format + add support for projects with spaces in them --- plugins/pj/pj.plugin.zsh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/plugins/pj/pj.plugin.zsh b/plugins/pj/pj.plugin.zsh index ba3765b83..b98bfec34 100644 --- a/plugins/pj/pj.plugin.zsh +++ b/plugins/pj/pj.plugin.zsh @@ -18,8 +18,11 @@ function pj() { file=$1 if [[ "open" == "$file" ]] then - file=$2 + shift + file=$* cmd=(${(s: :)EDITOR}) + else + file=$* fi for project in $PROJECT_PATHS; do @@ -36,7 +39,14 @@ function pj() { alias pjo="pj open" function _pj () { - compadd `/bin/ls -l $PROJECT_PATHS 2>/dev/null | awk '{ print $9 }'` + # might be possible to improve this using glob, without the basename trick + typeset -a projects + foreach i ($PROJECT_PATHS/*) + do + projects+=`basename $i` + done + + _arguments '*:file:($projects)' } compdef _pj pj From df67f2ee30dbad61117e1886b0a4de326cb6daf7 Mon Sep 17 00:00:00 2001 From: Frank Louwers <frank@openminds.be> Date: Wed, 13 Feb 2013 13:39:47 +0100 Subject: [PATCH 003/488] [pj-plugin] avoid using basename. migth be (a lot?) faster --- plugins/pj/pj.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/pj/pj.plugin.zsh b/plugins/pj/pj.plugin.zsh index b98bfec34..dac561189 100644 --- a/plugins/pj/pj.plugin.zsh +++ b/plugins/pj/pj.plugin.zsh @@ -43,7 +43,7 @@ function _pj () { typeset -a projects foreach i ($PROJECT_PATHS/*) do - projects+=`basename $i` + projects+=(${i##*/}) done _arguments '*:file:($projects)' From 7fb17127c7ef2ff11240af5c42430ae3ae1c0369 Mon Sep 17 00:00:00 2001 From: Dmitri Akatov <akatov@gmail.com> Date: Wed, 24 Jul 2013 14:30:12 -0700 Subject: [PATCH 004/488] carton completion plugin --- plugins/carton/carton.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 plugins/carton/carton.plugin.zsh diff --git a/plugins/carton/carton.plugin.zsh b/plugins/carton/carton.plugin.zsh new file mode 100644 index 000000000..23868b09c --- /dev/null +++ b/plugins/carton/carton.plugin.zsh @@ -0,0 +1,6 @@ +if which carton &> /dev/null +then + source $(dirname $(which carton))/../etc/carton_completion.zsh +else + print "zsh carton plugin: carton not found" +fi From 55c90b1d6cbda581f9ccd41ea1c8da15da98d5ee Mon Sep 17 00:00:00 2001 From: Dmitri Akatov <akatov@gmail.com> Date: Fri, 26 Jul 2013 20:00:45 -0700 Subject: [PATCH 005/488] grunt completion courtesy of @yonchu: https://github.com/yonchu/grunt-zsh-completion --- plugins/grunt/grunt.plugin.zsh | 253 +++++++++++++++++++++++++++++++++ 1 file changed, 253 insertions(+) create mode 100644 plugins/grunt/grunt.plugin.zsh diff --git a/plugins/grunt/grunt.plugin.zsh b/plugins/grunt/grunt.plugin.zsh new file mode 100644 index 000000000..48f6cb5a2 --- /dev/null +++ b/plugins/grunt/grunt.plugin.zsh @@ -0,0 +1,253 @@ +#compdef grunt +# ----------------------------------------------------------------------------- +# _grunt +# +# Completion script for grunt. +# - https://github.com/gruntjs/grunt +# - https://github.com/gruntjs/grunt-cli +# +# ----------------------------------------------------------------------------- +# +# Version : 0.1.0 +# Author : Yonchu <yuyuchu3333@gmail.com> +# License : MIT License +# Repository : https://github.com/yonchu/grunt-zsh-completion +# Last Change : 22 Jul 2013. +# +# Copyright (c) 2013 Yonchu. +# +# ----------------------------------------------------------------------------- +# USAGE +# ----- +# +# Enable caching: +# +# If you want to use the cache, set the followings in your .zshrc: +# +# zstyle ':completion:*' use-cache yes +# +# +# Settings: +# +# - Show grunt file path: +# zstyle ':completion::complete:grunt::options:' show_grunt_path yes +# +# - Cache expiration days (default: 7): +# zstyle ':completion::complete:grunt::options:' expire 1 +# +# - Not update options cache if target gruntfile is changed. +# zstyle ':completion::complete:grunt::options:' no_update_options yes +# +# Note that if you change the zstyle settings, +# you should delete the cache file and restart zsh. +# +# $ rm ~/.zcompcache/grunt +# $ exec zsh +# +# ----------------------------------------------------------------------------- + +function _grunt() { + local curcontext="$curcontext" update_policy state + local show_grunt_path update_msg gruntfile opts tasks + + # Setup cache-policy. + zstyle -s ":completion:${curcontext}:" cache-policy update_policy + if [[ -z $update_policy ]]; then + zstyle ":completion:${curcontext}:" cache-policy __grunt_caching_policy + fi + + # Check show_path option. + zstyle -b ":completion:${curcontext}:options:" show_grunt_path show_grunt_path + + # Get current gruntfile. + gruntfile=$(__grunt_get_gruntfile) + + # Initialize opts and tasks. + opts=() + tasks=() + + # Add help options. + opts+=('(- 1 *)'{-h,--help}'[Display this help text.]') + + ## Complete without gruntfile. + if [[ ! -f $gruntfile ]]; then + _arguments "${opts[@]}" + return + fi + + ## Complete with gruntfile. + # Retrieve cache. + if ! __grunt_update_cache "$gruntfile"; then + update_msg=' (cache updated)' + fi + + # Make optioins completion. + if [[ ${#__grunt_opts} -gt 0 ]]; then + opts+=("${__grunt_opts[@]}") + fi + + # Complete arguments. + _arguments \ + "${opts[@]}" \ + '*: :->tasks' \ + && return + + case $state in + tasks) + if [[ $show_grunt_path == 'yes' ]]; then + update_msg="$update_msg: ${${gruntfile/#$HOME/~}%/}" + fi + # Make tasks completion. + if [[ ${#__grunt_tasks} -gt 0 ]]; then + tasks+=("${__grunt_tasks[@]}") + _describe -t grunt-task "$verbose grunt task$update_msg" tasks || return 1 + fi + ;; + esac + + return 0 +} + +# Cache policy: +# The cache file name: grunt +# The cache variable name: __grunt_version __grunt_gruntfile __grunt_opts __grunt_tasks +function __grunt_update_cache() { + # TODO + local version='0.1.0' + local is_updating=0 + local gruntfile="$1" + local grunt_info no_update_options cache_path + + # Check no_update_options option. + zstyle -b ":completion:${curcontext}:options:" no_update_options no_update_options + + + if ! ( (( $+__grunt_gruntfile )) \ + && (( $+__grunt_opts )) \ + && (( $+__grunt_tasks )) ) \ + && ! _retrieve_cache 'grunt'; then + is_updating=1 + fi + + if [[ $gruntfile != $__grunt_gruntfile ]]; then + # Except for --help options. + __grunt_gruntfile=$gruntfile + if [[ $no_update_options == 'yes' ]]; then + if [[ $PREFIX == ${PREFIX#-} ]]; then + # Not options completions. + is_updating=1 + elif [[ ${#__grunt_opts} -lt 2 ]]; then + is_updating=1 + else + unset __grunt_gruntfile + fi + else + is_updating=1 + fi + else + if [[ $PREFIX != ${PREFIX#-} && ${#__grunt_opts} -gt 1 ]]; then + unset __grunt_gruntfile + fi + fi + + if _cache_invalid 'grunt'; then + is_updating=1 + fi + + # Check _grunt version. + if [[ $__grunt_version != $version ]]; then + is_updating=1 + fi + + if [[ $is_updating -ne 0 ]]; then + # Update caceh. + __grunt_version=$version + __grunt_gruntfile=$gruntfile + is_updating=1 + grunt_info=$(grunt --help --no-color --gruntfile "$__grunt_gruntfile" 2>/dev/null) + __grunt_opts=(${(f)"$(__grunt_get_opts "$grunt_info")"}) + __grunt_tasks=(${(f)"$(__grunt_get_tasks "$grunt_info")"}) + _store_cache 'grunt' __grunt_version __grunt_gruntfile __grunt_opts __grunt_tasks + fi + return $is_updating +} + +function __grunt_get_tasks() { + echo -E "$1" \ + | grep 'Available tasks' -A 100 \ + | grep '^ ' \ + | sed -e 's/^[[:blank:]]*//' -e 's/[[:blank:]]*$//' \ + | sed -e 's/ /:/' +} + +function __grunt_get_opts() { + local opt_hunk opt_sep opt_num line opt + opt_hunk=$(echo -E "$1" \ + | grep 'Options$' -A 100 \ + | sed '1 d' \ + | sed -e 's/[[:blank:]]*$//' \ + ) + + opt_sep=() + opt_hunk=(${(f)opt_hunk}) + opt_num=0 + for line in "$opt_hunk[@]"; do + opt=$(echo -E "$line" | sed -e 's/^[[:blank:]]*//') + if [[ $line == $opt ]]; then + break + fi + if [[ $opt != ${opt#-} ]]; then + # Start with - + (( opt_num++ )) + opt=$(echo -E "$opt" | sed 's/^\(\(--[^ ]*\)\(, \(-[^ ]*\)\)*\) */\2\\t\4\\\t/') + fi + opt_sep[$opt_num]=("${opt_sep[$opt_num]}${opt}") + done + + for line in "$opt_sep[@]"; do + opt=(${(s:\t:)line}) + if [[ ${opt[1]} == '--help' ]]; then + continue + fi + if [[ ${#opt} -eq 2 ]]; then + echo -E "(${opt[1]})${opt[1]}[${opt[2]}]" + else + echo -E "(${opt[1]},${opt[2]})${opt[1]}[${opt[3]}]" + echo -E "(${opt[1]},${opt[2]})${opt[2]}[${opt[3]}]" + fi + done +} + +function __grunt_get_gruntfile() { + local gruntfile + local curpath="$PWD" + while [ "$curpath" ]; do + for gruntfile in "$curpath/"{G,g}runtfile.{js,coffee}; do + if [[ -e "$gruntfile" ]]; then + echo "$gruntfile" + return + fi + done + curpath=${curpath%/*} + done + return 1 +} + +function __grunt_caching_policy() { + # Returns status zero if the completions cache needs rebuilding. + + # Rebuild if .agignore more recent than cache. + if [[ -f $__grunt_gruntfile && $__grunt_gruntfile -nt $1 ]]; then + # Invalid cache because gruntfile is old. + return 0 + fi + + local -a oldp + local expire + zstyle -s ":completion:${curcontext}:options:" expire expire || expire=7 + # Rebuild if cache is more than $expire days. + oldp=( "$1"(Nm+$expire) ) + (( $#oldp )) +} + +compdef _grunt grunt From 1af012d4991a36bfb0e2def3e67f5a0e56fc49e4 Mon Sep 17 00:00:00 2001 From: Dmitri Akatov <akatov@gmail.com> Date: Tue, 6 Aug 2013 13:28:52 -0700 Subject: [PATCH 006/488] carton was renamed to cask --- plugins/carton/carton.plugin.zsh | 6 ------ plugins/cask/cask.plugin.zsh | 5 +++++ 2 files changed, 5 insertions(+), 6 deletions(-) delete mode 100644 plugins/carton/carton.plugin.zsh create mode 100644 plugins/cask/cask.plugin.zsh diff --git a/plugins/carton/carton.plugin.zsh b/plugins/carton/carton.plugin.zsh deleted file mode 100644 index 23868b09c..000000000 --- a/plugins/carton/carton.plugin.zsh +++ /dev/null @@ -1,6 +0,0 @@ -if which carton &> /dev/null -then - source $(dirname $(which carton))/../etc/carton_completion.zsh -else - print "zsh carton plugin: carton not found" -fi diff --git a/plugins/cask/cask.plugin.zsh b/plugins/cask/cask.plugin.zsh new file mode 100644 index 000000000..c55862924 --- /dev/null +++ b/plugins/cask/cask.plugin.zsh @@ -0,0 +1,5 @@ +if which cask &> /dev/null; then + source $(dirname $(which cask))/../etc/cask_completion.zsh +else + print "zsh cask plugin: cask not found" +fi From a7c88c988a4be02b8883c06e57c6eb290c8fcb21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A4ntz=20Miccoli?= <frantz.miccoli@fakedomain.com> Date: Sun, 15 Sep 2013 23:16:11 +0200 Subject: [PATCH 007/488] Removed comments and other elements that might appear in the phing -l output. The current version doesn't work at all on my environment (OSX 10.7) --- plugins/phing/phing.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/phing/phing.plugin.zsh b/plugins/phing/phing.plugin.zsh index 795f1db85..9af03af24 100644 --- a/plugins/phing/phing.plugin.zsh +++ b/plugins/phing/phing.plugin.zsh @@ -7,7 +7,7 @@ _phing_does_target_list_need_generating () { _phing () { if [ -f build.xml ]; then if _phing_does_target_list_need_generating; then - phing -l |grep -v ":$" |grep -v "^-*$" > .phing_targets + phing -l|grep -v "\[property\]"|grep -v "Buildfile"|sed 1d|grep -v ":$" |grep -v "^\-*$"|awk '{print $1}' > .phing_targets fi compadd `cat .phing_targets` fi From 244533320062afd470e4aa6aab92e1532cf2fec3 Mon Sep 17 00:00:00 2001 From: Rimenes Ribeiro <eu@rimenes.net> Date: Tue, 24 Sep 2013 15:20:52 -0300 Subject: [PATCH 008/488] Add reload and status alises to postgres --- plugins/postgres/postgres.plugin.zsh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/postgres/postgres.plugin.zsh b/plugins/postgres/postgres.plugin.zsh index cdd142e92..c2dbef244 100644 --- a/plugins/postgres/postgres.plugin.zsh +++ b/plugins/postgres/postgres.plugin.zsh @@ -1,6 +1,8 @@ -# Aliases to stop, start and restart Postgres -# Paths noted below are for Postgress installed via Homebrew on OSX +# Aliases to control Postgres +# Paths noted below are for Postgres installed via Homebrew on OSX alias startpost='pg_ctl -D /usr/local/var/postgres -l /usr/local/var/postgres/server.log start' alias stoppost='pg_ctl -D /usr/local/var/postgres stop -s -m fast' -alias restartpost='stoppost && sleep 1 && startpost' \ No newline at end of file +alias restartpost='stoppost && sleep 1 && startpost' +alias reloadpost='pg_ctl reload -D /usr/local/var/postgres -s' +alias statuspost='pg_ctl status -D /usr/local/var/postgres -s' \ No newline at end of file From d608fbfc7fcabf9994f8064e67670e69130d2ee1 Mon Sep 17 00:00:00 2001 From: Riyad Preukschas <riyad.preukschas@antevorte.org> Date: Tue, 15 Oct 2013 14:34:03 +0200 Subject: [PATCH 009/488] Make the virtualenv plugin themable --- plugins/virtualenv/virtualenv.plugin.zsh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/virtualenv/virtualenv.plugin.zsh b/plugins/virtualenv/virtualenv.plugin.zsh index 8e06450b1..e250eb63e 100644 --- a/plugins/virtualenv/virtualenv.plugin.zsh +++ b/plugins/virtualenv/virtualenv.plugin.zsh @@ -1,7 +1,6 @@ function virtualenv_prompt_info(){ - if [[ -n $VIRTUAL_ENV ]]; then - printf "%s[%s] " "%{${fg[yellow]}%}" ${${VIRTUAL_ENV}:t} - fi + [[ -n ${VIRTUAL_ENV} ]] || return + echo "${ZSH_THEME_VIRTUALENV_PREFIX:=[}${VIRTUAL_ENV:t}${ZSH_THEME_VIRTUALENV_SUFFIX:=]}" } # disables prompt mangling in virtual_env/bin/activate From 9b811fb625c03c30a766191cdf65a1c7c1fd96b2 Mon Sep 17 00:00:00 2001 From: Michael Orr <michael.orr@coxinc.com> Date: Fri, 6 Dec 2013 17:31:35 -0500 Subject: [PATCH 010/488] accidentally blew away a git config setting used for another purpose, renaming in order to distinguish --- lib/git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index 305a77aff..a1396653b 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -13,7 +13,7 @@ parse_git_dirty() { local SUBMODULE_SYNTAX='' local GIT_STATUS='' local CLEAN_MESSAGE='nothing to commit (working directory clean)' - if [[ "$(command git config --get oh-my-zsh.hide-status)" != "1" ]]; then + if [[ "$(command git config --get oh-my-zsh.hide-dirty)" != "1" ]]; then if [[ $POST_1_7_2_GIT -gt 0 ]]; then SUBMODULE_SYNTAX="--ignore-submodules=dirty" fi From 00b2cc653421c1465f7596f22c19d21f42aa0396 Mon Sep 17 00:00:00 2001 From: Andrew Dwyer <andrewrdwyer@gmail.com> Date: Sat, 21 Dec 2013 11:17:05 +1030 Subject: [PATCH 011/488] New plugin for the n98-magerun Magento command line tool --- plugins/n98-magerun/n98-magerun.plugin.zsh | 25 ++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100755 plugins/n98-magerun/n98-magerun.plugin.zsh diff --git a/plugins/n98-magerun/n98-magerun.plugin.zsh b/plugins/n98-magerun/n98-magerun.plugin.zsh new file mode 100755 index 000000000..e4b0d6885 --- /dev/null +++ b/plugins/n98-magerun/n98-magerun.plugin.zsh @@ -0,0 +1,25 @@ +# ------------------------------------------------------------------------------ +# 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 () { + n98-magerun.phar --no-ansi | sed "1,/Available commands/d" | awk '/^\s+[a-z]+/ { print $1 }' +} + +_n98_magerun () { + compadd `_n98_magerun_get_command_list` +} + +compdef _n98_magerun n98-magerun.phar + +# Aliases +alias n98-magerun='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' From 3976b93f3931a7ebc913576015ff395dcd495d95 Mon Sep 17 00:00:00 2001 From: Daniel Farrell <dfarrell07@gmail.com> Date: Sun, 23 Mar 2014 15:59:35 -0400 Subject: [PATCH 012/488] Fixed which output at each new shell creation --- themes/gallois.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/gallois.zsh-theme b/themes/gallois.zsh-theme index f1057a9a9..f31d21958 100644 --- a/themes/gallois.zsh-theme +++ b/themes/gallois.zsh-theme @@ -18,7 +18,7 @@ else if which rbenv &> /dev/null; then RPS1='$(git_custom_status)%{$fg[red]%}[`rbenv version | sed -e "s/ (set.*$//"`]%{$reset_color%} $EPS1' else - if [[ -n `which chruby_prompt_info` && -n `chruby_prompt_info` ]]; then + if [[ -n `which chruby_prompt_info &> /dev/null` && -n `chruby_prompt_info` ]]; then RPS1='$(git_custom_status)%{$fg[red]%}[`chruby_prompt_info`]%{$reset_color%} $EPS1' else RPS1='$(git_custom_status) $EPS1' From b2ce306c4f49ebb1ef2bde5b86d553ce6ea674aa Mon Sep 17 00:00:00 2001 From: Daniel Farrell <dfarrell07@gmail.com> Date: Tue, 25 Mar 2014 23:37:28 -0400 Subject: [PATCH 013/488] Simplified gallois RPS1 setup using some helpful scripts --- themes/gallois.zsh-theme | 20 ++++++-------------- 1 file changed, 6 insertions(+), 14 deletions(-) diff --git a/themes/gallois.zsh-theme b/themes/gallois.zsh-theme index f31d21958..d383ed583 100644 --- a/themes/gallois.zsh-theme +++ b/themes/gallois.zsh-theme @@ -11,19 +11,11 @@ git_custom_status() { fi } -#RVM and git settings -if [[ -s ~/.rvm/scripts/rvm ]] ; then - RPS1='$(git_custom_status)%{$fg[red]%}[`~/.rvm/bin/rvm-prompt`]%{$reset_color%} $EPS1' -else - if which rbenv &> /dev/null; then - RPS1='$(git_custom_status)%{$fg[red]%}[`rbenv version | sed -e "s/ (set.*$//"`]%{$reset_color%} $EPS1' - else - if [[ -n `which chruby_prompt_info &> /dev/null` && -n `chruby_prompt_info` ]]; then - RPS1='$(git_custom_status)%{$fg[red]%}[`chruby_prompt_info`]%{$reset_color%} $EPS1' - else - RPS1='$(git_custom_status) $EPS1' - fi - fi -fi +# RVM component of prompt +ZSH_THEME_RVM_PROMPT_PREFIX="%{$fg[red]%}[" +ZSH_THEME_RVM_PROMPT_SUFFIX="]%{$reset_color%}" + +# Combine it all into a final right-side prompt +RPS1='$(git_custom_status)$(ruby_prompt_info) $EPS1' PROMPT='%{$fg[cyan]%}[%~% ]%(?.%{$fg[green]%}.%{$fg[red]%})%B$%b ' From b2ea7d3ec12152ab4d864c27c33d8b9396c68858 Mon Sep 17 00:00:00 2001 From: Stanislav Schultz <ixrb@ya.ru> Date: Fri, 28 Mar 2014 20:25:13 +0300 Subject: [PATCH 014/488] Add Ruby 2.1.1 support to rvm plugin --- plugins/rvm/rvm.plugin.zsh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins/rvm/rvm.plugin.zsh b/plugins/rvm/rvm.plugin.zsh index 3bde154df..ad23e18d7 100644 --- a/plugins/rvm/rvm.plugin.zsh +++ b/plugins/rvm/rvm.plugin.zsh @@ -6,6 +6,7 @@ alias gemsets='rvm gemset list' local ruby18='ruby-1.8.7' local ruby19='ruby-1.9.3' local ruby20='ruby-2.0.0' +local ruby21='ruby-2.1.1' function rb18 { if [ -z "$1" ]; then @@ -40,6 +41,17 @@ function rb20 { _rb20() {compadd `ls -1 $rvm_path/gems | grep "^$ruby20@" | sed -e "s/^$ruby20@//" | awk '{print $1}'`} compdef _rb20 rb20 +function rb21 { + if [ -z "$1" ]; then + rvm use "$ruby21" + else + rvm use "$ruby21@$1" + fi +} + +_rb21() {compadd `ls -1 $rvm_path/gems | grep "^$ruby21@" | sed -e "s/^$ruby21@//" | awk '{print $1}'`} +compdef _rb21 rb21 + function rvm-update { rvm get head } From 6a5c8fb81b369566ed0f5e408dab7a7213354ade Mon Sep 17 00:00:00 2001 From: Felipe Contreras <felipe.contreras@gmail.com> Date: Mon, 21 Apr 2014 21:11:49 -0500 Subject: [PATCH 015/488] gitfast: update to upstream v1.9.2 Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> --- plugins/gitfast/_git | 10 +++++- plugins/gitfast/git-completion.bash | 47 ++++++++++++++++++++--------- plugins/gitfast/git-prompt.sh | 15 +++++++-- 3 files changed, 53 insertions(+), 19 deletions(-) diff --git a/plugins/gitfast/_git b/plugins/gitfast/_git index fac5e711e..6b7796857 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..7b732d2ae 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 } @@ -433,7 +442,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" From 5918d9100b294beb490cbd5f1f15fe2b064d9e62 Mon Sep 17 00:00:00 2001 From: Felipe Contreras <felipe.contreras@gmail.com> Date: Mon, 21 Apr 2014 21:13:06 -0500 Subject: [PATCH 016/488] gitfast: back-port prompt fix Signed-off-by: Felipe Contreras <felipe.contreras@gmail.com> --- plugins/gitfast/git-prompt.sh | 21 ++++++++++++++------- 1 file changed, 14 insertions(+), 7 deletions(-) diff --git a/plugins/gitfast/git-prompt.sh b/plugins/gitfast/git-prompt.sh index 7b732d2ae..54489080f 100644 --- a/plugins/gitfast/git-prompt.sh +++ b/plugins/gitfast/git-prompt.sh @@ -259,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) @@ -321,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 @@ -331,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" @@ -358,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 From 73bf940c34fe359c27031a1144237ccaad7d2b9b Mon Sep 17 00:00:00 2001 From: Nicolas Brousse <nicolas-brousse@users.noreply.github.com> Date: Wed, 23 Apr 2014 19:44:59 +0200 Subject: [PATCH 017/488] Update brew.plugin.zsh --- plugins/brew/brew.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh index c2e95884e..f9497aefb 100644 --- a/plugins/brew/brew.plugin.zsh +++ b/plugins/brew/brew.plugin.zsh @@ -1 +1,2 @@ alias brews='brew list -1' +alias bubu="brew update && brew upgrade" From 33ef34baa5f703ee7fcc502eabed4f1ab968127e Mon Sep 17 00:00:00 2001 From: Mitchel Humpherys <mitch.special@gmail.com> Date: Tue, 7 Jan 2014 12:47:58 -0800 Subject: [PATCH 018/488] Fix gmt compdef Fix typo: gm -> gmt --- plugins/git/git.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 9f7819df3..c579d1e82 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -82,7 +82,7 @@ alias gwc='git whatchanged -p --abbrev-commit --pretty=medium' alias gpoat='git push origin --all && git push origin --tags' alias gmt='git mergetool --no-prompt' -compdef _git gm=git-mergetool +compdef _git gmt=git-mergetool alias gg='git gui citool' alias gga='git gui citool --amend' From 236c8de7f31a71878279ed2421bd2547ab3cdd03 Mon Sep 17 00:00:00 2001 From: Ingo Renner <ingo.renner@gmail.com> Date: Tue, 6 May 2014 10:45:26 -0700 Subject: [PATCH 019/488] [FEATURE] Support Vagrant 1.6 version command Vagrant 1.6 introduces a couple new commands, including the `version` command. The `version` command shows the currently installed version information and also checks for new updates available. --- plugins/vagrant/_vagrant | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant index 9af8cb036..f9aef0880 100644 --- a/plugins/vagrant/_vagrant +++ b/plugins/vagrant/_vagrant @@ -19,6 +19,7 @@ _1st_arguments=( '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' '--help:[TASK] Describe available tasks or one specific task' '--version:Prints the Vagrant version information' ) From 38fe100efe9b7d4df87746818bae508c4c00d4a6 Mon Sep 17 00:00:00 2001 From: Ingo Renner <ingo.renner@gmail.com> Date: Tue, 6 May 2014 10:46:55 -0700 Subject: [PATCH 020/488] [FEATURE] Support Vagrant Share Vagrant 1.5 introduced Vagrant Share to allow remote access to a Vagrant environment. This adds support for the `share` and `connect` commands. --- plugins/vagrant/_vagrant | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant index f9aef0880..7bdfb0f1c 100644 --- a/plugins/vagrant/_vagrant +++ b/plugins/vagrant/_vagrant @@ -6,6 +6,7 @@ local -a _1st_arguments _1st_arguments=( 'box:Box commands' + 'connect:Connects to a shared, remote Vagrant environment' 'destroy:Destroys the vagrant environment' 'halt:Halts the currently running vagrant environment' 'init:[box_name] [box_url] Initializes current folder for Vagrant usage' @@ -14,6 +15,7 @@ _1st_arguments=( 'provision:Run the provisioner' 'reload:Reload the vagrant environment' 'resume:Resumes a suspend vagrant environment' + 'share:Shares the Vagrant environment and allows remote access' 'ssh:SSH into the currently running environment' 'ssh-config:outputs .ssh/config valid syntax for connecting to this environment via ssh.' 'status:Shows the status of the current Vagrant environment.' From 7f8ee9aabe5f551a83babd4083ab6490cd324bda Mon Sep 17 00:00:00 2001 From: Ingo Renner <ingo.renner@gmail.com> Date: Tue, 6 May 2014 10:48:49 -0700 Subject: [PATCH 021/488] [FEATURE] Support Vagrant Cloud commands Vagrant 1.5 added Vagrant Cloud to share boxes. Some boxes may be protected, the `login` command allows to access those protected boxes from Vagrant Cloud. --- plugins/vagrant/_vagrant | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant index 7bdfb0f1c..a590b0621 100644 --- a/plugins/vagrant/_vagrant +++ b/plugins/vagrant/_vagrant @@ -10,6 +10,7 @@ _1st_arguments=( 'destroy:Destroys the vagrant environment' 'halt:Halts the currently running vagrant environment' 'init:[box_name] [box_url] Initializes current folder for Vagrant usage' + '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' From 30d9952b6235694cb7fa370fcefebac623d48ce6 Mon Sep 17 00:00:00 2001 From: Ingo Renner <ingo.renner@gmail.com> Date: Tue, 6 May 2014 10:53:12 -0700 Subject: [PATCH 022/488] [FEATURE] Support vagrant global-status Vagrant 1.6 introduced the `global-status` command which allows to get a quick overview of all active Vagrant environments for the currently logged in user. --- plugins/vagrant/_vagrant | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant index a590b0621..93d6c57b1 100644 --- a/plugins/vagrant/_vagrant +++ b/plugins/vagrant/_vagrant @@ -8,6 +8,7 @@ _1st_arguments=( 'box:Box commands' 'connect:Connects to a shared, remote Vagrant environment' 'destroy:Destroys the vagrant environment' + 'global-status:Reports the status of all active Vagrant environments on the system.' 'halt:Halts the currently running vagrant environment' 'init:[box_name] [box_url] Initializes current folder for Vagrant usage' 'login:Authenticates against a Vagrant Cloud server to access protected boxes' From 8ed800510262157adab151cad12959095a5a1b62 Mon Sep 17 00:00:00 2001 From: Ingo Renner <ingo@typo3.org> Date: Thu, 15 May 2014 12:26:39 -0700 Subject: [PATCH 023/488] Improve consistency, remove dots at end of command descriptions --- plugins/vagrant/_vagrant | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant index 93d6c57b1..14f8b965c 100644 --- a/plugins/vagrant/_vagrant +++ b/plugins/vagrant/_vagrant @@ -8,7 +8,7 @@ _1st_arguments=( 'box:Box commands' 'connect:Connects to a shared, remote Vagrant environment' 'destroy:Destroys the vagrant environment' - 'global-status:Reports the status of all active Vagrant environments on the system.' + 'global-status:Reports the status of all active Vagrant environments on the system' 'halt:Halts the currently running vagrant environment' 'init:[box_name] [box_url] Initializes current folder for Vagrant usage' 'login:Authenticates against a Vagrant Cloud server to access protected boxes' @@ -19,8 +19,8 @@ _1st_arguments=( 'resume:Resumes a suspend vagrant environment' 'share:Shares the Vagrant environment and allows remote access' 'ssh:SSH into the currently running environment' - 'ssh-config:outputs .ssh/config valid syntax for connecting to this environment via ssh.' - 'status:Shows the status of the current Vagrant environment.' + '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' From 2c19c0e59e6a3fd1f844ee6f5f883e199a3c1adc Mon Sep 17 00:00:00 2001 From: ncanceill <nicolas.canceill@ens-cachan.org> Date: Sat, 24 May 2014 08:31:59 +0200 Subject: [PATCH 024/488] typo, fixes #1806 --- plugins/ssh-agent/ssh-agent.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ssh-agent/ssh-agent.plugin.zsh b/plugins/ssh-agent/ssh-agent.plugin.zsh index 2fb8d5462..610ad34dc 100644 --- a/plugins/ssh-agent/ssh-agent.plugin.zsh +++ b/plugins/ssh-agent/ssh-agent.plugin.zsh @@ -1,7 +1,7 @@ # # INSTRUCTIONS # -# To enabled agent forwarding support add the following to +# To enable agent forwarding support add the following to # your .zshrc file: # # zstyle :omz:plugins:ssh-agent agent-forwarding on From 0b4bf905f50191c885315eec5536a973ea96b4cf Mon Sep 17 00:00:00 2001 From: Tony <zearin@gonk.net> Date: Fri, 23 May 2014 22:06:30 -0400 Subject: [PATCH 025/488] Minor markup edits --- README.textile | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git a/README.textile b/README.textile index 4325c91eb..28bab6b2c 100644 --- a/README.textile +++ b/README.textile @@ -10,22 +10,22 @@ h2. Setup h3. The automatic installer... (do you trust me?) -You can install this via the command line with either `curl` or `wget`. +You can install this via the command line with either @curl@ or @wget@. -h4. via `curl` +h4. via @curl@ @curl -L http://install.ohmyz.sh | sh@ -h4. via `wget` +h4. via @wget@ @wget --no-check-certificate http://install.ohmyz.sh -O - | sh@ h4. Optional: change the install directory -The default location is `~/.oh-my-zsh` (hidden in your home directory). +The default location is @~/.oh-my-zsh@ (hidden in your home directory). You can change the install directory with the ZSH environment variable, either -by running `export ZSH=/your/path` before installing, or setting it before the +by running @export ZSH=/your/path@ before installing, or setting it before the end of the install pipeline like this: @curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | ZSH=~/.dotfiles/zsh sh@ @@ -37,7 +37,7 @@ h3. The manual way @git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh@ -2. *OPTIONAL* Backup your existing ~/.zshrc file +2. *OPTIONAL* Backup your existing @~/.zshrc@ file @cp ~/.zshrc ~/.zshrc.orig@ @@ -53,9 +53,9 @@ h3. The manual way h3. Problems? -You _might_ need to modify your PATH in ~/.zshrc if you're not able to find some commands after switching to _Oh My Zsh_. +You _might_ need to modify your @PATH@ in @~/.zshrc@ if you're not able to find some commands after switching to _Oh My Zsh_. -If you installed manually or changed the install location, check ZSH in ~/.zshrc +If you installed manually or changed the install location, check ZSH in @~/.zshrc@ h2. Usage @@ -72,16 +72,16 @@ the "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty tasty fo h3. Customization If you want to override any of the default behavior, just add a new file (ending in @.zsh@) into the @custom/@ directory. -If you have many functions which go well together you can put them as a *.plugin.zsh file in the @custom/plugins/@ directory and then enable this plugin. +If you have many functions which go well together you can put them as a @*.plugin.zsh@ file in the @custom/plugins/@ directory and then enable this plugin. If you would like to override the functionality of a plugin distributed with oh-my-zsh, create a plugin of the same name in the @custom/plugins/@ directory and it will be loaded instead of the one in @plugins/@. h3. Updates -By default you will be prompted to check for updates. If you would like oh-my-zsh to automatically update itself without prompting you, set the following in your ~/.zshrc +By default you will be prompted to check for updates. If you would like oh-my-zsh to automatically update itself without prompting you, set the following in your @~/.zshrc@ @DISABLE_UPDATE_PROMPT=true@ -To disable updates entirely, put this in your ~/.zshrc +To disable updates entirely, put this in your @~/.zshrc@ @DISABLE_AUTO_UPDATE=true@ From 8355233f7fc055d8446c7ebf50569202fa5bd1f5 Mon Sep 17 00:00:00 2001 From: Trevor Strieber <trevor@strieber.org> Date: Thu, 8 May 2014 14:19:37 -0400 Subject: [PATCH 026/488] Fixing typo. --- plugins/colorize/colorize.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh index 0696607d9..dc0947d4f 100644 --- a/plugins/colorize/colorize.plugin.zsh +++ b/plugins/colorize/colorize.plugin.zsh @@ -1,4 +1,4 @@ -# Plugin for highligthing file content +# Plugin for highlighting file content # Plugin highlights file content based on the filename extension. # If no highlighting method supported for given extension then it tries # guess it by looking for file content. @@ -25,4 +25,4 @@ colorize_via_pygmentize() { pygmentize -g "$FNAME" fi done -} \ No newline at end of file +} From 9590b96b3f0dc8e2f4a87b632ff59eab28a0081e Mon Sep 17 00:00:00 2001 From: Adam Luikart <me@adamluikart.com> Date: Mon, 6 Feb 2012 12:22:07 -0600 Subject: [PATCH 027/488] Write the update file even if `CLOBBER` is unset. --- tools/check_for_upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 0f8c9c391..5c8ce3a50 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -5,7 +5,7 @@ function _current_epoch() { } function _update_zsh_update() { - echo "LAST_EPOCH=$(_current_epoch)" > ~/.zsh-update + echo "LAST_EPOCH=$(_current_epoch)" >! ~/.zsh-update } function _upgrade_zsh() { From c1f5a1792be3f11f9b298a11232bc5913c8b71a2 Mon Sep 17 00:00:00 2001 From: Brian Hartvigsen <brian.andrew@brianandjenny.com> Date: Thu, 13 Feb 2014 17:33:27 -0700 Subject: [PATCH 028/488] This is already done in lib/theme-and-appearance.zsh and supports Darwin/BSD/etc --- plugins/common-aliases/common-aliases.plugin.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh index b19650fee..0ee17014b 100644 --- a/plugins/common-aliases/common-aliases.plugin.zsh +++ b/plugins/common-aliases/common-aliases.plugin.zsh @@ -3,7 +3,6 @@ # # ls, the common ones I use a lot shortened for rapid fire usage -alias ls='ls --color' #I like color alias l='ls -lFh' #size,show type,human readable alias la='ls -lAFh' #long list,show almost all,show type,human readable alias lr='ls -tRFh' #sorted by date,recursive,show type,human readable From 5e601d6515f9ee51c733aea71acf6757066943e2 Mon Sep 17 00:00:00 2001 From: Brian Hartvigsen <brian.andrew@brianandjenny.com> Date: Thu, 13 Feb 2014 17:41:38 -0700 Subject: [PATCH 029/488] Fix dud alias. Switch --max-depth for just -d As far as I can tell (tested on Linux & Darwin, BSD man page seems to agree), `-d` is pretty univerally accepted as the depth argument. So instead of doing a test, we can just use -d and call it a day. --- plugins/common-aliases/common-aliases.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh index 0ee17014b..228a39da0 100644 --- a/plugins/common-aliases/common-aliases.plugin.zsh +++ b/plugins/common-aliases/common-aliases.plugin.zsh @@ -38,7 +38,7 @@ alias -g NE="2> /dev/null" alias -g NUL="> /dev/null 2>&1" alias -g P="2>&1| pygmentize -l pytb" -alias dud='du --max-depth=1 -h' +alias dud='du -d 1 -h' alias duf='du -sh *' alias fd='find . -type d -name' alias ff='find . -type f -name' From 8d976e02b1da43ec74c1ca6f50584eed566ff73a Mon Sep 17 00:00:00 2001 From: Mark Feltner <feltner.mj@gmail.com> Date: Tue, 14 Jan 2014 23:13:49 -0600 Subject: [PATCH 030/488] fix(tools/check_for_upgrade): Don't source profile Reverts #2296, but mostly #1883. There is no need to source ~/.profile when this script is read. oh-my-zsh writes no configuration data in ~/.profile. If the user wishes to use data within ~/.profile, then they should source it in another place. Fixes #2315 --- tools/check_for_upgrade.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 5c8ce3a50..c5fd0cce1 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -20,8 +20,6 @@ if [[ -z "$epoch_target" ]]; then epoch_target=13 fi -[ -f ~/.profile ] && source ~/.profile - if [ -f ~/.zsh-update ] then . ~/.zsh-update From 4c64cf4a253608022caeda0f83b6ae73b7a8513c Mon Sep 17 00:00:00 2001 From: Simon Courtois <scourtois_github@cubyx.fr> Date: Wed, 9 Apr 2014 12:32:42 +0200 Subject: [PATCH 031/488] Replacing DISABLE_CORRECTION with ENABLE_CORRECTION in zshrc template Since commands auto-correction must be explicitly enable with the ENABLE_CORRECTION envvar, this commit replaces the unaccurate example in the zshrc template. --- templates/zshrc.zsh-template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index 5b2a6cf49..e08c13912 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -26,8 +26,8 @@ ZSH_THEME="robbyrussell" # Uncomment the following line to disable auto-setting terminal title. # DISABLE_AUTO_TITLE="true" -# Uncomment the following line to disable command auto-correction. -# DISABLE_CORRECTION="true" +# Uncomment the following line to enable command auto-correction. +# ENABLE_CORRECTION="true" # Uncomment the following line to display red dots whilst waiting for completion. # COMPLETION_WAITING_DOTS="true" From cd8d5c4410f96ee16a6349a0cf7bcac882e37604 Mon Sep 17 00:00:00 2001 From: Simon Courtois <scourtois_github@cubyx.fr> Date: Wed, 9 Apr 2014 18:13:19 +0200 Subject: [PATCH 032/488] Defining nocorrect aliases only when ENABLE_CORRECTION is "true" This commit move the nocorrect aliases definition so they're called only when the user set ENABLE_CORRECTION to "true" to activate commands autocorrection. --- lib/correction.zsh | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/lib/correction.zsh b/lib/correction.zsh index 47eb83b1d..35771474f 100644 --- a/lib/correction.zsh +++ b/lib/correction.zsh @@ -1,13 +1,13 @@ -alias man='nocorrect man' -alias mv='nocorrect mv' -alias mysql='nocorrect mysql' -alias mkdir='nocorrect mkdir' -alias gist='nocorrect gist' -alias heroku='nocorrect heroku' -alias ebuild='nocorrect ebuild' -alias hpodder='nocorrect hpodder' -alias sudo='nocorrect sudo' - if [[ "$ENABLE_CORRECTION" == "true" ]]; then + alias man='nocorrect man' + alias mv='nocorrect mv' + alias mysql='nocorrect mysql' + alias mkdir='nocorrect mkdir' + alias gist='nocorrect gist' + alias heroku='nocorrect heroku' + alias ebuild='nocorrect ebuild' + alias hpodder='nocorrect hpodder' + alias sudo='nocorrect sudo' + setopt correct_all fi From b64e695b35db8bf0ff01433669a3adc4ee04341c Mon Sep 17 00:00:00 2001 From: Simon Courtois <scourtois_github@cubyx.fr> Date: Wed, 9 Apr 2014 18:16:57 +0200 Subject: [PATCH 033/488] Ordering nocorrect aliases alphabetically --- lib/correction.zsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/lib/correction.zsh b/lib/correction.zsh index 35771474f..3e1415a0b 100644 --- a/lib/correction.zsh +++ b/lib/correction.zsh @@ -1,12 +1,12 @@ if [[ "$ENABLE_CORRECTION" == "true" ]]; then - alias man='nocorrect man' - alias mv='nocorrect mv' - alias mysql='nocorrect mysql' - alias mkdir='nocorrect mkdir' + alias ebuild='nocorrect ebuild' alias gist='nocorrect gist' alias heroku='nocorrect heroku' - alias ebuild='nocorrect ebuild' alias hpodder='nocorrect hpodder' + alias man='nocorrect man' + alias mkdir='nocorrect mkdir' + alias mv='nocorrect mv' + alias mysql='nocorrect mysql' alias sudo='nocorrect sudo' setopt correct_all From c0b094cf859899bd78db43a4dc59a0ae6786d49d Mon Sep 17 00:00:00 2001 From: pangratz <cmueller.418@gmail.com> Date: Mon, 3 Feb 2014 10:35:40 +0100 Subject: [PATCH 034/488] Fix function/alias naming clash between bower and bundle plugin Since the `bower` plugin specifies a `bi` alias and `bundle` plugin specifies a `bi` function, there is a name clash when using both plugins, which results in the message "Can't 'bundle install' outside a bundled project" when trying to execute `bower`. This adresses #2486 --- plugins/bundler/bundler.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 3338d78be..8571eeda3 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -3,6 +3,7 @@ alias bl="bundle list" alias bp="bundle package" alias bo="bundle open" alias bu="bundle update" +alias bi="bundle_install" # The following is based on https://github.com/gma/bundler-exec @@ -15,7 +16,7 @@ done ## Functions -bi() { +bundle_install() { if _bundler-installed && _within-bundled-project; then local bundler_version=`bundle version | cut -d' ' -f3` if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then From 3c485db8c73bfebf379f3e9382eb8f300b608bd8 Mon Sep 17 00:00:00 2001 From: r3dDoX <patrick@walther-online.ch> Date: Sat, 24 May 2014 12:15:26 +0200 Subject: [PATCH 035/488] replaced hardcoded origin/{branch-name} with @{upstream} which gets the upstream branch since git 1.7.0 --- lib/git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index 305a77aff..3eca8a6c6 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -54,7 +54,7 @@ git_remote_status() { # Checks if there are commits ahead from remote function git_prompt_ahead() { - if $(echo "$(command git log origin/$(current_branch)..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then + if $(echo "$(command git log @{upstream}..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then echo "$ZSH_THEME_GIT_PROMPT_AHEAD" fi } From 59c8fcc712556a4c0b612898073e212877c21d60 Mon Sep 17 00:00:00 2001 From: r3dDoX <patrick@walther-online.ch> Date: Sat, 24 May 2014 12:19:46 +0200 Subject: [PATCH 036/488] added new function to get number of commits ahead of remote --- lib/git.zsh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/lib/git.zsh b/lib/git.zsh index 3eca8a6c6..d6cee37c3 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -59,6 +59,13 @@ function git_prompt_ahead() { fi } +# Gets the number of commits ahead from remote +function git_commits_ahead() { + if $(echo "$(command git log @{upstream}..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then + echo "$(command git log @{upstream}..HEAD | grep '^commit' | wc -l | tr -d ' ')" + fi +} + # Formats prompt string for current git commit short SHA function git_prompt_short_sha() { SHA=$(command git rev-parse --short HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER" From 1ad1c52797e99c1060301e55cb726e290a06d063 Mon Sep 17 00:00:00 2001 From: Sean McCann <sean@mudbugmedia.com> Date: Fri, 16 May 2014 11:46:48 -0400 Subject: [PATCH 037/488] Move aliases to 'custom' section of .zshrc template By convention, user-specific aliases are kept in each user's .zshrc file. The .zshrc template provided by oh-my-zsh has an area for example aliases, though these were being loaded before other aliases in libs, plugins, and themes. As a result, personal aliases could be overwritten by these other aliases as they are loaded. To make personal customization easier, the sample aliases section of the .zshrc template has been moved to the area dedicated for personal customization. This section of the configuration is processed after all other items are loaded, preventing personal aliases and exports from being inadvertently clobbered by oh-my-zsh. --- templates/zshrc.zsh-template | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index e08c13912..c77b54849 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -7,10 +7,6 @@ export ZSH=$HOME/.oh-my-zsh # time that oh-my-zsh is loaded. ZSH_THEME="robbyrussell" -# Example aliases -# alias zshconfig="mate ~/.zshrc" -# alias ohmyzsh="mate ~/.oh-my-zsh" - # Uncomment the following line to use case-sensitive completion. # CASE_SENSITIVE="true" @@ -72,3 +68,12 @@ export PATH=$HOME/bin:/usr/local/bin:$PATH # ssh # export SSH_KEY_PATH="~/.ssh/dsa_id" + +# Set personal aliases, overriding those provided by oh-my-zsh libs, +# plugins, and themes. Aliases can be placed here, though oh-my-zsh +# users are encouraged to define aliases within the ZSH_CUSTOM folder. +# For a full list of active aliases, run `alias`. +# +# Example aliases +# alias zshconfig="mate ~/.zshrc" +# alias ohmyzsh="mate ~/.oh-my-zsh" From 514693125b12d4b4cd099dcb09174f7bfd9a5b0e Mon Sep 17 00:00:00 2001 From: r3dDoX <r3dDoX@users.noreply.github.com> Date: Mon, 26 May 2014 10:47:51 +0200 Subject: [PATCH 038/488] added prefix/suffix variable for customizability --- lib/git.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index d6cee37c3..a52f82de0 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -62,7 +62,8 @@ function git_prompt_ahead() { # Gets the number of commits ahead from remote function git_commits_ahead() { if $(echo "$(command git log @{upstream}..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then - echo "$(command git log @{upstream}..HEAD | grep '^commit' | wc -l | tr -d ' ')" + COMMITS=$(command git log @{upstream}..HEAD | grep '^commit' | wc -l | tr -d ' ') + echo "$ZSH_THEME_GIT_COMMITS_AHEAD_PREFIX$COMMITS$ZSH_THEME_GIT_COMMITS_AHEAD_SUFFIX" fi } From 6fc241b0d2f4690f7fd00f26eb91045a04c05fbd Mon Sep 17 00:00:00 2001 From: Frank Behrens <fbehrens@gmail.com> Date: Fri, 18 Apr 2014 11:26:06 +0200 Subject: [PATCH 039/488] extract plugin will unzip *.sublime-package files --- plugins/extract/extract.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh index 7352e5bad..a6e16ddf7 100644 --- a/plugins/extract/extract.plugin.zsh +++ b/plugins/extract/extract.plugin.zsh @@ -52,7 +52,7 @@ function extract() { (*.xz) unxz "$1" ;; (*.lzma) unlzma "$1" ;; (*.Z) uncompress "$1" ;; - (*.zip|*.war|*.jar) unzip "$1" -d $extract_dir ;; + (*.zip|*.war|*.jar|*.sublime-package) unzip "$1" -d $extract_dir ;; (*.rar) unrar x -ad "$1" ;; (*.7z) 7za x "$1" ;; (*.deb) From b7f51bbbdd9f0d9ff9ef59b559e91b916d53cdf1 Mon Sep 17 00:00:00 2001 From: Josh Datko <jbdatko@gmail.com> Date: Tue, 27 May 2014 10:34:03 -0600 Subject: [PATCH 040/488] Adds itunes vol command. Adds itunes vol, which takes an argument from 0 to 100 to set the volume from the shell. --- plugins/osx/osx.plugin.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index 63760b5ff..a63f0ee05 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -174,12 +174,16 @@ function itunes() { next|previous) opt="$opt track" ;; + vol) + opt="set sound volume to $1" #$1 Due to the shift + ;; ""|-h|--help) echo "Usage: itunes <option>" echo "option:" echo "\tlaunch|play|pause|stop|rewind|resume|quit" echo "\tmute|unmute\tcontrol volume set" echo "\tnext|previous\tplay next or previous track" + echo "\tvol\tSet the volume, takes an argument from 0 to 100" echo "\thelp\tshow this message and exit" return 0 ;; @@ -190,4 +194,3 @@ function itunes() { esac osascript -e "tell application \"iTunes\" to $opt" } - From 7bb42fb49a0dcbd0774a0e6efafe766fdfc82268 Mon Sep 17 00:00:00 2001 From: James Magnarelli <jmagnare@gmail.com> Date: Sat, 29 Dec 2012 21:32:00 -0500 Subject: [PATCH 041/488] Corrected syntax error in github plugin's empty_gh function --- plugins/github/github.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/github/github.plugin.zsh b/plugins/github/github.plugin.zsh index 25b1a1e1b..bd69b1bd5 100644 --- a/plugins/github/github.plugin.zsh +++ b/plugins/github/github.plugin.zsh @@ -40,7 +40,7 @@ fi # # Use this when creating a new repo from scratch. empty_gh() { # [NAME_OF_REPO] - repo = $1 + repo=$1 ghuser=$( git config github.user ) mkdir "$repo" From 80828cd0d3d415b49530c0f7e989f6d251427985 Mon Sep 17 00:00:00 2001 From: Andrey Koleshko <ka8725@gmail.com> Date: Mon, 14 Jan 2013 12:46:01 +0300 Subject: [PATCH 042/488] Update plugins/rbenv/rbenv.plugin.zsh Fix rbenv plugin for OS X latest homebrew --- plugins/rbenv/rbenv.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/rbenv/rbenv.plugin.zsh b/plugins/rbenv/rbenv.plugin.zsh index b6795b91c..213e1beb0 100644 --- a/plugins/rbenv/rbenv.plugin.zsh +++ b/plugins/rbenv/rbenv.plugin.zsh @@ -7,7 +7,7 @@ _rbenv-from-homebrew-installed() { } FOUND_RBENV=0 -rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv") +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[@]}") fi From 6bf7f39345db64e5c37a5c5ac2e8189df0f8a8c6 Mon Sep 17 00:00:00 2001 From: Yuanxuan Wang <zellux@gmail.com> Date: Fri, 25 Jan 2013 01:45:49 +0800 Subject: [PATCH 043/488] Steeef theme checks untracked files instead of directories --- themes/steeef.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/steeef.zsh-theme b/themes/steeef.zsh-theme index e0080b8a5..9d27410b8 100644 --- a/themes/steeef.zsh-theme +++ b/themes/steeef.zsh-theme @@ -81,7 +81,7 @@ add-zsh-hook chpwd steeef_chpwd function steeef_precmd { if [[ -n "$PR_GIT_UPDATE" ]] ; then # check for untracked files or updated submodules, since vcs_info doesn't - if git ls-files --other --exclude-standard --directory 2> /dev/null | grep -q "."; then + if git ls-files --other --exclude-standard 2> /dev/null | grep -q "."; then PR_GIT_UPDATE=1 FMT_BRANCH="(%{$turquoise%}%b%u%c%{$hotpink%}●${PR_RST})" else From 97ab436f7f8823586fd9f3ef21ec1248abdc1262 Mon Sep 17 00:00:00 2001 From: Jim Hester <james.f.hester@gmail.com> Date: Fri, 2 Nov 2012 11:14:45 -0400 Subject: [PATCH 044/488] Fix path for colemak plugin --- plugins/colemak/colemak.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/colemak/colemak.plugin.zsh b/plugins/colemak/colemak.plugin.zsh index 34d42c280..cb7cc5068 100644 --- a/plugins/colemak/colemak.plugin.zsh +++ b/plugins/colemak/colemak.plugin.zsh @@ -19,4 +19,4 @@ bindkey -a 'N' vi-join bindkey -a 'j' vi-forward-word-end bindkey -a 'J' vi-forward-blank-word-end -lesskey $ZSH_CUSTOM/plugins/colemak/colemak-less +lesskey $ZSH/plugins/colemak/colemak-less From 3fac127152e42a3149fa7174a0841de97f2fb82a Mon Sep 17 00:00:00 2001 From: MrTux <mrtux@ubuntu-vn.org> Date: Tue, 14 Jan 2014 02:19:33 +0700 Subject: [PATCH 045/488] Correct wrong plugin file name --- plugins/systemadmin/{systemadmin.zsh => systemadmin.plugin.zsh} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename plugins/systemadmin/{systemadmin.zsh => systemadmin.plugin.zsh} (100%) diff --git a/plugins/systemadmin/systemadmin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh similarity index 100% rename from plugins/systemadmin/systemadmin.zsh rename to plugins/systemadmin/systemadmin.plugin.zsh From bce74975d055529cbd186782e2fd99e6da840460 Mon Sep 17 00:00:00 2001 From: Frank Louwers <frank@openminds.be> Date: Wed, 28 May 2014 13:57:25 +0200 Subject: [PATCH 046/488] =?UTF-8?q?drop=20the=20foreach,=20make=20it=20eve?= =?UTF-8?q?n=20shorter.=20thanks=20Marc=20Cornell=C3=A0!?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/pj/pj.plugin.zsh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/pj/pj.plugin.zsh b/plugins/pj/pj.plugin.zsh index dac561189..f9cbddf1a 100644 --- a/plugins/pj/pj.plugin.zsh +++ b/plugins/pj/pj.plugin.zsh @@ -41,11 +41,8 @@ alias pjo="pj open" function _pj () { # might be possible to improve this using glob, without the basename trick typeset -a projects - foreach i ($PROJECT_PATHS/*) - do - projects+=(${i##*/}) - done - + projects=($PROJECT_PATHS/*) + projects=$projects:t _arguments '*:file:($projects)' } From 3c41da3172325d90397baed7b27b4c675def8a51 Mon Sep 17 00:00:00 2001 From: Christophe Bliard <christophe.bliard@trux.info> Date: Tue, 9 Jul 2013 13:51:52 +0200 Subject: [PATCH 047/488] Update colorize.plugin.zsh correctly detect when pygmentize is not installed do not exit shell if when pygmentize is not installed --- plugins/colorize/colorize.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/colorize/colorize.plugin.zsh b/plugins/colorize/colorize.plugin.zsh index dc0947d4f..11b58e69d 100644 --- a/plugins/colorize/colorize.plugin.zsh +++ b/plugins/colorize/colorize.plugin.zsh @@ -6,9 +6,9 @@ alias colorize='colorize_via_pygmentize' colorize_via_pygmentize() { - if [ ! -x $(which pygmentize) ]; then - echo package \'pygmentize\' is not installed! - exit -1 + if [ ! -x "$(which pygmentize)" ]; then + echo "package \'pygmentize\' is not installed!" + return -1 fi if [ $# -eq 0 ]; then From b5692730128f84da8cc03567099f58df2baf546b Mon Sep 17 00:00:00 2001 From: Theodore Kokkoris <t.kokkoris@gmail.com> Date: Sat, 29 Jun 2013 13:09:37 +0300 Subject: [PATCH 048/488] Removed unnecessary execute permissions for some plugins --- plugins/bower/_bower | 0 plugins/grails/grails.plugin.zsh | 0 plugins/jruby/jruby.plugin.zsh | 0 plugins/sublime/sublime.plugin.zsh | 0 4 files changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 plugins/bower/_bower mode change 100755 => 100644 plugins/grails/grails.plugin.zsh mode change 100755 => 100644 plugins/jruby/jruby.plugin.zsh mode change 100755 => 100644 plugins/sublime/sublime.plugin.zsh diff --git a/plugins/bower/_bower b/plugins/bower/_bower old mode 100755 new mode 100644 diff --git a/plugins/grails/grails.plugin.zsh b/plugins/grails/grails.plugin.zsh old mode 100755 new mode 100644 diff --git a/plugins/jruby/jruby.plugin.zsh b/plugins/jruby/jruby.plugin.zsh old mode 100755 new mode 100644 diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh old mode 100755 new mode 100644 From 76e23e62c659fd61cf43b5e2cde350fd1d434d43 Mon Sep 17 00:00:00 2001 From: ncanceill <nicolas.canceill@ens-cachan.org> Date: Thu, 29 May 2014 10:58:51 +0200 Subject: [PATCH 049/488] Fix permissions on wd plugin continuating #1923 --- plugins/wd/wd.plugin.zsh | 0 1 file changed, 0 insertions(+), 0 deletions(-) mode change 100755 => 100644 plugins/wd/wd.plugin.zsh diff --git a/plugins/wd/wd.plugin.zsh b/plugins/wd/wd.plugin.zsh old mode 100755 new mode 100644 From ac1a321abefb73f1eeb6c9ec76dd14a062482ac6 Mon Sep 17 00:00:00 2001 From: ncanceill <nicolas.canceill@ens-cachan.org> Date: Thu, 29 May 2014 11:06:02 +0200 Subject: [PATCH 050/488] add gfa alias for recursive formatting inspired from #2018 --- plugins/golang/golang.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/golang/golang.plugin.zsh b/plugins/golang/golang.plugin.zsh index 18bcaaff2..f2be6ca9c 100644 --- a/plugins/golang/golang.plugin.zsh +++ b/plugins/golang/golang.plugin.zsh @@ -158,3 +158,6 @@ __go_tool_complete() { } compdef __go_tool_complete go + +# aliases +alias gfa='go fmt . ./...' From b1c97bc77ef6e6922c6aed5bb7a2a86506407efc Mon Sep 17 00:00:00 2001 From: Doug Jones <djones@squarespace.com> Date: Mon, 5 Aug 2013 09:54:49 -0400 Subject: [PATCH 051/488] Fix comparison used to determine if the cache is outdated. --- plugins/gradle/gradle.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/gradle/gradle.plugin.zsh b/plugins/gradle/gradle.plugin.zsh index 9229512f7..97bf50b43 100644 --- a/plugins/gradle/gradle.plugin.zsh +++ b/plugins/gradle/gradle.plugin.zsh @@ -60,7 +60,7 @@ function in_gradle() { ############################################################################ _gradle_does_task_list_need_generating () { [ ! -f .gradletasknamecache ] && return 0; - [ .gradletasknamecache -nt build.gradle ] && return 0; + [ build.gradle -nt .gradletasknamecache ] && return 0; return 1; } From 3cdfdad28a1b7efbcc1cd1282e7811d80f50a730 Mon Sep 17 00:00:00 2001 From: Yachi Lo <yaachi@gmail.com> Date: Wed, 28 May 2014 16:05:07 +0800 Subject: [PATCH 052/488] use ls instead of find to avoid incompatibility with gnu find --- plugins/xcode/xcode.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index 4816ab0ed..e59bee8c7 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -1,6 +1,6 @@ #xc function courtesy of http://gist.github.com/subdigital/5420709 function xc { - xcode_proj=`find . -name "*.xc*" -d 1 | sort -r | head -1` + xcode_proj=`ls | grep "\.xc" | sort -r | head -1` if [[ `echo -n $xcode_proj | wc -m` == 0 ]] then echo "No xcworkspace/xcodeproj file found in the current directory." From 7297b446b87ae26e410b54b7398111a76f1ccbcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Dra=C5=BEen=20Lu=C4=8Danin?= <kermit666@gmail.com> Date: Sat, 21 Dec 2013 16:21:34 +0100 Subject: [PATCH 053/488] too many plugins = slow init warning --- templates/zshrc.zsh-template | 1 + 1 file changed, 1 insertion(+) diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index c77b54849..a12eca2a0 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -44,6 +44,7 @@ ZSH_THEME="robbyrussell" # Which plugins would you like to load? (plugins can be found in ~/.oh-my-zsh/plugins/*) # Custom plugins may be added to ~/.oh-my-zsh/custom/plugins/ # Example format: plugins=(rails git textmate ruby lighthouse) +# Add wisely, as too many plugins slow down shell startup. plugins=(git) source $ZSH/oh-my-zsh.sh From e5ed07e2b5740346d2a32b3a47204612d8808723 Mon Sep 17 00:00:00 2001 From: ncanceill <nicolas.canceill@ens-cachan.org> Date: Wed, 4 Jun 2014 12:36:34 +0200 Subject: [PATCH 054/488] specify python2 in shebang as suggested in #2382 --- plugins/git-prompt/gitstatus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py index 256841432..c665a9ee1 100644 --- a/plugins/git-prompt/gitstatus.py +++ b/plugins/git-prompt/gitstatus.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python +#!/usr/bin/env python2 # -*- coding: UTF-8 -*- from subprocess import Popen, PIPE import re From de41dee9e462e2a04cbe4658a002812d71f9e3c3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=A9r=C3=B4me=20Macias?= <jerome.macias@gmail.com> Date: Tue, 10 Dec 2013 10:03:46 +0100 Subject: [PATCH 055/488] Add alias for container:debug task --- plugins/symfony2/symfony2.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh index 0d2bb68c3..4c07349a4 100644 --- a/plugins/symfony2/symfony2.plugin.zsh +++ b/plugins/symfony2/symfony2.plugin.zsh @@ -17,5 +17,6 @@ compdef _symfony2 sf alias sf='php app/console' alias sfcl='php app/console cache:clear' alias sfroute='php app/console router:debug' +alias sfcontainer='php app/console container:debug' alias sfgb='php app/console generate:bundle' From a9e1d9aa890c18ea3c3250442e7d9de555633237 Mon Sep 17 00:00:00 2001 From: "n.st" <git@n-st.de> Date: Wed, 4 Jun 2014 19:26:46 +0200 Subject: [PATCH 056/488] Cancel upgrade if $ZSH is not writable from #2360 --- tools/check_for_upgrade.sh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index c5fd0cce1..8b8ecae03 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -20,6 +20,12 @@ if [[ -z "$epoch_target" ]]; then epoch_target=13 fi +[ -f ~/.profile ] && source ~/.profile + +# Cancel upgrade if the current user doesn't have write permissions for the +# oh-my-zsh directory. +[[ -w "$ZSH" ]] || return 0 + if [ -f ~/.zsh-update ] then . ~/.zsh-update From 12324856c6645c2e71c4dfcf5ef12313c989b387 Mon Sep 17 00:00:00 2001 From: Andrea De Pasquale <andrea@de-pasquale.name> Date: Tue, 24 Sep 2013 11:11:35 +0200 Subject: [PATCH 057/488] Added ssh-like mosh window title Display the hostname when running Mosh (http://mosh.mit.edu/). Same thing as displaying "hostname" when running "ssh hostname". --- lib/termsupport.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 9c0a430fb..30410c1fd 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -28,7 +28,7 @@ function omz_termsupport_preexec { setopt extended_glob # cmd name only, or if this is sudo or ssh, the next cmd - local CMD=${1[(wr)^(*=*|sudo|ssh|rake|-*)]:gs/%/%%} + local CMD=${1[(wr)^(*=*|sudo|ssh|mosh|rake|-*)]:gs/%/%%} local LINE="${2:gs/%/%%}" title '$CMD' '%100>...>$LINE%<<' From fbf4a78acfd9ad7b96e8add7990d871ba50b866e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Mon, 2 Jun 2014 12:42:21 +0200 Subject: [PATCH 058/488] Show user prompt in gnzh theme regardless of UID Fixes #2008. --- themes/gnzh.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/gnzh.zsh-theme b/themes/gnzh.zsh-theme index 33f187bc6..0519fbefb 100644 --- a/themes/gnzh.zsh-theme +++ b/themes/gnzh.zsh-theme @@ -14,11 +14,11 @@ eval PR_NO_COLOR="%{$terminfo[sgr0]%}" eval PR_BOLD="%{$terminfo[bold]%}" # Check the UID -if [[ $UID -ge 1000 ]]; then # normal user +if [[ $UID -ne 0 ]]; then # normal user eval PR_USER='${PR_GREEN}%n${PR_NO_COLOR}' eval PR_USER_OP='${PR_GREEN}%#${PR_NO_COLOR}' local PR_PROMPT='$PR_NO_COLOR➤ $PR_NO_COLOR' -elif [[ $UID -eq 0 ]]; then # root +else # root eval PR_USER='${PR_RED}%n${PR_NO_COLOR}' eval PR_USER_OP='${PR_RED}%#${PR_NO_COLOR}' local PR_PROMPT='$PR_RED➤ $PR_NO_COLOR' From 67d74cbc2d057ef8ae2d237f739b53f52919567f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ho=CC=88ltje?= <docwhat@gerf.org> Date: Wed, 23 Apr 2014 00:34:22 -0400 Subject: [PATCH 059/488] Don't override ZSH_COMPDUMP if already set. This allows customization via .zshenv if wanted. This is helpful for zsh developers and people who want to move it out of $HOME --- oh-my-zsh.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 3c0f4f8f5..c217b91bb 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -46,7 +46,9 @@ else fi # Save the location of the current completion dump file. -ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}" +if [ -z "$ZSH_COMPDUMP" ]; then + ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}" +fi # Load and run compinit autoload -U compinit From f82092a0e78985287c6eb1746234db688bb1a98f Mon Sep 17 00:00:00 2001 From: Chris Krycho <github@chriskrycho.com> Date: Fri, 18 Oct 2013 09:23:27 -0400 Subject: [PATCH 060/488] Add a command to show unresolve files in merge --- plugins/mercurial/mercurial.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/mercurial/mercurial.plugin.zsh b/plugins/mercurial/mercurial.plugin.zsh index 2e99a12fb..ff95d5e40 100644 --- a/plugins/mercurial/mercurial.plugin.zsh +++ b/plugins/mercurial/mercurial.plugin.zsh @@ -16,6 +16,8 @@ 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' +# list unresolved files (since hg does not list unmerged files in the status command) +alias hgun='hg resolve --list' function in_hg() { if [[ -d .hg ]] || $(hg summary > /dev/null 2>&1); then From f7948ace66dd541e5b60666d840cce6b6d95f0e6 Mon Sep 17 00:00:00 2001 From: Tim Kelty <timkelty@gmail.com> Date: Mon, 16 Dec 2013 10:26:18 -0500 Subject: [PATCH 061/488] Adding compression to rsync commands This speeds up transfers significantly. No reason not to include it as far as I know. --- plugins/rsync/rsync.plugin.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/rsync/rsync.plugin.zsh b/plugins/rsync/rsync.plugin.zsh index 33a31a5c1..1a3bb4cc3 100644 --- a/plugins/rsync/rsync.plugin.zsh +++ b/plugins/rsync/rsync.plugin.zsh @@ -1,4 +1,4 @@ -alias rsync-copy="rsync -av --progress -h" -alias rsync-move="rsync -av --progress -h --remove-source-files" -alias rsync-update="rsync -avu --progress -h" -alias rsync-synchronize="rsync -avu --delete --progress -h" +alias rsync-copy="rsync -avz --progress -h" +alias rsync-move="rsync -avz --progress -h --remove-source-files" +alias rsync-update="rsync -avzu --progress -h" +alias rsync-synchronize="rsync -avzu --delete --progress -h" From e04d3e0563217c2beef475b4eecf90bde4c8193a Mon Sep 17 00:00:00 2001 From: Julia Medina <a.julia.medina@gmail.com> Date: Fri, 25 Oct 2013 20:34:23 -0300 Subject: [PATCH 062/488] Add startproject to django command completions --- plugins/django/django.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/django/django.plugin.zsh b/plugins/django/django.plugin.zsh index 9d898edca..aaaa7d21d 100644 --- a/plugins/django/django.plugin.zsh +++ b/plugins/django/django.plugin.zsh @@ -141,6 +141,7 @@ _managepy-sqlinitialdata(){} _managepy-sqlreset(){} _managepy-sqlsequencereset(){} _managepy-startapp(){} +_managepy-startproject(){} _managepy-syncdb() { _arguments -s : \ @@ -198,6 +199,7 @@ _managepy-commands() { 'sqlreset:Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s).' 'sqlsequencereset:Prints the SQL statements for resetting sequences for the given app name(s).' "startapp:Creates a Django app directory structure for the given app name in this project's directory." + "startproject:Creates a Django project directory structure for the given project name in this current directory." "syncdb:Create the database tables for all apps in INSTALLED_APPS whose tables haven't already been created." 'test:Runs the test suite for the specified applications, or the entire site if no apps are specified.' 'testserver:Runs a development server with data from the given fixture(s).' From 99c9dbed4722c66428323401d560aaa521c6932f Mon Sep 17 00:00:00 2001 From: Gaetan Semet <gaetan@xeberon.net> Date: Tue, 3 Dec 2013 10:24:32 +0100 Subject: [PATCH 063/488] New alias for repo: ru and rst Signed-off-by: Gaetan Semet <gaetan@xeberon.net> --- plugins/repo/repo.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/repo/repo.plugin.zsh b/plugins/repo/repo.plugin.zsh index d690a9d22..33f4195c7 100644 --- a/plugins/repo/repo.plugin.zsh +++ b/plugins/repo/repo.plugin.zsh @@ -10,3 +10,9 @@ compdef _repo rs='repo sync' alias rsrra='repo sync ; repo rebase --auto-stash' compdef _repo rsrra='repo sync ; repo rebase --auto-stash' + +alias ru='repo upload' +compdef _repo ru='repo upload' + +alias rst='repo status' +compdef _repo rst='repo status' From aee8877988e4cf2de907550e2561a4793fa00496 Mon Sep 17 00:00:00 2001 From: Menno Pruijssers <menno@wyzers.com> Date: Mon, 9 Sep 2013 10:51:07 +0200 Subject: [PATCH 064/488] fixed rvm warning --- themes/Soliah.zsh-theme | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/themes/Soliah.zsh-theme b/themes/Soliah.zsh-theme index 237e70fda..070c54981 100644 --- a/themes/Soliah.zsh-theme +++ b/themes/Soliah.zsh-theme @@ -32,11 +32,12 @@ function check_git_prompt_info() { # Determine if we are using a gemset. function rvm_gemset() { - GEMSET=`rvm gemset list | grep '=>' | cut -b4-` - if [[ -n $GEMSET ]]; then - echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|" - fi - + if hash rvm 2>/dev/null; then + GEMSET=`rvm gemset list | grep '=>' | cut -b4-` + if [[ -n $GEMSET ]]; then + echo "%{$fg[yellow]%}$GEMSET%{$reset_color%}|" + fi + fi } # Determine the time since last commit. If branch is clean, From 519d37fc389e1f2faec6fd34cb8ee64a35fa154e Mon Sep 17 00:00:00 2001 From: Pieter Kokx <pieter@kokx.nl> Date: Fri, 8 Nov 2013 10:11:38 +0100 Subject: [PATCH 065/488] Vundle plugin now works with submodules. If you are using a submodule, ~/.vim/bundle/vundle/.git is a file, not a directory. So I changed the test for that. --- plugins/vundle/vundle.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/vundle/vundle.plugin.zsh b/plugins/vundle/vundle.plugin.zsh index 936c8d7d2..830774fe3 100644 --- a/plugins/vundle/vundle.plugin.zsh +++ b/plugins/vundle/vundle.plugin.zsh @@ -4,7 +4,7 @@ function vundle-init () { mkdir -p ~/.vim/bundle/vundle/ fi - if [ ! -d ~/.vim/bundle/vundle/.git/ ] + if [ ! -d ~/.vim/bundle/vundle/.git ] && [ ! -f ~/.vim/bundle/vundle/.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" From 50fe95a69e471345f20fb88ae62e14ada43c134a Mon Sep 17 00:00:00 2001 From: Hong Xu <hong@topbug.net> Date: Fri, 25 Oct 2013 16:17:21 -0700 Subject: [PATCH 066/488] Autojump plugin: check user local installation first. Users may install their own version of autojump to override the system installed version. --- plugins/autojump/autojump.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh index 0aa14959d..50a694764 100644 --- a/plugins/autojump/autojump.plugin.zsh +++ b/plugins/autojump/autojump.plugin.zsh @@ -1,5 +1,7 @@ if [ $commands[autojump] ]; then # check if autojump is installed - if [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package + if [ -f $HOME/.autojump/etc/profile.d/autojump.zsh ]; then # manual user-local installation + . $HOME/.autojump/etc/profile.d/autojump.zsh + elif [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package . /usr/share/autojump/autojump.zsh elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation . /etc/profile.d/autojump.zsh @@ -7,8 +9,6 @@ if [ $commands[autojump] ]; then # check if autojump is installed . /etc/profile.d/autojump.sh elif [ -f /usr/local/share/autojump/autojump.zsh ]; then # freebsd installation . /usr/local/share/autojump/autojump.zsh - elif [ -f $HOME/.autojump/etc/profile.d/autojump.zsh ]; then # manual user-local installation - . $HOME/.autojump/etc/profile.d/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 From d3acea3965ebe13d6ed9885984ba8f5cc8ab4936 Mon Sep 17 00:00:00 2001 From: Zbigniew Siciarz <antyqjon@gmail.com> Date: Sat, 14 Dec 2013 18:57:46 +0100 Subject: [PATCH 067/488] Updated cabal plugin with Cabal 1.18 commands. --- plugins/cabal/cabal.plugin.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/cabal/cabal.plugin.zsh b/plugins/cabal/cabal.plugin.zsh index 9f76add7a..acd7f8287 100644 --- a/plugins/cabal/cabal.plugin.zsh +++ b/plugins/cabal/cabal.plugin.zsh @@ -23,6 +23,7 @@ function _cabal_commands() { "copy:Copy teh files into the install locations" "configure:Prepare to build the package" "fetch:Downloads packages for later installation" + "get:Gets a package's source code" "haddock:Generate HAddock HTML documentation" "help:Help about commands" "hscolour:Generate HsColour colourised code, in HTML format" @@ -31,7 +32,10 @@ function _cabal_commands() { "install:Installs a list of packages" "list:List packages matching a search string" "register:Register this package with the compiler" + "repl:Open an interpreter session for the given target" "report:Upload build reports to a remote server" + "run:Runs the compiled executable" + "sandbox:Create/modify/delete a sandbox" "sdist:Generate a source distribution file (.tar.gz)" "test:Run the test suite, if any (configure with UserHooks)" "unpack:Unpacks packages for user inspection" From 859a37d4f14838b20d09b8d7814f270d9b54b8e5 Mon Sep 17 00:00:00 2001 From: Zbigniew Siciarz <antyqjon@gmail.com> Date: Sun, 8 Jun 2014 12:04:52 +0200 Subject: [PATCH 068/488] Fixed typo in cabal plugin. --- plugins/cabal/cabal.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/cabal/cabal.plugin.zsh b/plugins/cabal/cabal.plugin.zsh index acd7f8287..3e611ddcc 100644 --- a/plugins/cabal/cabal.plugin.zsh +++ b/plugins/cabal/cabal.plugin.zsh @@ -20,7 +20,7 @@ function _cabal_commands() { "build:Make this package ready for installation" "check:Check the package for common mistakes" "clean:Clean up after a build" - "copy:Copy teh files into the install locations" + "copy:Copy the files into the install locations" "configure:Prepare to build the package" "fetch:Downloads packages for later installation" "get:Gets a package's source code" From 1ab0f771bc85bbdd86d14e616281cc138c3afe91 Mon Sep 17 00:00:00 2001 From: Zbigniew Siciarz <antyqjon@gmail.com> Date: Sun, 8 Jun 2014 12:08:02 +0200 Subject: [PATCH 069/488] Updated cabal commands for Cabal 1.20 --- plugins/cabal/cabal.plugin.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/cabal/cabal.plugin.zsh b/plugins/cabal/cabal.plugin.zsh index 3e611ddcc..b59438f98 100644 --- a/plugins/cabal/cabal.plugin.zsh +++ b/plugins/cabal/cabal.plugin.zsh @@ -17,14 +17,15 @@ function _cabal_commands() { subcommand) subcommands=( "bench:Run the benchmark, if any (configure with UserHooks)" - "build:Make this package ready for installation" + "build:Compile all targets or specific target." "check:Check the package for common mistakes" "clean:Clean up after a build" "copy:Copy the files into the install locations" "configure:Prepare to build the package" + "exec:Run a command with the cabal environment" "fetch:Downloads packages for later installation" "get:Gets a package's source code" - "haddock:Generate HAddock HTML documentation" + "haddock:Generate Haddock HTML documentation" "help:Help about commands" "hscolour:Generate HsColour colourised code, in HTML format" "info:Display detailed information about a particular package" From 999bd355f75f699fc227af025d7f7d508685f7de Mon Sep 17 00:00:00 2001 From: Clemens Werther <cl3m3ns@gmail.com> Date: Fri, 3 Jan 2014 14:43:31 +0100 Subject: [PATCH 070/488] fix root mode not working in bureau --- themes/bureau.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/bureau.zsh-theme b/themes/bureau.zsh-theme index 4d9cae0cc..443d1d5ee 100644 --- a/themes/bureau.zsh-theme +++ b/themes/bureau.zsh-theme @@ -70,7 +70,7 @@ bureau_git_prompt () { _PATH="%{$fg_bold[white]%}%~%{$reset_color%}" -if [[ "%#" == "#" ]]; then +if [[ $EUID -eq 0 ]]; then _USERNAME="%{$fg_bold[red]%}%n" _LIBERTY="%{$fg[red]%}#" else From eb06484d4f3124a4fa922c25540fa80885fc35b5 Mon Sep 17 00:00:00 2001 From: fallwith <fallwith@gmail.com> Date: Sat, 18 Jan 2014 20:26:21 -0800 Subject: [PATCH 071/488] added emoji plugin to make it easy to display emoji characters in the terminal --- plugins/emoji/emoji.plugin.zsh | 1097 ++++++++++++++++++++++++++++++++ 1 file changed, 1097 insertions(+) create mode 100644 plugins/emoji/emoji.plugin.zsh diff --git a/plugins/emoji/emoji.plugin.zsh b/plugins/emoji/emoji.plugin.zsh new file mode 100644 index 000000000..be761871e --- /dev/null +++ b/plugins/emoji/emoji.plugin.zsh @@ -0,0 +1,1097 @@ +# Make emoji available within the ZSH terminal +# +# To output a specific emoji, use: +# $> echo $emoji[<name>] +# ex: $> echo $emoji[mouse_face] +# +# To output a random emoji, use: +# $> random_emoji +# $> random_emoji_fruit +# $> random_emoji_animal +# $> random_emoji_vehicle +# $> random_emoji_face +# +# To list all available emoji with names, use: +# $> display_all_emoji +# $> display_emoji_fruits +# $> display_emoji_animals +# $> display_emoji_vehicles +# $> display_emoji_faces +# +# To use an emoji in a prompt: +# PROMPT='$(echo $emoji[penguin]) > ' +# PROMPT='$(random_emoji_fruit) > ' +# eval surfer=$(echo $emoji[surfer]) +# PROMPT='$surfer > ' +# +# emoji codes sourced from http://apps.timwhitlock.info/emoji/tables/unicode + +typeset -A emoji +emoji[grinning_face_with_smiling_eyes]='\xF0\x9F\x98\x81' +emoji[face_with_tears_of_joy]='\xF0\x9F\x98\x82' +emoji[smiling_face_with_open_mouth]='\xF0\x9F\x98\x83' +emoji[smiling_face_with_open_mouth_and_smiling_eyes]='\xF0\x9F\x98\x84' +emoji[smiling_face_with_open_mouth_and_cold_sweat]='\xF0\x9F\x98\x85' +emoji[smiling_face_with_open_mouth_and_tightly_closed_eyes]='\xF0\x9F\x98\x86' +emoji[winking_face]='\xF0\x9F\x98\x89' +emoji[smiling_face_with_smiling_eyes]='\xF0\x9F\x98\x8A' +emoji[face_savouring_delicious_food]='\xF0\x9F\x98\x8B' +emoji[relieved_face]='\xF0\x9F\x98\x8C' +emoji[smiling_face_with_heart_shaped_eyes]='\xF0\x9F\x98\x8D' +emoji[smirking_face]='\xF0\x9F\x98\x8F' +emoji[unamused_face]='\xF0\x9F\x98\x92' +emoji[face_with_cold_sweat]='\xF0\x9F\x98\x93' +emoji[pensive_face]='\xF0\x9F\x98\x94' +emoji[confounded_face]='\xF0\x9F\x98\x96' +emoji[face_throwing_a_kiss]='\xF0\x9F\x98\x98' +emoji[kissing_face_with_closed_eyes]='\xF0\x9F\x98\x9A' +emoji[face_with_stuck_out_tongue_and_winking_eye]='\xF0\x9F\x98\x9C' +emoji[face_with_stuck_out_tongue_and_tightly_closed_eyes]='\xF0\x9F\x98\x9D' +emoji[disappointed_face]='\xF0\x9F\x98\x9E' +emoji[angry_face]='\xF0\x9F\x98\xA0' +emoji[pouting_face]='\xF0\x9F\x98\xA1' +emoji[crying_face]='\xF0\x9F\x98\xA2' +emoji[persevering_face]='\xF0\x9F\x98\xA3' +emoji[face_with_look_of_triumph]='\xF0\x9F\x98\xA4' +emoji[disappointed_but_relieved_face]='\xF0\x9F\x98\xA5' +emoji[fearful_face]='\xF0\x9F\x98\xA8' +emoji[weary_face]='\xF0\x9F\x98\xA9' +emoji[sleepy_face]='\xF0\x9F\x98\xAA' +emoji[tired_face]='\xF0\x9F\x98\xAB' +emoji[loudly_crying_face]='\xF0\x9F\x98\xAD' +emoji[face_with_open_mouth_and_cold_sweat]='\xF0\x9F\x98\xB0' +emoji[face_screaming_in_fear]='\xF0\x9F\x98\xB1' +emoji[astonished_face]='\xF0\x9F\x98\xB2' +emoji[flushed_face]='\xF0\x9F\x98\xB3' +emoji[dizzy_face]='\xF0\x9F\x98\xB5' +emoji[face_with_medical_mask]='\xF0\x9F\x98\xB7' +emoji[grinning_cat_face_with_smiling_eyes]='\xF0\x9F\x98\xB8' +emoji[cat_face_with_tears_of_joy]='\xF0\x9F\x98\xB9' +emoji[smiling_cat_face_with_open_mouth]='\xF0\x9F\x98\xBA' +emoji[smiling_cat_face_with_heart_shaped_eyes]='\xF0\x9F\x98\xBB' +emoji[cat_face_with_wry_smile]='\xF0\x9F\x98\xBC' +emoji[kissing_cat_face_with_closed_eyes]='\xF0\x9F\x98\xBD' +emoji[pouting_cat_face]='\xF0\x9F\x98\xBE' +emoji[crying_cat_face]='\xF0\x9F\x98\xBF' +emoji[weary_cat_face]='\xF0\x9F\x99\x80' +emoji[face_with_no_good_gesture]='\xF0\x9F\x99\x85' +emoji[face_with_ok_gesture]='\xF0\x9F\x99\x86' +emoji[person_bowing_deeply]='\xF0\x9F\x99\x87' +emoji[see_no_evil_monkey]='\xF0\x9F\x99\x88' +emoji[hear_no_evil_monkey]='\xF0\x9F\x99\x89' +emoji[speak_no_evil_monkey]='\xF0\x9F\x99\x8A' +emoji[happy_person_raising_one_hand]='\xF0\x9F\x99\x8B' +emoji[person_raising_both_hands_in_celebration]='\xF0\x9F\x99\x8C' +emoji[person_frowning]='\xF0\x9F\x99\x8D' +emoji[person_with_pouting_face]='\xF0\x9F\x99\x8E' +emoji[person_with_folded_hands]='\xF0\x9F\x99\x8F' +emoji[black_scissors]='\xE2\x9C\x82' +emoji[white_heavy_check_mark]='\xE2\x9C\x85' +emoji[airplane]='\xE2\x9C\x88' +emoji[envelope]='\xE2\x9C\x89' +emoji[raised_fist]='\xE2\x9C\x8A' +emoji[raised_hand]='\xE2\x9C\x8B' +emoji[victory_hand]='\xE2\x9C\x8C' +emoji[pencil]='\xE2\x9C\x8F' +emoji[black_nib]='\xE2\x9C\x92' +emoji[heavy_check_mark]='\xE2\x9C\x94' +emoji[heavy_multiplication_x]='\xE2\x9C\x96' +emoji[sparkles]='\xE2\x9C\xA8' +emoji[eight_spoked_asterisk]='\xE2\x9C\xB3' +emoji[eight_pointed_black_star]='\xE2\x9C\xB4' +emoji[snowflake]='\xE2\x9D\x84' +emoji[sparkle]='\xE2\x9D\x87' +emoji[cross_mark]='\xE2\x9D\x8C' +emoji[negative_squared_cross_mark]='\xE2\x9D\x8E' +emoji[black_question_mark_ornament]='\xE2\x9D\x93' +emoji[white_question_mark_ornament]='\xE2\x9D\x94' +emoji[white_exclamation_mark_ornament]='\xE2\x9D\x95' +emoji[heavy_exclamation_mark_symbol]='\xE2\x9D\x97' +emoji[heavy_black_heart]='\xE2\x9D\xA4' +emoji[heavy_plus_sign]='\xE2\x9E\x95' +emoji[heavy_minus_sign]='\xE2\x9E\x96' +emoji[heavy_division_sign]='\xE2\x9E\x97' +emoji[black_rightwards_arrow]='\xE2\x9E\xA1' +emoji[curly_loop]='\xE2\x9E\xB0' +emoji[rocket]='\xF0\x9F\x9A\x80' +emoji[railway_car]='\xF0\x9F\x9A\x83' +emoji[high_speed_train]='\xF0\x9F\x9A\x84' +emoji[high_speed_train_with_bullet_nose]='\xF0\x9F\x9A\x85' +emoji[metro]='\xF0\x9F\x9A\x87' +emoji[station]='\xF0\x9F\x9A\x89' +emoji[bus]='\xF0\x9F\x9A\x8C' +emoji[bus_stop]='\xF0\x9F\x9A\x8F' +emoji[ambulance]='\xF0\x9F\x9A\x91' +emoji[fire_engine]='\xF0\x9F\x9A\x92' +emoji[police_car]='\xF0\x9F\x9A\x93' +emoji[taxi]='\xF0\x9F\x9A\x95' +emoji[automobile]='\xF0\x9F\x9A\x97' +emoji[recreational_vehicle]='\xF0\x9F\x9A\x99' +emoji[delivery_truck]='\xF0\x9F\x9A\x9A' +emoji[ship]='\xF0\x9F\x9A\xA2' +emoji[speedboat]='\xF0\x9F\x9A\xA4' +emoji[horizontal_traffic_light]='\xF0\x9F\x9A\xA5' +emoji[construction_sign]='\xF0\x9F\x9A\xA7' +emoji[police_cars_revolving_light]='\xF0\x9F\x9A\xA8' +emoji[triangular_flag_on_post]='\xF0\x9F\x9A\xA9' +emoji[door]='\xF0\x9F\x9A\xAA' +emoji[no_entry_sign]='\xF0\x9F\x9A\xAB' +emoji[smoking_symbol]='\xF0\x9F\x9A\xAC' +emoji[no_smoking_symbol]='\xF0\x9F\x9A\xAD' +emoji[bicycle]='\xF0\x9F\x9A\xB2' +emoji[pedestrian]='\xF0\x9F\x9A\xB6' +emoji[mens_symbol]='\xF0\x9F\x9A\xB9' +emoji[womens_symbol]='\xF0\x9F\x9A\xBA' +emoji[restroom]='\xF0\x9F\x9A\xBB' +emoji[baby_symbol]='\xF0\x9F\x9A\xBC' +emoji[toilet]='\xF0\x9F\x9A\xBD' +emoji[water_closet]='\xF0\x9F\x9A\xBE' +emoji[bath]='\xF0\x9F\x9B\x80' +emoji[circled_latin_capital_letter_m]='\xE2\x93\x82' +emoji[negative_squared_latin_capital_letter_a]='\xF0\x9F\x85\xB0' +emoji[negative_squared_latin_capital_letter_b]='\xF0\x9F\x85\xB1' +emoji[negative_squared_latin_capital_letter_o]='\xF0\x9F\x85\xBE' +emoji[negative_squared_latin_capital_letter_p]='\xF0\x9F\x85\xBF' +emoji[negative_squared_ab]='\xF0\x9F\x86\x8E' +emoji[squared_cl]='\xF0\x9F\x86\x91' +emoji[squared_cool]='\xF0\x9F\x86\x92' +emoji[squared_free]='\xF0\x9F\x86\x93' +emoji[squared_id]='\xF0\x9F\x86\x94' +emoji[squared_new]='\xF0\x9F\x86\x95' +emoji[squared_ng]='\xF0\x9F\x86\x96' +emoji[squared_ok]='\xF0\x9F\x86\x97' +emoji[squared_sos]='\xF0\x9F\x86\x98' +emoji[squared_up_with_exclamation_mark]='\xF0\x9F\x86\x99' +emoji[squared_vs]='\xF0\x9F\x86\x9A' +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' +emoji[squared_katakana_koko]='\xF0\x9F\x88\x81' +emoji[squared_katakana_sa]='\xF0\x9F\x88\x82' +emoji[squared_cjk_unified_ideograph_7121]='\xF0\x9F\x88\x9A' +emoji[squared_cjk_unified_ideograph_6307]='\xF0\x9F\x88\xAF' +emoji[squared_cjk_unified_ideograph_7981]='\xF0\x9F\x88\xB2' +emoji[squared_cjk_unified_ideograph_7a7a]='\xF0\x9F\x88\xB3' +emoji[squared_cjk_unified_ideograph_5408]='\xF0\x9F\x88\xB4' +emoji[squared_cjk_unified_ideograph_6e80]='\xF0\x9F\x88\xB5' +emoji[squared_cjk_unified_ideograph_6709]='\xF0\x9F\x88\xB6' +emoji[squared_cjk_unified_ideograph_6708]='\xF0\x9F\x88\xB7' +emoji[squared_cjk_unified_ideograph_7533]='\xF0\x9F\x88\xB8' +emoji[squared_cjk_unified_ideograph_5272]='\xF0\x9F\x88\xB9' +emoji[squared_cjk_unified_ideograph_55b6]='\xF0\x9F\x88\xBA' +emoji[circled_ideograph_advantage]='\xF0\x9F\x89\x90' +emoji[circled_ideograph_accept]='\xF0\x9F\x89\x91' +emoji[copyright_sign]='\xC2\xA9' +emoji[registered_sign]='\xC2\xAE' +emoji[double_exclamation_mark]='\xE2\x80\xBC' +emoji[exclamation_question_mark]='\xE2\x81\x89' +emoji[digit_eight_combining_enclosing_keycap]='\x38\xE2\x83\xA3' +emoji[digit_nine_combining_enclosing_keycap]='\x39\xE2\x83\xA3' +emoji[digit_seven_combining_enclosing_keycap]='\x37\xE2\x83\xA3' +emoji[digit_six_combining_enclosing_keycap]='\x36\xE2\x83\xA3' +emoji[digit_one_combining_enclosing_keycap]='\x31\xE2\x83\xA3' +emoji[digit_zero_combining_enclosing_keycap]='\x30\xE2\x83\xA3' +emoji[digit_two_combining_enclosing_keycap]='\x32\xE2\x83\xA3' +emoji[digit_three_combining_enclosing_keycap]='\x33\xE2\x83\xA3' +emoji[digit_five_combining_enclosing_keycap]='\x35\xE2\x83\xA3' +emoji[digit_four_combining_enclosing_keycap]='\x34\xE2\x83\xA3' +emoji[number_sign_combining_enclosing_keycap]='\x23\xE2\x83\xA3' +emoji[trade_mark_sign]='\xE2\x84\xA2' +emoji[information_source]='\xE2\x84\xB9' +emoji[left_right_arrow]='\xE2\x86\x94' +emoji[up_down_arrow]='\xE2\x86\x95' +emoji[north_west_arrow]='\xE2\x86\x96' +emoji[north_east_arrow]='\xE2\x86\x97' +emoji[south_east_arrow]='\xE2\x86\x98' +emoji[south_west_arrow]='\xE2\x86\x99' +emoji[leftwards_arrow_with_hook]='\xE2\x86\xA9' +emoji[rightwards_arrow_with_hook]='\xE2\x86\xAA' +emoji[watch]='\xE2\x8C\x9A' +emoji[hourglass]='\xE2\x8C\x9B' +emoji[black_right_pointing_double_triangle]='\xE2\x8F\xA9' +emoji[black_left_pointing_double_triangle]='\xE2\x8F\xAA' +emoji[black_up_pointing_double_triangle]='\xE2\x8F\xAB' +emoji[black_down_pointing_double_triangle]='\xE2\x8F\xAC' +emoji[alarm_clock]='\xE2\x8F\xB0' +emoji[hourglass_with_flowing_sand]='\xE2\x8F\xB3' +emoji[black_small_square]='\xE2\x96\xAA' +emoji[white_small_square]='\xE2\x96\xAB' +emoji[black_right_pointing_triangle]='\xE2\x96\xB6' +emoji[black_left_pointing_triangle]='\xE2\x97\x80' +emoji[white_medium_square]='\xE2\x97\xBB' +emoji[black_medium_square]='\xE2\x97\xBC' +emoji[white_medium_small_square]='\xE2\x97\xBD' +emoji[black_medium_small_square]='\xE2\x97\xBE' +emoji[black_sun_with_rays]='\xE2\x98\x80' +emoji[cloud]='\xE2\x98\x81' +emoji[black_telephone]='\xE2\x98\x8E' +emoji[ballot_box_with_check]='\xE2\x98\x91' +emoji[umbrella_with_rain_drops]='\xE2\x98\x94' +emoji[hot_beverage]='\xE2\x98\x95' +emoji[white_up_pointing_index]='\xE2\x98\x9D' +emoji[white_smiling_face]='\xE2\x98\xBA' +emoji[aries]='\xE2\x99\x88' +emoji[taurus]='\xE2\x99\x89' +emoji[gemini]='\xE2\x99\x8A' +emoji[cancer]='\xE2\x99\x8B' +emoji[leo]='\xE2\x99\x8C' +emoji[virgo]='\xE2\x99\x8D' +emoji[libra]='\xE2\x99\x8E' +emoji[scorpius]='\xE2\x99\x8F' +emoji[sagittarius]='\xE2\x99\x90' +emoji[capricorn]='\xE2\x99\x91' +emoji[aquarius]='\xE2\x99\x92' +emoji[pisces]='\xE2\x99\x93' +emoji[black_spade_suit]='\xE2\x99\xA0' +emoji[black_club_suit]='\xE2\x99\xA3' +emoji[black_heart_suit]='\xE2\x99\xA5' +emoji[black_diamond_suit]='\xE2\x99\xA6' +emoji[hot_springs]='\xE2\x99\xA8' +emoji[black_universal_recycling_symbol]='\xE2\x99\xBB' +emoji[wheelchair_symbol]='\xE2\x99\xBF' +emoji[anchor]='\xE2\x9A\x93' +emoji[warning_sign]='\xE2\x9A\xA0' +emoji[high_voltage_sign]='\xE2\x9A\xA1' +emoji[medium_white_circle]='\xE2\x9A\xAA' +emoji[medium_black_circle]='\xE2\x9A\xAB' +emoji[soccer_ball]='\xE2\x9A\xBD' +emoji[baseball]='\xE2\x9A\xBE' +emoji[snowman_without_snow]='\xE2\x9B\x84' +emoji[sun_behind_cloud]='\xE2\x9B\x85' +emoji[ophiuchus]='\xE2\x9B\x8E' +emoji[no_entry]='\xE2\x9B\x94' +emoji[church]='\xE2\x9B\xAA' +emoji[fountain]='\xE2\x9B\xB2' +emoji[flag_in_hole]='\xE2\x9B\xB3' +emoji[sailboat]='\xE2\x9B\xB5' +emoji[tent]='\xE2\x9B\xBA' +emoji[fuel_pump]='\xE2\x9B\xBD' +emoji[arrow_pointing_rightwards_then_curving_upwards]='\xE2\xA4\xB4' +emoji[arrow_pointing_rightwards_then_curving_downwards]='\xE2\xA4\xB5' +emoji[leftwards_black_arrow]='\xE2\xAC\x85' +emoji[upwards_black_arrow]='\xE2\xAC\x86' +emoji[downwards_black_arrow]='\xE2\xAC\x87' +emoji[black_large_square]='\xE2\xAC\x9B' +emoji[white_large_square]='\xE2\xAC\x9C' +emoji[white_medium_star]='\xE2\xAD\x90' +emoji[heavy_large_circle]='\xE2\xAD\x95' +emoji[wavy_dash]='\xE3\x80\xB0' +emoji[part_alternation_mark]='\xE3\x80\xBD' +emoji[circled_ideograph_congratulation]='\xE3\x8A\x97' +emoji[circled_ideograph_secret]='\xE3\x8A\x99' +emoji[mahjong_tile_red_dragon]='\xF0\x9F\x80\x84' +emoji[playing_card_black_joker]='\xF0\x9F\x83\x8F' +emoji[cyclone]='\xF0\x9F\x8C\x80' +emoji[foggy]='\xF0\x9F\x8C\x81' +emoji[closed_umbrella]='\xF0\x9F\x8C\x82' +emoji[night_with_stars]='\xF0\x9F\x8C\x83' +emoji[sunrise_over_mountains]='\xF0\x9F\x8C\x84' +emoji[sunrise]='\xF0\x9F\x8C\x85' +emoji[cityscape_at_dusk]='\xF0\x9F\x8C\x86' +emoji[sunset_over_buildings]='\xF0\x9F\x8C\x87' +emoji[rainbow]='\xF0\x9F\x8C\x88' +emoji[bridge_at_night]='\xF0\x9F\x8C\x89' +emoji[water_wave]='\xF0\x9F\x8C\x8A' +emoji[volcano]='\xF0\x9F\x8C\x8B' +emoji[milky_way]='\xF0\x9F\x8C\x8C' +emoji[earth_globe_asia_australia]='\xF0\x9F\x8C\x8F' +emoji[new_moon_symbol]='\xF0\x9F\x8C\x91' +emoji[first_quarter_moon_symbol]='\xF0\x9F\x8C\x93' +emoji[waxing_gibbous_moon_symbol]='\xF0\x9F\x8C\x94' +emoji[full_moon_symbol]='\xF0\x9F\x8C\x95' +emoji[crescent_moon]='\xF0\x9F\x8C\x99' +emoji[first_quarter_moon_with_face]='\xF0\x9F\x8C\x9B' +emoji[glowing_star]='\xF0\x9F\x8C\x9F' +emoji[shooting_star]='\xF0\x9F\x8C\xA0' +emoji[chestnut]='\xF0\x9F\x8C\xB0' +emoji[seedling]='\xF0\x9F\x8C\xB1' +emoji[palm_tree]='\xF0\x9F\x8C\xB4' +emoji[cactus]='\xF0\x9F\x8C\xB5' +emoji[tulip]='\xF0\x9F\x8C\xB7' +emoji[cherry_blossom]='\xF0\x9F\x8C\xB8' +emoji[rose]='\xF0\x9F\x8C\xB9' +emoji[hibiscus]='\xF0\x9F\x8C\xBA' +emoji[sunflower]='\xF0\x9F\x8C\xBB' +emoji[blossom]='\xF0\x9F\x8C\xBC' +emoji[ear_of_maize]='\xF0\x9F\x8C\xBD' +emoji[ear_of_rice]='\xF0\x9F\x8C\xBE' +emoji[herb]='\xF0\x9F\x8C\xBF' +emoji[four_leaf_clover]='\xF0\x9F\x8D\x80' +emoji[maple_leaf]='\xF0\x9F\x8D\x81' +emoji[fallen_leaf]='\xF0\x9F\x8D\x82' +emoji[leaf_fluttering_in_wind]='\xF0\x9F\x8D\x83' +emoji[mushroom]='\xF0\x9F\x8D\x84' +emoji[tomato]='\xF0\x9F\x8D\x85' +emoji[aubergine]='\xF0\x9F\x8D\x86' +emoji[grapes]='\xF0\x9F\x8D\x87' +emoji[melon]='\xF0\x9F\x8D\x88' +emoji[watermelon]='\xF0\x9F\x8D\x89' +emoji[tangerine]='\xF0\x9F\x8D\x8A' +emoji[banana]='\xF0\x9F\x8D\x8C' +emoji[pineapple]='\xF0\x9F\x8D\x8D' +emoji[red_apple]='\xF0\x9F\x8D\x8E' +emoji[green_apple]='\xF0\x9F\x8D\x8F' +emoji[peach]='\xF0\x9F\x8D\x91' +emoji[cherries]='\xF0\x9F\x8D\x92' +emoji[strawberry]='\xF0\x9F\x8D\x93' +emoji[hamburger]='\xF0\x9F\x8D\x94' +emoji[slice_of_pizza]='\xF0\x9F\x8D\x95' +emoji[meat_on_bone]='\xF0\x9F\x8D\x96' +emoji[poultry_leg]='\xF0\x9F\x8D\x97' +emoji[rice_cracker]='\xF0\x9F\x8D\x98' +emoji[rice_ball]='\xF0\x9F\x8D\x99' +emoji[cooked_rice]='\xF0\x9F\x8D\x9A' +emoji[curry_and_rice]='\xF0\x9F\x8D\x9B' +emoji[steaming_bowl]='\xF0\x9F\x8D\x9C' +emoji[spaghetti]='\xF0\x9F\x8D\x9D' +emoji[bread]='\xF0\x9F\x8D\x9E' +emoji[french_fries]='\xF0\x9F\x8D\x9F' +emoji[roasted_sweet_potato]='\xF0\x9F\x8D\xA0' +emoji[dango]='\xF0\x9F\x8D\xA1' +emoji[oden]='\xF0\x9F\x8D\xA2' +emoji[sushi]='\xF0\x9F\x8D\xA3' +emoji[fried_shrimp]='\xF0\x9F\x8D\xA4' +emoji[fish_cake_with_swirl_design]='\xF0\x9F\x8D\xA5' +emoji[soft_ice_cream]='\xF0\x9F\x8D\xA6' +emoji[shaved_ice]='\xF0\x9F\x8D\xA7' +emoji[ice_cream]='\xF0\x9F\x8D\xA8' +emoji[doughnut]='\xF0\x9F\x8D\xA9' +emoji[cookie]='\xF0\x9F\x8D\xAA' +emoji[chocolate_bar]='\xF0\x9F\x8D\xAB' +emoji[candy]='\xF0\x9F\x8D\xAC' +emoji[lollipop]='\xF0\x9F\x8D\xAD' +emoji[custard]='\xF0\x9F\x8D\xAE' +emoji[honey_pot]='\xF0\x9F\x8D\xAF' +emoji[shortcake]='\xF0\x9F\x8D\xB0' +emoji[bento_box]='\xF0\x9F\x8D\xB1' +emoji[pot_of_food]='\xF0\x9F\x8D\xB2' +emoji[cooking]='\xF0\x9F\x8D\xB3' +emoji[fork_and_knife]='\xF0\x9F\x8D\xB4' +emoji[teacup_without_handle]='\xF0\x9F\x8D\xB5' +emoji[sake_bottle_and_cup]='\xF0\x9F\x8D\xB6' +emoji[wine_glass]='\xF0\x9F\x8D\xB7' +emoji[cocktail_glass]='\xF0\x9F\x8D\xB8' +emoji[tropical_drink]='\xF0\x9F\x8D\xB9' +emoji[beer_mug]='\xF0\x9F\x8D\xBA' +emoji[clinking_beer_mugs]='\xF0\x9F\x8D\xBB' +emoji[ribbon]='\xF0\x9F\x8E\x80' +emoji[wrapped_present]='\xF0\x9F\x8E\x81' +emoji[birthday_cake]='\xF0\x9F\x8E\x82' +emoji[jack_o_lantern]='\xF0\x9F\x8E\x83' +emoji[christmas_tree]='\xF0\x9F\x8E\x84' +emoji[father_christmas]='\xF0\x9F\x8E\x85' +emoji[fireworks]='\xF0\x9F\x8E\x86' +emoji[firework_sparkler]='\xF0\x9F\x8E\x87' +emoji[balloon]='\xF0\x9F\x8E\x88' +emoji[party_popper]='\xF0\x9F\x8E\x89' +emoji[confetti_ball]='\xF0\x9F\x8E\x8A' +emoji[tanabata_tree]='\xF0\x9F\x8E\x8B' +emoji[crossed_flags]='\xF0\x9F\x8E\x8C' +emoji[pine_decoration]='\xF0\x9F\x8E\x8D' +emoji[japanese_dolls]='\xF0\x9F\x8E\x8E' +emoji[carp_streamer]='\xF0\x9F\x8E\x8F' +emoji[wind_chime]='\xF0\x9F\x8E\x90' +emoji[moon_viewing_ceremony]='\xF0\x9F\x8E\x91' +emoji[school_satchel]='\xF0\x9F\x8E\x92' +emoji[graduation_cap]='\xF0\x9F\x8E\x93' +emoji[carousel_horse]='\xF0\x9F\x8E\xA0' +emoji[ferris_wheel]='\xF0\x9F\x8E\xA1' +emoji[roller_coaster]='\xF0\x9F\x8E\xA2' +emoji[fishing_pole_and_fish]='\xF0\x9F\x8E\xA3' +emoji[microphone]='\xF0\x9F\x8E\xA4' +emoji[movie_camera]='\xF0\x9F\x8E\xA5' +emoji[cinema]='\xF0\x9F\x8E\xA6' +emoji[headphone]='\xF0\x9F\x8E\xA7' +emoji[artist_palette]='\xF0\x9F\x8E\xA8' +emoji[top_hat]='\xF0\x9F\x8E\xA9' +emoji[circus_tent]='\xF0\x9F\x8E\xAA' +emoji[ticket]='\xF0\x9F\x8E\xAB' +emoji[clapper_board]='\xF0\x9F\x8E\xAC' +emoji[performing_arts]='\xF0\x9F\x8E\xAD' +emoji[video_game]='\xF0\x9F\x8E\xAE' +emoji[direct_hit]='\xF0\x9F\x8E\xAF' +emoji[slot_machine]='\xF0\x9F\x8E\xB0' +emoji[billiards]='\xF0\x9F\x8E\xB1' +emoji[game_die]='\xF0\x9F\x8E\xB2' +emoji[bowling]='\xF0\x9F\x8E\xB3' +emoji[flower_playing_cards]='\xF0\x9F\x8E\xB4' +emoji[musical_note]='\xF0\x9F\x8E\xB5' +emoji[multiple_musical_notes]='\xF0\x9F\x8E\xB6' +emoji[saxophone]='\xF0\x9F\x8E\xB7' +emoji[guitar]='\xF0\x9F\x8E\xB8' +emoji[musical_keyboard]='\xF0\x9F\x8E\xB9' +emoji[trumpet]='\xF0\x9F\x8E\xBA' +emoji[violin]='\xF0\x9F\x8E\xBB' +emoji[musical_score]='\xF0\x9F\x8E\xBC' +emoji[running_shirt_with_sash]='\xF0\x9F\x8E\xBD' +emoji[tennis_racquet_and_ball]='\xF0\x9F\x8E\xBE' +emoji[ski_and_ski_boot]='\xF0\x9F\x8E\xBF' +emoji[basketball_and_hoop]='\xF0\x9F\x8F\x80' +emoji[chequered_flag]='\xF0\x9F\x8F\x81' +emoji[snowboarder]='\xF0\x9F\x8F\x82' +emoji[runner]='\xF0\x9F\x8F\x83' +emoji[surfer]='\xF0\x9F\x8F\x84' +emoji[trophy]='\xF0\x9F\x8F\x86' +emoji[american_football]='\xF0\x9F\x8F\x88' +emoji[swimmer]='\xF0\x9F\x8F\x8A' +emoji[house_building]='\xF0\x9F\x8F\xA0' +emoji[house_with_garden]='\xF0\x9F\x8F\xA1' +emoji[office_building]='\xF0\x9F\x8F\xA2' +emoji[japanese_post_office]='\xF0\x9F\x8F\xA3' +emoji[hospital]='\xF0\x9F\x8F\xA5' +emoji[bank]='\xF0\x9F\x8F\xA6' +emoji[automated_teller_machine]='\xF0\x9F\x8F\xA7' +emoji[hotel]='\xF0\x9F\x8F\xA8' +emoji[love_hotel]='\xF0\x9F\x8F\xA9' +emoji[convenience_store]='\xF0\x9F\x8F\xAA' +emoji[school]='\xF0\x9F\x8F\xAB' +emoji[department_store]='\xF0\x9F\x8F\xAC' +emoji[factory]='\xF0\x9F\x8F\xAD' +emoji[izakaya_lantern]='\xF0\x9F\x8F\xAE' +emoji[japanese_castle]='\xF0\x9F\x8F\xAF' +emoji[european_castle]='\xF0\x9F\x8F\xB0' +emoji[snail]='\xF0\x9F\x90\x8C' +emoji[snake]='\xF0\x9F\x90\x8D' +emoji[horse]='\xF0\x9F\x90\x8E' +emoji[sheep]='\xF0\x9F\x90\x91' +emoji[monkey]='\xF0\x9F\x90\x92' +emoji[chicken]='\xF0\x9F\x90\x94' +emoji[boar]='\xF0\x9F\x90\x97' +emoji[elephant]='\xF0\x9F\x90\x98' +emoji[octopus]='\xF0\x9F\x90\x99' +emoji[spiral_shell]='\xF0\x9F\x90\x9A' +emoji[bug]='\xF0\x9F\x90\x9B' +emoji[ant]='\xF0\x9F\x90\x9C' +emoji[honeybee]='\xF0\x9F\x90\x9D' +emoji[lady_beetle]='\xF0\x9F\x90\x9E' +emoji[fish]='\xF0\x9F\x90\x9F' +emoji[tropical_fish]='\xF0\x9F\x90\xA0' +emoji[blowfish]='\xF0\x9F\x90\xA1' +emoji[turtle]='\xF0\x9F\x90\xA2' +emoji[hatching_chick]='\xF0\x9F\x90\xA3' +emoji[baby_chick]='\xF0\x9F\x90\xA4' +emoji[front_facing_baby_chick]='\xF0\x9F\x90\xA5' +emoji[bird]='\xF0\x9F\x90\xA6' +emoji[penguin]='\xF0\x9F\x90\xA7' +emoji[koala]='\xF0\x9F\x90\xA8' +emoji[poodle]='\xF0\x9F\x90\xA9' +emoji[bactrian_camel]='\xF0\x9F\x90\xAB' +emoji[dolphin]='\xF0\x9F\x90\xAC' +emoji[mouse_face]='\xF0\x9F\x90\xAD' +emoji[cow_face]='\xF0\x9F\x90\xAE' +emoji[tiger_face]='\xF0\x9F\x90\xAF' +emoji[rabbit_face]='\xF0\x9F\x90\xB0' +emoji[cat_face]='\xF0\x9F\x90\xB1' +emoji[dragon_face]='\xF0\x9F\x90\xB2' +emoji[spouting_whale]='\xF0\x9F\x90\xB3' +emoji[horse_face]='\xF0\x9F\x90\xB4' +emoji[monkey_face]='\xF0\x9F\x90\xB5' +emoji[dog_face]='\xF0\x9F\x90\xB6' +emoji[pig_face]='\xF0\x9F\x90\xB7' +emoji[frog_face]='\xF0\x9F\x90\xB8' +emoji[hamster_face]='\xF0\x9F\x90\xB9' +emoji[wolf_face]='\xF0\x9F\x90\xBA' +emoji[bear_face]='\xF0\x9F\x90\xBB' +emoji[panda_face]='\xF0\x9F\x90\xBC' +emoji[pig_nose]='\xF0\x9F\x90\xBD' +emoji[paw_prints]='\xF0\x9F\x90\xBE' +emoji[eyes]='\xF0\x9F\x91\x80' +emoji[ear]='\xF0\x9F\x91\x82' +emoji[nose]='\xF0\x9F\x91\x83' +emoji[mouth]='\xF0\x9F\x91\x84' +emoji[tongue]='\xF0\x9F\x91\x85' +emoji[white_up_pointing_backhand_index]='\xF0\x9F\x91\x86' +emoji[white_down_pointing_backhand_index]='\xF0\x9F\x91\x87' +emoji[white_left_pointing_backhand_index]='\xF0\x9F\x91\x88' +emoji[white_right_pointing_backhand_index]='\xF0\x9F\x91\x89' +emoji[fisted_hand_sign]='\xF0\x9F\x91\x8A' +emoji[waving_hand_sign]='\xF0\x9F\x91\x8B' +emoji[ok_hand_sign]='\xF0\x9F\x91\x8C' +emoji[thumbs_up_sign]='\xF0\x9F\x91\x8D' +emoji[thumbs_down_sign]='\xF0\x9F\x91\x8E' +emoji[clapping_hands_sign]='\xF0\x9F\x91\x8F' +emoji[open_hands_sign]='\xF0\x9F\x91\x90' +emoji[crown]='\xF0\x9F\x91\x91' +emoji[womans_hat]='\xF0\x9F\x91\x92' +emoji[eyeglasses]='\xF0\x9F\x91\x93' +emoji[necktie]='\xF0\x9F\x91\x94' +emoji[t_shirt]='\xF0\x9F\x91\x95' +emoji[jeans]='\xF0\x9F\x91\x96' +emoji[dress]='\xF0\x9F\x91\x97' +emoji[kimono]='\xF0\x9F\x91\x98' +emoji[bikini]='\xF0\x9F\x91\x99' +emoji[womans_clothes]='\xF0\x9F\x91\x9A' +emoji[purse]='\xF0\x9F\x91\x9B' +emoji[handbag]='\xF0\x9F\x91\x9C' +emoji[pouch]='\xF0\x9F\x91\x9D' +emoji[mans_shoe]='\xF0\x9F\x91\x9E' +emoji[athletic_shoe]='\xF0\x9F\x91\x9F' +emoji[high_heeled_shoe]='\xF0\x9F\x91\xA0' +emoji[womans_sandal]='\xF0\x9F\x91\xA1' +emoji[womans_boots]='\xF0\x9F\x91\xA2' +emoji[footprints]='\xF0\x9F\x91\xA3' +emoji[bust_in_silhouette]='\xF0\x9F\x91\xA4' +emoji[boy]='\xF0\x9F\x91\xA6' +emoji[girl]='\xF0\x9F\x91\xA7' +emoji[man]='\xF0\x9F\x91\xA8' +emoji[woman]='\xF0\x9F\x91\xA9' +emoji[family]='\xF0\x9F\x91\xAA' +emoji[man_and_woman_holding_hands]='\xF0\x9F\x91\xAB' +emoji[police_officer]='\xF0\x9F\x91\xAE' +emoji[woman_with_bunny_ears]='\xF0\x9F\x91\xAF' +emoji[bride_with_veil]='\xF0\x9F\x91\xB0' +emoji[person_with_blond_hair]='\xF0\x9F\x91\xB1' +emoji[man_with_gua_pi_mao]='\xF0\x9F\x91\xB2' +emoji[man_with_turban]='\xF0\x9F\x91\xB3' +emoji[older_man]='\xF0\x9F\x91\xB4' +emoji[older_woman]='\xF0\x9F\x91\xB5' +emoji[baby]='\xF0\x9F\x91\xB6' +emoji[construction_worker]='\xF0\x9F\x91\xB7' +emoji[princess]='\xF0\x9F\x91\xB8' +emoji[japanese_ogre]='\xF0\x9F\x91\xB9' +emoji[japanese_goblin]='\xF0\x9F\x91\xBA' +emoji[ghost]='\xF0\x9F\x91\xBB' +emoji[baby_angel]='\xF0\x9F\x91\xBC' +emoji[extraterrestrial_alien]='\xF0\x9F\x91\xBD' +emoji[alien_monster]='\xF0\x9F\x91\xBE' +emoji[imp]='\xF0\x9F\x91\xBF' +emoji[skull]='\xF0\x9F\x92\x80' +emoji[information_desk_person]='\xF0\x9F\x92\x81' +emoji[guardsman]='\xF0\x9F\x92\x82' +emoji[dancer]='\xF0\x9F\x92\x83' +emoji[lipstick]='\xF0\x9F\x92\x84' +emoji[nail_polish]='\xF0\x9F\x92\x85' +emoji[face_massage]='\xF0\x9F\x92\x86' +emoji[haircut]='\xF0\x9F\x92\x87' +emoji[barber_pole]='\xF0\x9F\x92\x88' +emoji[syringe]='\xF0\x9F\x92\x89' +emoji[pill]='\xF0\x9F\x92\x8A' +emoji[kiss_mark]='\xF0\x9F\x92\x8B' +emoji[love_letter]='\xF0\x9F\x92\x8C' +emoji[ring]='\xF0\x9F\x92\x8D' +emoji[gem_stone]='\xF0\x9F\x92\x8E' +emoji[kiss]='\xF0\x9F\x92\x8F' +emoji[bouquet]='\xF0\x9F\x92\x90' +emoji[couple_with_heart]='\xF0\x9F\x92\x91' +emoji[wedding]='\xF0\x9F\x92\x92' +emoji[beating_heart]='\xF0\x9F\x92\x93' +emoji[broken_heart]='\xF0\x9F\x92\x94' +emoji[two_hearts]='\xF0\x9F\x92\x95' +emoji[sparkling_heart]='\xF0\x9F\x92\x96' +emoji[growing_heart]='\xF0\x9F\x92\x97' +emoji[heart_with_arrow]='\xF0\x9F\x92\x98' +emoji[blue_heart]='\xF0\x9F\x92\x99' +emoji[green_heart]='\xF0\x9F\x92\x9A' +emoji[yellow_heart]='\xF0\x9F\x92\x9B' +emoji[purple_heart]='\xF0\x9F\x92\x9C' +emoji[heart_with_ribbon]='\xF0\x9F\x92\x9D' +emoji[revolving_hearts]='\xF0\x9F\x92\x9E' +emoji[heart_decoration]='\xF0\x9F\x92\x9F' +emoji[diamond_shape_with_a_dot_inside]='\xF0\x9F\x92\xA0' +emoji[electric_light_bulb]='\xF0\x9F\x92\xA1' +emoji[anger_symbol]='\xF0\x9F\x92\xA2' +emoji[bomb]='\xF0\x9F\x92\xA3' +emoji[sleeping_symbol]='\xF0\x9F\x92\xA4' +emoji[collision_symbol]='\xF0\x9F\x92\xA5' +emoji[splashing_sweat_symbol]='\xF0\x9F\x92\xA6' +emoji[droplet]='\xF0\x9F\x92\xA7' +emoji[dash_symbol]='\xF0\x9F\x92\xA8' +emoji[pile_of_poo]='\xF0\x9F\x92\xA9' +emoji[flexed_biceps]='\xF0\x9F\x92\xAA' +emoji[dizzy_symbol]='\xF0\x9F\x92\xAB' +emoji[speech_balloon]='\xF0\x9F\x92\xAC' +emoji[white_flower]='\xF0\x9F\x92\xAE' +emoji[hundred_points_symbol]='\xF0\x9F\x92\xAF' +emoji[money_bag]='\xF0\x9F\x92\xB0' +emoji[currency_exchange]='\xF0\x9F\x92\xB1' +emoji[heavy_dollar_sign]='\xF0\x9F\x92\xB2' +emoji[credit_card]='\xF0\x9F\x92\xB3' +emoji[banknote_with_yen_sign]='\xF0\x9F\x92\xB4' +emoji[banknote_with_dollar_sign]='\xF0\x9F\x92\xB5' +emoji[money_with_wings]='\xF0\x9F\x92\xB8' +emoji[chart_with_upwards_trend_and_yen_sign]='\xF0\x9F\x92\xB9' +emoji[seat]='\xF0\x9F\x92\xBA' +emoji[personal_computer]='\xF0\x9F\x92\xBB' +emoji[briefcase]='\xF0\x9F\x92\xBC' +emoji[minidisc]='\xF0\x9F\x92\xBD' +emoji[floppy_disk]='\xF0\x9F\x92\xBE' +emoji[optical_disc]='\xF0\x9F\x92\xBF' +emoji[dvd]='\xF0\x9F\x93\x80' +emoji[file_folder]='\xF0\x9F\x93\x81' +emoji[open_file_folder]='\xF0\x9F\x93\x82' +emoji[page_with_curl]='\xF0\x9F\x93\x83' +emoji[page_facing_up]='\xF0\x9F\x93\x84' +emoji[calendar]='\xF0\x9F\x93\x85' +emoji[tear_off_calendar]='\xF0\x9F\x93\x86' +emoji[card_index]='\xF0\x9F\x93\x87' +emoji[chart_with_upwards_trend]='\xF0\x9F\x93\x88' +emoji[chart_with_downwards_trend]='\xF0\x9F\x93\x89' +emoji[bar_chart]='\xF0\x9F\x93\x8A' +emoji[clipboard]='\xF0\x9F\x93\x8B' +emoji[pushpin]='\xF0\x9F\x93\x8C' +emoji[round_pushpin]='\xF0\x9F\x93\x8D' +emoji[paperclip]='\xF0\x9F\x93\x8E' +emoji[straight_ruler]='\xF0\x9F\x93\x8F' +emoji[triangular_ruler]='\xF0\x9F\x93\x90' +emoji[bookmark_tabs]='\xF0\x9F\x93\x91' +emoji[ledger]='\xF0\x9F\x93\x92' +emoji[notebook]='\xF0\x9F\x93\x93' +emoji[notebook_with_decorative_cover]='\xF0\x9F\x93\x94' +emoji[closed_book]='\xF0\x9F\x93\x95' +emoji[open_book]='\xF0\x9F\x93\x96' +emoji[green_book]='\xF0\x9F\x93\x97' +emoji[blue_book]='\xF0\x9F\x93\x98' +emoji[orange_book]='\xF0\x9F\x93\x99' +emoji[books]='\xF0\x9F\x93\x9A' +emoji[name_badge]='\xF0\x9F\x93\x9B' +emoji[scroll]='\xF0\x9F\x93\x9C' +emoji[memo]='\xF0\x9F\x93\x9D' +emoji[telephone_receiver]='\xF0\x9F\x93\x9E' +emoji[pager]='\xF0\x9F\x93\x9F' +emoji[fax_machine]='\xF0\x9F\x93\xA0' +emoji[satellite_antenna]='\xF0\x9F\x93\xA1' +emoji[public_address_loudspeaker]='\xF0\x9F\x93\xA2' +emoji[cheering_megaphone]='\xF0\x9F\x93\xA3' +emoji[outbox_tray]='\xF0\x9F\x93\xA4' +emoji[inbox_tray]='\xF0\x9F\x93\xA5' +emoji[package]='\xF0\x9F\x93\xA6' +emoji[e_mail_symbol]='\xF0\x9F\x93\xA7' +emoji[incoming_envelope]='\xF0\x9F\x93\xA8' +emoji[envelope_with_downwards_arrow_above]='\xF0\x9F\x93\xA9' +emoji[closed_mailbox_with_lowered_flag]='\xF0\x9F\x93\xAA' +emoji[closed_mailbox_with_raised_flag]='\xF0\x9F\x93\xAB' +emoji[postbox]='\xF0\x9F\x93\xAE' +emoji[newspaper]='\xF0\x9F\x93\xB0' +emoji[mobile_phone]='\xF0\x9F\x93\xB1' +emoji[mobile_phone_with_rightwards_arrow_at_left]='\xF0\x9F\x93\xB2' +emoji[vibration_mode]='\xF0\x9F\x93\xB3' +emoji[mobile_phone_off]='\xF0\x9F\x93\xB4' +emoji[antenna_with_bars]='\xF0\x9F\x93\xB6' +emoji[camera]='\xF0\x9F\x93\xB7' +emoji[video_camera]='\xF0\x9F\x93\xB9' +emoji[television]='\xF0\x9F\x93\xBA' +emoji[radio]='\xF0\x9F\x93\xBB' +emoji[videocassette]='\xF0\x9F\x93\xBC' +emoji[clockwise_downwards_and_upwards_open_circle_arrows]='\xF0\x9F\x94\x83' +emoji[speaker_with_three_sound_waves]='\xF0\x9F\x94\x8A' +emoji[battery]='\xF0\x9F\x94\x8B' +emoji[electric_plug]='\xF0\x9F\x94\x8C' +emoji[left_pointing_magnifying_glass]='\xF0\x9F\x94\x8D' +emoji[right_pointing_magnifying_glass]='\xF0\x9F\x94\x8E' +emoji[lock_with_ink_pen]='\xF0\x9F\x94\x8F' +emoji[closed_lock_with_key]='\xF0\x9F\x94\x90' +emoji[key]='\xF0\x9F\x94\x91' +emoji[lock]='\xF0\x9F\x94\x92' +emoji[open_lock]='\xF0\x9F\x94\x93' +emoji[bell]='\xF0\x9F\x94\x94' +emoji[bookmark]='\xF0\x9F\x94\x96' +emoji[link_symbol]='\xF0\x9F\x94\x97' +emoji[radio_button]='\xF0\x9F\x94\x98' +emoji[back_with_leftwards_arrow_above]='\xF0\x9F\x94\x99' +emoji[end_with_leftwards_arrow_above]='\xF0\x9F\x94\x9A' +emoji[on_with_exclamation_mark_with_left_right_arrow_above]='\xF0\x9F\x94\x9B' +emoji[soon_with_rightwards_arrow_above]='\xF0\x9F\x94\x9C' +emoji[top_with_upwards_arrow_above]='\xF0\x9F\x94\x9D' +emoji[no_one_under_eighteen_symbol]='\xF0\x9F\x94\x9E' +emoji[keycap_ten]='\xF0\x9F\x94\x9F' +emoji[input_symbol_for_latin_capital_letters]='\xF0\x9F\x94\xA0' +emoji[input_symbol_for_latin_small_letters]='\xF0\x9F\x94\xA1' +emoji[input_symbol_for_numbers]='\xF0\x9F\x94\xA2' +emoji[input_symbol_for_symbols]='\xF0\x9F\x94\xA3' +emoji[input_symbol_for_latin_letters]='\xF0\x9F\x94\xA4' +emoji[fire]='\xF0\x9F\x94\xA5' +emoji[electric_torch]='\xF0\x9F\x94\xA6' +emoji[wrench]='\xF0\x9F\x94\xA7' +emoji[hammer]='\xF0\x9F\x94\xA8' +emoji[nut_and_bolt]='\xF0\x9F\x94\xA9' +emoji[hocho]='\xF0\x9F\x94\xAA' +emoji[pistol]='\xF0\x9F\x94\xAB' +emoji[crystal_ball]='\xF0\x9F\x94\xAE' +emoji[six_pointed_star_with_middle_dot]='\xF0\x9F\x94\xAF' +emoji[japanese_symbol_for_beginner]='\xF0\x9F\x94\xB0' +emoji[trident_emblem]='\xF0\x9F\x94\xB1' +emoji[black_square_button]='\xF0\x9F\x94\xB2' +emoji[white_square_button]='\xF0\x9F\x94\xB3' +emoji[large_red_circle]='\xF0\x9F\x94\xB4' +emoji[large_blue_circle]='\xF0\x9F\x94\xB5' +emoji[large_orange_diamond]='\xF0\x9F\x94\xB6' +emoji[large_blue_diamond]='\xF0\x9F\x94\xB7' +emoji[small_orange_diamond]='\xF0\x9F\x94\xB8' +emoji[small_blue_diamond]='\xF0\x9F\x94\xB9' +emoji[up_pointing_red_triangle]='\xF0\x9F\x94\xBA' +emoji[down_pointing_red_triangle]='\xF0\x9F\x94\xBB' +emoji[up_pointing_small_red_triangle]='\xF0\x9F\x94\xBC' +emoji[down_pointing_small_red_triangle]='\xF0\x9F\x94\xBD' +emoji[clock_face_one_oclock]='\xF0\x9F\x95\x90' +emoji[clock_face_two_oclock]='\xF0\x9F\x95\x91' +emoji[clock_face_three_oclock]='\xF0\x9F\x95\x92' +emoji[clock_face_four_oclock]='\xF0\x9F\x95\x93' +emoji[clock_face_five_oclock]='\xF0\x9F\x95\x94' +emoji[clock_face_six_oclock]='\xF0\x9F\x95\x95' +emoji[clock_face_seven_oclock]='\xF0\x9F\x95\x96' +emoji[clock_face_eight_oclock]='\xF0\x9F\x95\x97' +emoji[clock_face_nine_oclock]='\xF0\x9F\x95\x98' +emoji[clock_face_ten_oclock]='\xF0\x9F\x95\x99' +emoji[clock_face_eleven_oclock]='\xF0\x9F\x95\x9A' +emoji[clock_face_twelve_oclock]='\xF0\x9F\x95\x9B' +emoji[mount_fuji]='\xF0\x9F\x97\xBB' +emoji[tokyo_tower]='\xF0\x9F\x97\xBC' +emoji[statue_of_liberty]='\xF0\x9F\x97\xBD' +emoji[silhouette_of_japan]='\xF0\x9F\x97\xBE' +emoji[moyai]='\xF0\x9F\x97\xBF' +emoji[grinning_face]='\xF0\x9F\x98\x80' +emoji[smiling_face_with_halo]='\xF0\x9F\x98\x87' +emoji[smiling_face_with_horns]='\xF0\x9F\x98\x88' +emoji[smiling_face_with_sunglasses]='\xF0\x9F\x98\x8E' +emoji[neutral_face]='\xF0\x9F\x98\x90' +emoji[expressionless_face]='\xF0\x9F\x98\x91' +emoji[confused_face]='\xF0\x9F\x98\x95' +emoji[kissing_face]='\xF0\x9F\x98\x97' +emoji[kissing_face_with_smiling_eyes]='\xF0\x9F\x98\x99' +emoji[face_with_stuck_out_tongue]='\xF0\x9F\x98\x9B' +emoji[worried_face]='\xF0\x9F\x98\x9F' +emoji[frowning_face_with_open_mouth]='\xF0\x9F\x98\xA6' +emoji[anguished_face]='\xF0\x9F\x98\xA7' +emoji[grimacing_face]='\xF0\x9F\x98\xAC' +emoji[face_with_open_mouth]='\xF0\x9F\x98\xAE' +emoji[hushed_face]='\xF0\x9F\x98\xAF' +emoji[sleeping_face]='\xF0\x9F\x98\xB4' +emoji[face_without_mouth]='\xF0\x9F\x98\xB6' +emoji[helicopter]='\xF0\x9F\x9A\x81' +emoji[steam_locomotive]='\xF0\x9F\x9A\x82' +emoji[train]='\xF0\x9F\x9A\x86' +emoji[light_rail]='\xF0\x9F\x9A\x88' +emoji[tram]='\xF0\x9F\x9A\x8A' +emoji[oncoming_bus]='\xF0\x9F\x9A\x8D' +emoji[trolleybus]='\xF0\x9F\x9A\x8E' +emoji[minibus]='\xF0\x9F\x9A\x90' +emoji[oncoming_police_car]='\xF0\x9F\x9A\x94' +emoji[oncoming_taxi]='\xF0\x9F\x9A\x96' +emoji[oncoming_automobile]='\xF0\x9F\x9A\x98' +emoji[articulated_lorry]='\xF0\x9F\x9A\x9B' +emoji[tractor]='\xF0\x9F\x9A\x9C' +emoji[monorail]='\xF0\x9F\x9A\x9D' +emoji[mountain_railway]='\xF0\x9F\x9A\x9E' +emoji[suspension_railway]='\xF0\x9F\x9A\x9F' +emoji[mountain_cableway]='\xF0\x9F\x9A\xA0' +emoji[aerial_tramway]='\xF0\x9F\x9A\xA1' +emoji[rowboat]='\xF0\x9F\x9A\xA3' +emoji[vertical_traffic_light]='\xF0\x9F\x9A\xA6' +emoji[put_litter_in_its_place_symbol]='\xF0\x9F\x9A\xAE' +emoji[do_not_litter_symbol]='\xF0\x9F\x9A\xAF' +emoji[potable_water_symbol]='\xF0\x9F\x9A\xB0' +emoji[non_potable_water_symbol]='\xF0\x9F\x9A\xB1' +emoji[no_bicycles]='\xF0\x9F\x9A\xB3' +emoji[bicyclist]='\xF0\x9F\x9A\xB4' +emoji[mountain_bicyclist]='\xF0\x9F\x9A\xB5' +emoji[no_pedestrians]='\xF0\x9F\x9A\xB7' +emoji[children_crossing]='\xF0\x9F\x9A\xB8' +emoji[shower]='\xF0\x9F\x9A\xBF' +emoji[bathtub]='\xF0\x9F\x9B\x81' +emoji[passport_control]='\xF0\x9F\x9B\x82' +emoji[customs]='\xF0\x9F\x9B\x83' +emoji[baggage_claim]='\xF0\x9F\x9B\x84' +emoji[left_luggage]='\xF0\x9F\x9B\x85' +emoji[earth_globe_europe_africa]='\xF0\x9F\x8C\x8D' +emoji[earth_globe_americas]='\xF0\x9F\x8C\x8E' +emoji[globe_with_meridians]='\xF0\x9F\x8C\x90' +emoji[waxing_crescent_moon_symbol]='\xF0\x9F\x8C\x92' +emoji[waning_gibbous_moon_symbol]='\xF0\x9F\x8C\x96' +emoji[last_quarter_moon_symbol]='\xF0\x9F\x8C\x97' +emoji[waning_crescent_moon_symbol]='\xF0\x9F\x8C\x98' +emoji[new_moon_with_face]='\xF0\x9F\x8C\x9A' +emoji[last_quarter_moon_with_face]='\xF0\x9F\x8C\x9C' +emoji[full_moon_with_face]='\xF0\x9F\x8C\x9D' +emoji[sun_with_face]='\xF0\x9F\x8C\x9E' +emoji[evergreen_tree]='\xF0\x9F\x8C\xB2' +emoji[deciduous_tree]='\xF0\x9F\x8C\xB3' +emoji[lemon]='\xF0\x9F\x8D\x8B' +emoji[pear]='\xF0\x9F\x8D\x90' +emoji[baby_bottle]='\xF0\x9F\x8D\xBC' +emoji[horse_racing]='\xF0\x9F\x8F\x87' +emoji[rugby_football]='\xF0\x9F\x8F\x89' +emoji[european_post_office]='\xF0\x9F\x8F\xA4' +emoji[rat]='\xF0\x9F\x90\x80' +emoji[mouse]='\xF0\x9F\x90\x81' +emoji[ox]='\xF0\x9F\x90\x82' +emoji[water_buffalo]='\xF0\x9F\x90\x83' +emoji[cow]='\xF0\x9F\x90\x84' +emoji[tiger]='\xF0\x9F\x90\x85' +emoji[leopard]='\xF0\x9F\x90\x86' +emoji[rabbit]='\xF0\x9F\x90\x87' +emoji[cat]='\xF0\x9F\x90\x88' +emoji[dragon]='\xF0\x9F\x90\x89' +emoji[crocodile]='\xF0\x9F\x90\x8A' +emoji[whale]='\xF0\x9F\x90\x8B' +emoji[ram]='\xF0\x9F\x90\x8F' +emoji[goat]='\xF0\x9F\x90\x90' +emoji[rooster]='\xF0\x9F\x90\x93' +emoji[dog]='\xF0\x9F\x90\x95' +emoji[pig]='\xF0\x9F\x90\x96' +emoji[dromedary_camel]='\xF0\x9F\x90\xAA' +emoji[busts_in_silhouette]='\xF0\x9F\x91\xA5' +emoji[two_men_holding_hands]='\xF0\x9F\x91\xAC' +emoji[two_women_holding_hands]='\xF0\x9F\x91\xAD' +emoji[thought_balloon]='\xF0\x9F\x92\xAD' +emoji[banknote_with_euro_sign]='\xF0\x9F\x92\xB6' +emoji[banknote_with_pound_sign]='\xF0\x9F\x92\xB7' +emoji[open_mailbox_with_raised_flag]='\xF0\x9F\x93\xAC' +emoji[open_mailbox_with_lowered_flag]='\xF0\x9F\x93\xAD' +emoji[postal_horn]='\xF0\x9F\x93\xAF' +emoji[no_mobile_phones]='\xF0\x9F\x93\xB5' +emoji[twisted_rightwards_arrows]='\xF0\x9F\x94\x80' +emoji[clockwise_rightwards_and_leftwards_open_circle_arrows]='\xF0\x9F\x94\x81' +emoji[clockwise_rightwards_and_leftwards_open_circle_arrows_with_circled_one_overlay]='\xF0\x9F\x94\x82' +emoji[anticlockwise_downwards_and_upwards_open_circle_arrows]='\xF0\x9F\x94\x84' +emoji[low_brightness_symbol]='\xF0\x9F\x94\x85' +emoji[high_brightness_symbol]='\xF0\x9F\x94\x86' +emoji[speaker_with_cancellation_stroke]='\xF0\x9F\x94\x87' +emoji[speaker_with_one_sound_wave]='\xF0\x9F\x94\x89' +emoji[bell_with_cancellation_stroke]='\xF0\x9F\x94\x95' +emoji[microscope]='\xF0\x9F\x94\xAC' +emoji[telescope]='\xF0\x9F\x94\xAD' +emoji[clock_face_one_thirty]='\xF0\x9F\x95\x9C' +emoji[clock_face_two_thirty]='\xF0\x9F\x95\x9D' +emoji[clock_face_three_thirty]='\xF0\x9F\x95\x9E' +emoji[clock_face_four_thirty]='\xF0\x9F\x95\x9F' +emoji[clock_face_five_thirty]='\xF0\x9F\x95\xA0' +emoji[clock_face_six_thirty]='\xF0\x9F\x95\xA1' +emoji[clock_face_seven_thirty]='\xF0\x9F\x95\xA2' +emoji[clock_face_eight_thirty]='\xF0\x9F\x95\xA3' +emoji[clock_face_nine_thirty]='\xF0\x9F\x95\xA4' +emoji[clock_face_ten_thirty]='\xF0\x9F\x95\xA5' +emoji[clock_face_eleven_thirty]='\xF0\x9F\x95\xA6' +emoji[clock_face_twelve_thirty]='\xF0\x9F\x95\xA7' + +emoji_fruits=( + tomato + aubergine + grapes + melon + watermelon + tangerine + banana + pineapple + red_apple + green_apple + peach + cherries + strawberry + lemon + pear +) + +emoji_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_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_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 +) + +function random_emoji(){ + local emoji_array_size=${#emoji[@]} + local random_element_index=$(( ( RANDOM % $emoji_array_size ) + 1 )) + echo ${emoji[@][$random_element_index]} +} + +function random_emoji_from_list(){ + local array_name=$1 + local list_size=${#${(P)array_name}[@]} + local random_index=$(( ( RANDOM % $list_size ) + 1 )) + local key=${${(P)array_name}[@][$random_index]} + echo ${emoji[$key]} +} + +function display_emoji_list(){ + local array_name=$1 + for i in ${${(P)array_name}[@]}; do + echo "${emoji[$i]} = $i" + done +} + +function random_emoji_fruit(){ + random_emoji_from_list 'emoji_fruits' +} + +function random_emoji_vehicle(){ + random_emoji_from_list 'emoji_vehicles' +} + +function random_emoji_animal(){ + random_emoji_from_list 'emoji_animals' +} + +function random_emoji_face(){ + random_emoji_from_list 'emoji_faces' +} + +function display_emoji_fruits(){ + display_emoji_list 'emoji_fruits' +} + +function display_emoji_vehicles(){ + display_emoji_list 'emoji_vehicles' +} + +function display_emoji_animals(){ + display_emoji_list 'emoji_animals' +} + +function display_emoji_faces(){ + display_emoji_list 'emoji_faces' +} + +function display_all_emoji(){ + echo $emoji[@] + echo + for k in ${(k)emoji}; do + echo "${emoji[$k]} = $k" + done +} + From 1274a5e3ab23720e64cf2044cdbe6aa86d402864 Mon Sep 17 00:00:00 2001 From: Zbigniew Siciarz <antyqjon@gmail.com> Date: Mon, 9 Jun 2014 21:03:09 +0200 Subject: [PATCH 072/488] Added cabal freeze subcommand. --- plugins/cabal/cabal.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/cabal/cabal.plugin.zsh b/plugins/cabal/cabal.plugin.zsh index b59438f98..148af5ccf 100644 --- a/plugins/cabal/cabal.plugin.zsh +++ b/plugins/cabal/cabal.plugin.zsh @@ -24,6 +24,7 @@ function _cabal_commands() { "configure:Prepare to build the package" "exec:Run a command with the cabal environment" "fetch:Downloads packages for later installation" + "freeze:Freeze dependencies." "get:Gets a package's source code" "haddock:Generate Haddock HTML documentation" "help:Help about commands" From 7fbbf28e6e37e604c7821a24993d32a478d857f8 Mon Sep 17 00:00:00 2001 From: ncanceill <nicolas.canceill@ens-cachan.org> Date: Tue, 10 Jun 2014 09:50:53 +0200 Subject: [PATCH 073/488] return 0 when not a git repo before, 128 was returned, which could display an error, but out of a git repo this should exit silently fixes #2226 --- lib/git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index 305a77aff..df7722721 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -2,7 +2,7 @@ function git_prompt_info() { if [[ "$(git config --get oh-my-zsh.hide-status)" != "1" ]]; then ref=$(command git symbolic-ref HEAD 2> /dev/null) || \ - ref=$(command git rev-parse --short HEAD 2> /dev/null) || return + ref=$(command git rev-parse --short HEAD 2> /dev/null) || return 0 echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX" fi } From 09fdf763114fc571debff96b48c85ecfaeb7a2e4 Mon Sep 17 00:00:00 2001 From: Will Boyce <me@willboyce.com> Date: Mon, 28 Apr 2014 23:12:49 +0100 Subject: [PATCH 074/488] ignore usernames beginning with underscore --- lib/completion.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index c54249c52..fa1d97f48 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -44,7 +44,7 @@ zstyle ':completion:*:*:*:users' ignored-patterns \ named netdump news nfsnobody nobody nscd ntp nut nx obsrun openvpn \ operator pcap polkitd postfix postgres privoxy pulse pvm quagga radvd \ rpc rpcuser rpm rtkit scard shutdown squid sshd statd svn sync tftp \ - usbmux uucp vcsa wwwrun xfs + usbmux uucp vcsa wwwrun xfs '_*' # ... unless we really want to. zstyle '*' single-ignored show From 9c11202fde61bf3db6755f4083c320d710fe3bd5 Mon Sep 17 00:00:00 2001 From: frantzmiccoli <frantz.miccoli@gmail.com> Date: Fri, 13 Jun 2014 20:28:37 +0200 Subject: [PATCH 075/488] fix `-nt` usage --- plugins/phing/phing.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/phing/phing.plugin.zsh b/plugins/phing/phing.plugin.zsh index 9af03af24..1f022047c 100644 --- a/plugins/phing/phing.plugin.zsh +++ b/plugins/phing/phing.plugin.zsh @@ -1,6 +1,6 @@ _phing_does_target_list_need_generating () { [ ! -f .phing_targets ] && return 0; - [ .phing_targets -nt build.xml ] && return 0; + [ build.xml -nt .phing_targets ] && return 0; return 1; } From 45b61297113c7c2d2cb0eeb80537c8fa944865df Mon Sep 17 00:00:00 2001 From: willmendesneto <willmendesneto@gmail.com> Date: Thu, 19 Jun 2014 23:27:40 -0300 Subject: [PATCH 076/488] Add new plugin: "frontend-search" --- plugins/frontend-search/README.md | 82 ++++++++++ .../frontend-search.plugin.zsh | 151 ++++++++++++++++++ 2 files changed, 233 insertions(+) create mode 100644 plugins/frontend-search/README.md create mode 100644 plugins/frontend-search/frontend-search.plugin.zsh diff --git a/plugins/frontend-search/README.md b/plugins/frontend-search/README.md new file mode 100644 index 000000000..32784d03b --- /dev/null +++ b/plugins/frontend-search/README.md @@ -0,0 +1,82 @@ +## Rationale ## + +The idea for this script is to help searches in important doc contents from frontend. + +## Instalation ## + +I will send a Pull Request with this plugin for .oh-my-zsh official repository. If accept them, it's only add in plugins list that exists in ```.zshrc``` file. + +For now, you can clone this repository and add in ```custom/plugins``` folder + +```bash +$ git clone git://github.com/willmendesneto/frontend-search.git ~/.oh-my-zsh/custom/plugins/frontend-search +``` + +After this, restart your terminal and frontend-search plugin is configurated in you CLI. + +```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>` + + +## 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` + +## Author + +**Wilson Mendes (willmendesneto)** ++ <https://twitter.com/willmendesneto> ++ <http://github.com/willmendesneto> + +New features comming soon. diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh new file mode 100644 index 000000000..38b1a80ea --- /dev/null +++ b/plugins/frontend-search/frontend-search.plugin.zsh @@ -0,0 +1,151 @@ +# frontend from terminal + +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 + 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)' ]]; + 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 "" + + 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" ;; + *) echo "INVALID PARAM!" + return ;; + esac + + echo "$url" + + $open_cmd "$url" + +} + +# javascript +alias jquery='frontend jquery' +alias mdn='frontend mdn' + +# pre processors frameworks +alias compass='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' From 89a5075528f5e36a442330f13f89a0782f1c555d Mon Sep 17 00:00:00 2001 From: Fenhl <fenhl@fenhl.net> Date: Wed, 12 Feb 2014 17:23:29 +0000 Subject: [PATCH 077/488] Add pip3 completion support to pip plugin --- plugins/pip/_pip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/pip/_pip b/plugins/pip/_pip index 9892dd19c..bf0df3e41 100644 --- a/plugins/pip/_pip +++ b/plugins/pip/_pip @@ -1,4 +1,4 @@ -#compdef pip +#compdef pip pip3 pip-3.2 pip-3.3 pip-3.4 #autoload # pip zsh completion, based on homebrew completion From 82d557a84e26ea79a3ecc5a8e975890c23099a00 Mon Sep 17 00:00:00 2001 From: Fenhl <fenhl@fenhl.net> Date: Wed, 11 Jun 2014 19:31:24 +0000 Subject: [PATCH 078/488] Add pip2 and pip-2.7 support to pip plugin --- plugins/pip/_pip | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/pip/_pip b/plugins/pip/_pip index bf0df3e41..cb155e5f4 100644 --- a/plugins/pip/_pip +++ b/plugins/pip/_pip @@ -1,4 +1,4 @@ -#compdef pip pip3 pip-3.2 pip-3.3 pip-3.4 +#compdef pip pip2 pip-2.7 pip3 pip-3.2 pip-3.3 pip-3.4 #autoload # pip zsh completion, based on homebrew completion From 340da08b9ad92654e5e9bb45a1aedc8645f78b74 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Wed, 16 Apr 2014 20:23:01 +0200 Subject: [PATCH 079/488] Add missing quotes to within-bundler-project function --- plugins/bundler/bundler.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 8571eeda3..d70e8d4da 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -40,8 +40,8 @@ _bundler-installed() { } _within-bundled-project() { - local check_dir=$PWD - while [ $check_dir != "/" ]; do + local check_dir="$PWD" + while [ "$check_dir" != "/" ]; do [ -f "$check_dir/Gemfile" ] && return check_dir="$(dirname $check_dir)" done From 49161e78472b484015c2080f7a724e95d42b4987 Mon Sep 17 00:00:00 2001 From: "Mikhail S. Pobolovets" <styx.mp@gmail.com> Date: Sun, 2 Feb 2014 13:24:35 +0300 Subject: [PATCH 080/488] Add missing `command` wrapper for git Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com> --- lib/git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index df7722721..883bba25c 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -1,6 +1,6 @@ # get the name of the branch we are on function git_prompt_info() { - if [[ "$(git config --get oh-my-zsh.hide-status)" != "1" ]]; then + if [[ "$(command git config --get oh-my-zsh.hide-status)" != "1" ]]; then ref=$(command git symbolic-ref HEAD 2> /dev/null) || \ ref=$(command git rev-parse --short HEAD 2> /dev/null) || return 0 echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX" From c5d9fc996819488801864407ad1b7624acf3c26c Mon Sep 17 00:00:00 2001 From: Albert Krewinkel <tarleb@moltkeplatz.de> Date: Tue, 24 Jun 2014 13:01:41 +0200 Subject: [PATCH 081/488] git_prompt_info: ignore git-config errors Merged from #2906 The function `git_prompt_info` calls `git config` for its stdout output, but doesn't handle the stderr output. This can lead to problems, e.g. if the git config file is unreadable for some reason (permissions etc). This fixes the issue by simply ignoring the stderr output. --- lib/git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index 883bba25c..b0e73bf3a 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -1,6 +1,6 @@ # get the name of the branch we are on function git_prompt_info() { - if [[ "$(command git config --get oh-my-zsh.hide-status)" != "1" ]]; then + if [[ "$(command git config --get oh-my-zsh.hide-status 2>/dev/null)" != "1" ]]; then ref=$(command git symbolic-ref HEAD 2> /dev/null) || \ ref=$(command git rev-parse --short HEAD 2> /dev/null) || return 0 echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(parse_git_dirty)$ZSH_THEME_GIT_PROMPT_SUFFIX" From f2b81e2977c264713a2a0f6971c8f312f7560b52 Mon Sep 17 00:00:00 2001 From: Helge Rausch <helge@rausch.io> Date: Mon, 16 Jun 2014 16:18:22 +0200 Subject: [PATCH 082/488] Add spring to bundled commands --- plugins/bundler/bundler.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index d70e8d4da..20931dcef 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -7,7 +7,7 @@ alias bi="bundle_install" # The following is based on https://github.com/gma/bundler-exec -bundled_commands=(annotate berks cap capify cucumber foodcritic foreman guard irb jekyll kitchen knife middleman nanoc puma rackup rainbows rake rspec ruby shotgun spec spin spork strainer tailor taps thin thor unicorn unicorn_rails) +bundled_commands=(annotate berks cap capify cucumber foodcritic foreman guard irb jekyll kitchen knife middleman nanoc puma rackup rainbows rake rspec ruby shotgun spec spin spork spring strainer tailor taps thin thor unicorn unicorn_rails) # Remove $UNBUNDLED_COMMANDS from the bundled_commands list for cmd in $UNBUNDLED_COMMANDS; do From bc2e3ff15a55fd21c6eabd502981e035dd5629c1 Mon Sep 17 00:00:00 2001 From: Peter Butkovic <butkovic@gmail.com> Date: Tue, 24 Jun 2014 16:26:12 +0200 Subject: [PATCH 083/488] added useful mvn aliases --- plugins/mvn/mvn.plugin.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh index ed7968534..2b7683078 100644 --- a/plugins/mvn/mvn.plugin.zsh +++ b/plugins/mvn/mvn.plugin.zsh @@ -44,19 +44,22 @@ mvn-color() # aliases alias mvncie='mvn clean install eclipse:eclipse' alias mvnci='mvn clean install' +alias mvncist='mvn clean install -DskipTests' alias mvne='mvn eclipse:eclipse' alias mvnce='mvn clean eclipse:clean eclipse:eclipse' alias mvnd='mvn deploy' alias mvnp='mvn package' alias mvnc='mvn clean' alias mvncom='mvn compile' +alias mvnct='mvn clean test' alias mvnt='mvn test' alias mvnag='mvn archetype:generate' alias mvn-updates='mvn versions:display-dependency-updates' alias mvntc7='mvn tomcat7:run' alias mvntc='mvn tomcat:run' alias mvnjetty='mvn jetty:run' - +alias mvndt='mvn dependency:tree' +alias mvns='mvn site' function listMavenCompletions { reply=( From 75c02dd53e65357658f08bafaec99cc4b15a55ec Mon Sep 17 00:00:00 2001 From: Jannik Zschiesche <jz@becklyn.com> Date: Fri, 23 May 2014 10:52:37 +0200 Subject: [PATCH 084/488] Plugin jump: autocompletion for numbers and dots This change fixes the autocompletion for marks which contain numbers or dots. Fixes #2578 `\d` in sed regular expressions doesn't work (see http://stackoverflow.com/questions/14671293/why-does-d-doesnt-work-in-regular-expression-in-sed) --- plugins/jump/jump.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh index 5096879d8..1b23b5d42 100644 --- a/plugins/jump/jump.plugin.zsh +++ b/plugins/jump/jump.plugin.zsh @@ -39,7 +39,7 @@ marks() { _completemarks() { if [[ $(ls "${MARKPATH}" | wc -l) -gt 1 ]]; then - reply=($(ls $MARKPATH/**/*(-) | grep : | sed -E 's/(.*)\/([_\da-zA-Z\-]*):$/\2/g')) + reply=($(ls $MARKPATH/**/*(-) | grep : | sed -E 's/(.*)\/([_a-zA-Z0-9\.\-]*):$/\2/g')) else if readlink -e "${MARKPATH}"/* &>/dev/null; then reply=($(ls "${MARKPATH}")) From dbca185b05b79cdc5308936415602d81fb444821 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Arandi=20L=C3=B3pez?= <arandilopez.93@gmail.com> Date: Sat, 21 Jun 2014 20:29:05 -0500 Subject: [PATCH 085/488] Add /usr/bin/subl path for who has linked sublime text there --- plugins/sublime/sublime.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh index a2042343a..438f386fb 100644 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -7,6 +7,7 @@ if [[ $('uname') == 'Linux' ]]; then "/opt/sublime_text/sublime_text" "/usr/bin/sublime_text" "/usr/local/bin/sublime_text" + "/usr/bin/subl" ) for _sublime_path in $_sublime_linux_paths; do if [[ -a $_sublime_path ]]; then From ce9ec85c63412036163781d3501e9ed74432d391 Mon Sep 17 00:00:00 2001 From: Rob Loach <robloach@gmail.com> Date: Sun, 1 Jun 2014 19:28:42 -0400 Subject: [PATCH 086/488] Add Composer's global binaries to PATH --- plugins/composer/composer.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh index 9975aaca4..86f2ca4df 100644 --- a/plugins/composer/composer.plugin.zsh +++ b/plugins/composer/composer.plugin.zsh @@ -46,3 +46,6 @@ alias cdu='composer dump-autoload' # install composer in the current directory alias cget='curl -s https://getcomposer.org/installer | php' + +# Add Composer's global binaries to PATH +export PATH=$PATH:~/.composer/vendor/bin From 08632bb1780d51f6748b5c09ef5232862313f78f Mon Sep 17 00:00:00 2001 From: fjcapdevila <fjcapdevila@gmail.com> Date: Mon, 2 Jun 2014 12:14:57 -0300 Subject: [PATCH 087/488] Basic support for Docker related commands. Add basic support for Docker related commands. --- plugins/vagrant/_vagrant | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant index e05b16f81..9ddfa1be7 100644 --- a/plugins/vagrant/_vagrant +++ b/plugins/vagrant/_vagrant @@ -8,6 +8,8 @@ _1st_arguments=( 'box:Box commands' 'connect:Connects to a shared, remote Vagrant environment' 'destroy:Destroys the vagrant environment' + 'docker-logs:Shows Docker logs' + 'docker-run:Run one-off commands against a Docker container' 'global-status:Reports the status of all active Vagrant environments on the system' 'halt:Halts the currently running vagrant environment' 'init:[box_name] [box_url] Initializes current folder for Vagrant usage' From 480ca2205846426c04fa46fb37e1f7246bba2b88 Mon Sep 17 00:00:00 2001 From: Helge Rausch <helge@rausch.io> Date: Mon, 16 Jun 2014 16:11:59 +0200 Subject: [PATCH 088/488] Make bundler plugin run binstubbed cmd if existing --- plugins/bundler/bundler.plugin.zsh | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 3338d78be..fc20f91b3 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -47,9 +47,17 @@ _within-bundled-project() { false } +_binstubbed() { + [ -f "./bin/${1}" ] +} + _run-with-bundler() { if _bundler-installed && _within-bundled-project; then - bundle exec $@ + if _binstubbed $1; then + bundle exec "./bin/$@" + else + bundle exec $@ + fi else $@ fi From 14ebcc83bec267859e2948f36f48cc69f5150def Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ben=20Z=C3=B6rb?= <ben@sommerlaune.com> Date: Sat, 28 Jun 2014 00:03:10 +0200 Subject: [PATCH 089/488] #2893 generalized symfony2 console directory --- plugins/symfony2/symfony2.plugin.zsh | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh index 4c07349a4..26210acfd 100644 --- a/plugins/symfony2/symfony2.plugin.zsh +++ b/plugins/symfony2/symfony2.plugin.zsh @@ -1,22 +1,22 @@ # Symfony2 basic command completion _symfony2_get_command_list () { - php app/console --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }' + php $(find . -maxdepth 2 -mindepth 1 -name 'console') --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }' } _symfony2 () { - if [ -f app/console ]; then + if [ -f $(find . -maxdepth 2 -mindepth 1 -name 'console') ]; then compadd `_symfony2_get_command_list` fi } -compdef _symfony2 app/console +compdef _symfony2 $(find . -maxdepth 2 -mindepth 1 -name 'console') compdef _symfony2 sf #Alias -alias sf='php app/console' -alias sfcl='php app/console cache:clear' -alias sfroute='php app/console router:debug' -alias sfcontainer='php app/console container:debug' -alias sfgb='php app/console generate:bundle' +alias sf='php $(find . -maxdepth 2 -mindepth 1 -name 'console') ' +alias sfcl='php $(find . -maxdepth 2 -mindepth 1 -name 'console') cache:clear' +alias sfroute='php $(find . -maxdepth 2 -mindepth 1 -name 'console') router:debug' +alias sfcontainer='php $(find . -maxdepth 2 -mindepth 1 -name 'console') container:debug' +alias sfgb='php $(find . -maxdepth 2 -mindepth 1 -name 'console') generate:bundle' From 676fb4e4203eae0f3755a729a6582eb32fe9834f Mon Sep 17 00:00:00 2001 From: Simon Buchan <simon.buchan@skilitics.com> Date: Thu, 3 Jul 2014 13:14:02 +1200 Subject: [PATCH 090/488] Fix parse_git_dirty() when status.branch is set. --- lib/git.zsh | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/lib/git.zsh b/lib/git.zsh index b0e73bf3a..8742a857a 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -10,23 +10,20 @@ function git_prompt_info() { # Checks if working tree is dirty parse_git_dirty() { - local SUBMODULE_SYNTAX='' - local GIT_STATUS='' - local CLEAN_MESSAGE='nothing to commit (working directory clean)' + local STATUS='' + local FLAGS + FLAGS=('--porcelain') if [[ "$(command git config --get oh-my-zsh.hide-status)" != "1" ]]; then if [[ $POST_1_7_2_GIT -gt 0 ]]; then - SUBMODULE_SYNTAX="--ignore-submodules=dirty" + FLAGS+='--ignore-submodules=dirty' fi if [[ "$DISABLE_UNTRACKED_FILES_DIRTY" == "true" ]]; then - GIT_STATUS=$(command git status -s ${SUBMODULE_SYNTAX} -uno 2> /dev/null | tail -n1) - else - GIT_STATUS=$(command git status -s ${SUBMODULE_SYNTAX} 2> /dev/null | tail -n1) - fi - if [[ -n $GIT_STATUS ]]; then - echo "$ZSH_THEME_GIT_PROMPT_DIRTY" - else - echo "$ZSH_THEME_GIT_PROMPT_CLEAN" + FLAGS+='--untracked-files=no' fi + STATUS=$(command git status ${FLAGS} 2> /dev/null | tail -n1) + fi + if [[ -n $STATUS ]]; then + echo "$ZSH_THEME_GIT_PROMPT_DIRTY" else echo "$ZSH_THEME_GIT_PROMPT_CLEAN" fi From 2927ce37141d52a8b4e2ca1e60d0cf0688125781 Mon Sep 17 00:00:00 2001 From: Simon Buchan <simon.buchan@skilitics.com> Date: Thu, 3 Jul 2014 14:45:49 +1200 Subject: [PATCH 091/488] Fix POST_1_7_2_GIT check for parse_git_dirty submodules. --- lib/git.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index 8742a857a..55ed94a3d 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -124,12 +124,16 @@ function git_compare_version() { INSTALLED_GIT_VERSION=(${(s/./)INSTALLED_GIT_VERSION[3]}); for i in {1..3}; do + if [[ $INSTALLED_GIT_VERSION[$i] -gt $INPUT_GIT_VERSION[$i] ]]; then + echo 1 + return 0 + fi if [[ $INSTALLED_GIT_VERSION[$i] -lt $INPUT_GIT_VERSION[$i] ]]; then echo -1 return 0 fi done - echo 1 + echo 0 } #this is unlikely to change so make it all statically assigned From 8d762e46f7c276ec81c1d0e1eda3dda250913689 Mon Sep 17 00:00:00 2001 From: kubamarchwicki <kuba@marchwicki.pl> Date: Mon, 7 Jul 2014 15:12:47 +0200 Subject: [PATCH 092/488] Spring boot autocomplete --- plugins/mvn/mvn.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh index 2b7683078..a70625fcf 100644 --- a/plugins/mvn/mvn.plugin.zsh +++ b/plugins/mvn/mvn.plugin.zsh @@ -129,6 +129,8 @@ function listMavenCompletions { tomcat6:run tomcat6:run-war tomcat6:run-war-only tomcat6:stop tomcat6:deploy tomcat6:undeploy # tomcat7 tomcat7:run tomcat7:run-war tomcat7:run-war-only tomcat7:deploy + # spring-boot + spring-boot:run spring-boot:repackage # exec exec:exec exec:java # versions From aa82bd7400d2c604987236f8f65c353143d56324 Mon Sep 17 00:00:00 2001 From: Andy Hayden <andyhayden1@gmail.com> Date: Tue, 8 Jul 2014 21:51:48 -0700 Subject: [PATCH 093/488] terminal party show exit status with color --- themes/terminalparty.zsh-theme | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/themes/terminalparty.zsh-theme b/themes/terminalparty.zsh-theme index 216ce37eb..cd7370bba 100644 --- a/themes/terminalparty.zsh-theme +++ b/themes/terminalparty.zsh-theme @@ -1,4 +1,4 @@ -PROMPT='%{$fg[green]%} %% ' +PROMPT='%(?,%{$fg[green]%},%{$fg[red]%}) %% ' # RPS1='%{$fg[blue]%}%~%{$reset_color%} ' RPS1='%{$fg[white]%}%2~$(git_prompt_info) %{$fg_bold[blue]%}%m%{$reset_color%}' @@ -6,4 +6,3 @@ ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[yellow]%}(" ZSH_THEME_GIT_PROMPT_SUFFIX=")%{$reset_color%}" ZSH_THEME_GIT_PROMPT_CLEAN="" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%} ⚡%{$fg[yellow]%}" - From 5e328e3a9c0784521ae4170f7958183c352bae83 Mon Sep 17 00:00:00 2001 From: Moinak Ghosh <moinakg@gmail.com> Date: Fri, 11 Jul 2014 18:41:49 +0530 Subject: [PATCH 094/488] Solaris portability tweaks. --- lib/completion.zsh | 7 ++++++- oh-my-zsh.sh | 1 + plugins/colored-man/colored-man.plugin.zsh | 21 +++++++++++++++++++++ tools/check_for_upgrade.sh | 8 +++++++- 4 files changed, 35 insertions(+), 2 deletions(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index fa1d97f48..faea36118 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -25,7 +25,12 @@ bindkey -M menuselect '^o' accept-and-infer-next-history zstyle ':completion:*:*:*:*:*' menu select zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' -zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm -w -w" +if [ "$PLAT" = "SunOS" ] +then + zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm" +else + zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm -w -w" +fi # disable named-directories autocompletion zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index c217b91bb..4683c2bc0 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -1,3 +1,4 @@ +PLAT=`uname -s` # Check for updates on initial load... if [ "$DISABLE_AUTO_UPDATE" != "true" ]; then /usr/bin/env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh -f $ZSH/tools/check_for_upgrade.sh diff --git a/plugins/colored-man/colored-man.plugin.zsh b/plugins/colored-man/colored-man.plugin.zsh index 56056284a..4956f4346 100644 --- a/plugins/colored-man/colored-man.plugin.zsh +++ b/plugins/colored-man/colored-man.plugin.zsh @@ -1,3 +1,21 @@ +if [ "${PLAT}" = "SunOS" ] +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") \ @@ -7,5 +25,8 @@ man() { 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/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 8b8ecae03..1aba9a272 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -1,7 +1,13 @@ #!/bin/sh +PLAT=`uname -s` function _current_epoch() { - echo $(($(date +%s) / 60 / 60 / 24)) + if [ "$PLAT" = "SunOS" ] + then + echo $(($(perl -e 'print time') / 60 / 60 / 24)) + else + echo $(($(date +%s) / 60 / 60 / 24)) + fi } function _update_zsh_update() { From 6b3a723c370e9867feb68f13f5bbb7adfd000e63 Mon Sep 17 00:00:00 2001 From: Josh Comer <jcomer@liveops.com> Date: Mon, 14 Jul 2014 16:41:57 -0700 Subject: [PATCH 095/488] Fix typo in docker plugin --- plugins/docker/_docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/docker/_docker b/plugins/docker/_docker index c291037a3..28568a6e5 100644 --- a/plugins/docker/_docker +++ b/plugins/docker/_docker @@ -214,7 +214,7 @@ __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]' + '(-i,--interactive=)'{-i,--interactive=}'[Attach container''s stdin]' __docker_containers } From 392af393e81a4f2bc3405bfd9e1f98675f0bd886 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ben=20Z=C3=B6rb?= <ben@sommerlaune.com> Date: Tue, 15 Jul 2014 15:13:13 +0200 Subject: [PATCH 096/488] added cache:warmup alias --- plugins/symfony2/symfony2.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh index 26210acfd..1d5177e6d 100644 --- a/plugins/symfony2/symfony2.plugin.zsh +++ b/plugins/symfony2/symfony2.plugin.zsh @@ -16,6 +16,7 @@ compdef _symfony2 sf #Alias alias sf='php $(find . -maxdepth 2 -mindepth 1 -name 'console') ' alias sfcl='php $(find . -maxdepth 2 -mindepth 1 -name 'console') cache:clear' +alias sfcw='php $(find . -maxdepth 2 -mindepth 1 -name 'console') cache:warmup' alias sfroute='php $(find . -maxdepth 2 -mindepth 1 -name 'console') router:debug' alias sfcontainer='php $(find . -maxdepth 2 -mindepth 1 -name 'console') container:debug' alias sfgb='php $(find . -maxdepth 2 -mindepth 1 -name 'console') generate:bundle' From 6adc89131c1cf9fe79c3eaa3df1cd65a292bfc4d Mon Sep 17 00:00:00 2001 From: Simon Frost <sfrost007@gmail.com> Date: Tue, 15 Jul 2014 14:20:39 +0100 Subject: [PATCH 097/488] Fix typo in warp directory plugin --- plugins/wd/wd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wd/wd.sh b/plugins/wd/wd.sh index 96a3426fc..9ebad6808 100755 --- a/plugins/wd/wd.sh +++ b/plugins/wd/wd.sh @@ -58,7 +58,7 @@ wd_warp() #wd_print_msg $BLUE "Warping..." cd ${points[$1]} else - wd_print_msg $RED "Unkown warp point '$1'" + wd_print_msg $RED "Unknown warp point '$1'" fi } From 9d76784b3ed85115e1830d48d91b3a08236a6538 Mon Sep 17 00:00:00 2001 From: Simon Frost <sfrost007@gmail.com> Date: Tue, 15 Jul 2014 14:22:24 +0100 Subject: [PATCH 098/488] Add support for jira-prefix configuration file --- plugins/jira/jira.plugin.zsh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index 739ee7142..3d510e430 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -29,15 +29,23 @@ open_jira_issue () { return 0 fi + if [ -f .jira-prefix ]; then + jira_prefix=$(cat .jira-prefix) + elif [ -f ~/.jira-prefix ]; then + jira_prefix=$(cat ~/.jira-prefix) + else + jira_prefix="" + fi + if [ -z "$1" ]; then echo "Opening new issue" $open_cmd "$jira_url/secure/CreateIssue!default.jspa" else echo "Opening issue #$1" if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then - $open_cmd "$jira_url/issues/$1" + $open_cmd "$jira_url/issues/$jira_prefix$1" else - $open_cmd "$jira_url/browse/$1" + $open_cmd "$jira_url/browse/$jira_prefix$1" fi fi } From d29c53cb101d6949f9d2c341e511533046568b86 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer <kriechbaumer@gmail.com> Date: Wed, 2 Jul 2014 12:22:33 +0200 Subject: [PATCH 099/488] split bundler-commands into seperate lines This makes adding, deleting and merging a lot easier. --- plugins/bundler/bundler.plugin.zsh | 37 ++++++++++++++++++++++++++---- 1 file changed, 33 insertions(+), 4 deletions(-) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index fbdbc0244..12f516f14 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -5,9 +5,39 @@ alias bo="bundle open" alias bu="bundle update" alias bi="bundle_install" -# The following is based on https://github.com/gma/bundler-exec - -bundled_commands=(annotate berks cap capify cucumber foodcritic foreman guard irb jekyll kitchen knife middleman nanoc puma rackup rainbows rake rspec ruby shotgun spec spin spork spring strainer tailor taps thin thor unicorn unicorn_rails) +bundled_commands=( + annotate + berks + cap + capify + cucumber + foodcritic + foreman + guard + irb + jekyll + kitchen + knife + middleman + nanoc + puma + rackup + rainbows + rake + rspec + ruby + shotgun + spec + spin + spork + strainer + tailor + taps + thin + thor + unicorn + unicorn_rails +) # Remove $UNBUNDLED_COMMANDS from the bundled_commands list for cmd in $UNBUNDLED_COMMANDS; do @@ -74,4 +104,3 @@ for cmd in $bundled_commands; do compdef _$cmd bundled_$cmd=$cmd fi done - From c4eec0b1349168a0c23819d153401ce7e802260c Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer <kriechbaumer@gmail.com> Date: Wed, 2 Jul 2014 20:35:49 +0200 Subject: [PATCH 100/488] add sidekiq to bundler-commands closes #2779 --- plugins/bundler/bundler.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 12f516f14..57fb20bea 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -27,6 +27,7 @@ bundled_commands=( rspec ruby shotgun + sidekiq spec spin spork From a22e0256a35e6e3378f253090029abfaf917a81c Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer <kriechbaumer@gmail.com> Date: Wed, 2 Jul 2014 20:36:16 +0200 Subject: [PATCH 101/488] remove foreman from bundler-commands closes #1825 --- plugins/bundler/bundler.plugin.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 57fb20bea..0c981c924 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -12,7 +12,6 @@ bundled_commands=( capify cucumber foodcritic - foreman guard irb jekyll From f5e69c6cab20f1ac6dbb67f0cd7b49d079e0a76c Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer <kriechbaumer@gmail.com> Date: Wed, 2 Jul 2014 20:36:33 +0200 Subject: [PATCH 102/488] remove spin from bundler-commands closes #1817 --- plugins/bundler/bundler.plugin.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 0c981c924..22f59db4f 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -28,7 +28,6 @@ bundled_commands=( shotgun sidekiq spec - spin spork strainer tailor From fdbfd410907c30c28184a339323fd5703cbd2309 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer <kriechbaumer@gmail.com> Date: Fri, 4 Jul 2014 14:29:16 +0200 Subject: [PATCH 103/488] remove ruby from bundler-commands related to #1587 closes #2200 closes #2561 --- plugins/bundler/bundler.plugin.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 22f59db4f..cd54ad6fa 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -24,7 +24,6 @@ bundled_commands=( rainbows rake rspec - ruby shotgun sidekiq spec From f8ea9270ebcb012aee8e0691e5ab2fc700e56492 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer <kriechbaumer@gmail.com> Date: Fri, 4 Jul 2014 14:33:24 +0200 Subject: [PATCH 104/488] remove berkshelf from bundler-commands fixes #2076 --- plugins/bundler/bundler.plugin.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index cd54ad6fa..fd65ad568 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -7,7 +7,6 @@ alias bi="bundle_install" bundled_commands=( annotate - berks cap capify cucumber From 20c84eaafc0bddc8584902898c245dbe1a7b0f8f Mon Sep 17 00:00:00 2001 From: toooooooby <toby.net.info.mail+git@gmail.com> Date: Wed, 15 May 2013 02:15:13 +0900 Subject: [PATCH 105/488] Add 'outdated' and 'platform' completions to bundler plugin --- plugins/bundler/_bundler | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/plugins/bundler/_bundler b/plugins/bundler/_bundler index 2ec3a5f9c..ba647ab80 100644 --- a/plugins/bundler/_bundler +++ b/plugins/bundler/_bundler @@ -18,11 +18,13 @@ case $state in "check[Determine whether the requirements for your application are installed]" \ "list[Show all of the gems in the current bundle]" \ "show[Show the source location of a particular gem in the bundle]" \ + "outdated[Show all of the outdated gems in the current bundle]" \ "console[Start an IRB session in the context of the current bundle]" \ "open[Open an installed gem in the editor]" \ "viz[Generate a visual representation of your dependencies]" \ "init[Generate a simple Gemfile, placed in the current directory]" \ "gem[Create a simple gem, suitable for development with bundler]" \ + "platform[Displays platform compatibility information]" \ "clean[Cleans up unused gems in your bundler directory]" \ "help[Describe available tasks or one specific task]" ret=0 @@ -39,11 +41,13 @@ case $state in 'check' \ 'list' \ 'show' \ + 'outdated' \ 'console' \ 'open' \ 'viz' \ 'init' \ 'gem' \ + 'platform' \ 'help' && ret=0 ;; install) @@ -71,6 +75,15 @@ case $state in '(--verbose)--verbose[Enable verbose output mode]' ret=0 ;; + outdated) + _arguments \ + '(--pre)--pre[Check for newer pre-release gems]' \ + '(--source)--source[Check against a specific source]' \ + '(--local)--local[Do not attempt to fetch gems remotely and use the gem cache instead]' \ + '(--no-color)--no-color[Disable colorization in output]' \ + '(--verbose)--verbose[Enable verbose output mode]' + ret=0 + ;; (open|show) _gems=( $(bundle show 2> /dev/null | sed -e '/^ \*/!d; s/^ \* \([^ ]*\) .*/\1/') ) if [[ $_gems != "" ]]; then From cfc98d3f8c234b48d34961ce18274ad365ebb97b Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer <kriechbaumer@gmail.com> Date: Fri, 4 Jul 2014 14:56:44 +0200 Subject: [PATCH 106/488] remove double bundle exec --- plugins/bundler/bundler.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index fd65ad568..254e0a364 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -82,7 +82,7 @@ _binstubbed() { _run-with-bundler() { if _bundler-installed && _within-bundled-project; then if _binstubbed $1; then - bundle exec "./bin/$@" + ./bin/$@ else bundle exec $@ fi From 11f0d273b5849275909d5fcf37e4771e0449f897 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer <kriechbaumer@gmail.com> Date: Fri, 4 Jul 2014 15:16:29 +0200 Subject: [PATCH 107/488] add spring to bundler-commands --- plugins/bundler/bundler.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 254e0a364..fe098d854 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -27,6 +27,7 @@ bundled_commands=( sidekiq spec spork + spring strainer tailor taps From b007fee187bb111c13c0c95b39763b28dc3f8ca0 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer <kriechbaumer@gmail.com> Date: Fri, 4 Jul 2014 15:17:02 +0200 Subject: [PATCH 108/488] add pry to bundler-commands --- plugins/bundler/bundler.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index fe098d854..4f9eea922 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -18,6 +18,7 @@ bundled_commands=( knife middleman nanoc + pry puma rackup rainbows From 34bc91e79d8cbb7b889402746770f1671d9b5872 Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer <kriechbaumer@gmail.com> Date: Mon, 7 Jul 2014 14:23:37 +0200 Subject: [PATCH 109/488] added Bundler readme file --- plugins/bundler/README.md | 49 ++++++++++++++++++++++++++++++ plugins/bundler/bundler.plugin.zsh | 2 +- 2 files changed, 50 insertions(+), 1 deletion(-) create mode 100644 plugins/bundler/README.md diff --git a/plugins/bundler/README.md b/plugins/bundler/README.md new file mode 100644 index 000000000..56f0c7176 --- /dev/null +++ b/plugins/bundler/README.md @@ -0,0 +1,49 @@ +# Bundler + +- adds completion for basic bundler commands +- adds short aliases for common bundler commands + - `be` aliased to `bundle exec` + - `bl` aliased to `bundle list` + - `bp` aliased to `bundle package` + - `bo` aliased to `bundle open` + - `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: + - looks for a binstub under `./bin/` and executes it (if present) + - calls `bundle exec <gem executable>` otherwise + +For a full list of *common gems* being wrapped by default please look at the `bundler.plugin.zsh` file. + +## Configuration + +Please use the exact name of the executable and not the gem name. + +### Add additional gems to be wrapped + +Add this before the plugin-list in your `.zshrc`: +```sh +BUNDLED_COMMANDS=(rubocop) +plugins=(... bundler ...) +``` +This will add the wrapper for the `rubocop` gem (i.e. the executable). + + +### Exclude gems from being wrapped + +Add this before the plugin-list in your `.zshrc`: +```sh +UNBUNDLED_COMMANDS=(foreman spin) +plugins=(... bundler ...) +``` +This will exclude the `foreman` and `spin` gems (i.e. their executable) from being wrapped. + +## Excluded gems + +These gems should not be called with `bundle exec`. Please see the Issues on GitHub for clarification. + +`berks` +`foreman` +`mailcatcher` +`rails` +`ruby` +`spin` diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 4f9eea922..9c920aa1f 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -100,6 +100,6 @@ for cmd in $bundled_commands; do alias $cmd=bundled_$cmd if which _$cmd > /dev/null 2>&1; then - compdef _$cmd bundled_$cmd=$cmd + compdef _$cmd bundled_$cmd=$cmd fi done From 4b997429b3785aefa929732d7dbf431e7884bc4d Mon Sep 17 00:00:00 2001 From: Thomas Kriechbaumer <kriechbaumer@gmail.com> Date: Mon, 7 Jul 2014 20:07:02 +0200 Subject: [PATCH 110/488] add BUNDLED_COMMANDS functionality to bundler plugin --- plugins/bundler/bundler.plugin.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 9c920aa1f..617dcde71 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -43,6 +43,11 @@ for cmd in $UNBUNDLED_COMMANDS; do bundled_commands=(${bundled_commands#$cmd}); done +# Add $BUNDLED_COMMANDS to the bundled_commands list +for cmd in $BUNDLED_COMMANDS; do + bundled_commands+=($cmd); +done + ## Functions bundle_install() { From 346f6b7d24d6021efa8c5167088f98c10f00ad3f Mon Sep 17 00:00:00 2001 From: Markus Faerevaag <mafaer@gmail.com> Date: Tue, 15 Jul 2014 17:42:30 +0200 Subject: [PATCH 111/488] [wd] v0.3.1: Improved completion and bug fixes --- plugins/wd/README.md | 28 +++---- plugins/wd/_wd.sh | 15 +--- plugins/wd/wd.plugin.zsh | 4 +- plugins/wd/wd.sh | 159 +++++++++++++++++++++++---------------- 4 files changed, 114 insertions(+), 92 deletions(-) diff --git a/plugins/wd/README.md b/plugins/wd/README.md index f9f4e7ac1..bc0ebe334 100644 --- a/plugins/wd/README.md +++ b/plugins/wd/README.md @@ -2,37 +2,39 @@ **Maintainer:** [mfaerevaag](https://github.com/mfaerevaag) -`wd` (warp directory) lets you jump to custom directories in zsh, without using cd. Why? Because cd seems ineffecient when the folder is frequently visited or has a long path. [Source](https://github.com/mfaerevaag/wd) +`wd` (*warp directory*) lets you jump to custom directories in zsh, without using `cd`. Why? Because `cd` seems ineffecient when the folder is frequently visited or has a long path. [Source](https://github.com/mfaerevaag/wd) ### Usage * Add warp point to current working directory: - wd add test + $ wd add foo If a warp point with the same name exists, use `add!` to overwrite it. - * From an other directory, warp to test with: + Note, a warp point cannot contain colons, or only consist of only spaces and dots. The first will conflict in how `wd` stores the warp points, and the second will conflict other features, as below. - wd test + * From an other directory (not necessarily), warp to `foo` with: - * You can warp back to previous directory, and so on, with the puncticulation syntax: + $ wd foo - wd .. - wd ... + * You can warp back to previous directory, and so on, with this dot syntax: + + $ wd .. + $ wd ... This is a wrapper for the zsh `dirs` function. * Remove warp point test point: - wd rm test - - * List warp points to current directory (stored in `~/.warprc`): - - wd show + $ wd rm foo * List all warp points (stored in `~/.warprc`): - wd ls + $ wd ls + + * List warp points to current directory + + $ wd show * Print usage with no opts or the `help` argument. diff --git a/plugins/wd/_wd.sh b/plugins/wd/_wd.sh index 29df63520..0b03d8fff 100644 --- a/plugins/wd/_wd.sh +++ b/plugins/wd/_wd.sh @@ -5,23 +5,16 @@ zstyle ':completion::complete:wd:*:commands' group-name commands zstyle ':completion::complete:wd:*:warp_points' group-name warp_points zstyle ':completion::complete:wd::' list-grouped -# Call `_wd()` when when trying to complete the command `wd` - zmodload zsh/mapfile + function _wd() { - local ret=1 local CONFIG=$HOME/.warprc - - # Stolen from - # http://stackoverflow.com/questions/9000698/completion-when-program-has-sub-commands - - # local curcontext="$curcontext" state line - # typeset -A opt_args + local ret=1 local -a commands local -a warp_points - warp_points=( "${(f)mapfile[$CONFIG]}" ) - # LIST="${mapfile[$FNAME]}" # Not required unless stuff uses it + + warp_points=( "${(f)mapfile[$CONFIG]//$HOME/~}" ) commands=( 'add:Adds the current working directory to your warp points' diff --git a/plugins/wd/wd.plugin.zsh b/plugins/wd/wd.plugin.zsh index 9800335fc..c0559293d 100644 --- a/plugins/wd/wd.plugin.zsh +++ b/plugins/wd/wd.plugin.zsh @@ -1,7 +1,7 @@ #!/bin/zsh -# WARP -# ==== +# WARP DIRECTORY +# ============== # oh-my-zsh plugin # # @github.com/mfaerevaag/wd diff --git a/plugins/wd/wd.sh b/plugins/wd/wd.sh index 9ebad6808..dfb9ad89a 100755 --- a/plugins/wd/wd.sh +++ b/plugins/wd/wd.sh @@ -1,7 +1,7 @@ #!/bin/zsh -# WARP -# ==== +# WARP DIRECTORY +# ============== # Jump to custom directories in terminal # because `cd` takes too long... # @@ -9,26 +9,28 @@ ## variables -CONFIG=$HOME/.warprc +readonly CONFIG=$HOME/.warprc -## colors -BLUE="\033[96m" -GREEN="\033[92m" -YELLOW="\033[93m" -RED="\033[91m" -NOC="\033[m" +# colors +readonly BLUE="\033[96m" +readonly GREEN="\033[92m" +readonly YELLOW="\033[93m" +readonly RED="\033[91m" +readonly NOC="\033[m" +## init + # check if config file exists -if [[ ! -a $CONFIG ]] +if [ ! -e $CONFIG ] then - # if not: create config file - touch $CONFIG + # if not, create config file + touch $CONFIG fi -## load warp points +# load warp points typeset -A points -while read line +while read -r line do arr=(${(s,:,)line}) key=${arr[1]} @@ -39,72 +41,78 @@ done < $CONFIG ## functions -# prepended wd_ to not conflict with your environment (no sub shell) wd_warp() { - if [[ $1 =~ "^\.+$" ]] + local point=$1 + + if [[ $point =~ "^\.+$" ]] then - if [[ $#1 < 2 ]] + if [ $#1 < 2 ] then wd_print_msg $YELLOW "Warping to current directory?" else (( n = $#1 - 1 )) - #wd_print_msg $BLUE "Warping..." cd -$n > /dev/null fi - elif [[ ${points[$1]} != "" ]] + elif [[ ${points[$point]} != "" ]] then - #wd_print_msg $BLUE "Warping..." - cd ${points[$1]} + cd ${points[$point]} else - wd_print_msg $RED "Unknown warp point '$1'" + wd_print_msg $RED "Unknown warp point '${point}'" fi } wd_add() { - if [[ $2 =~ "^\.+$" || $2 =~ "^\s*$" ]] + local force=$1 + local point=$2 + + if [[ $point =~ "^[\.]+$" ]] then - wd_print_msg $RED "Illegal warp point (see README)." - elif [[ ${points[$2]} == "" ]] || $1 + wd_print_msg $RED "Warp point cannot be just dots" + elif [[ $point =~ "(\s|\ )+" ]] then - wd_remove $2 > /dev/null - print "$2:$PWD" >> $CONFIG + wd_print_msg $RED "Warp point should not contain whitespace" + elif [[ $point == *:* ]] + then + wd_print_msg $RED "Warp point cannot contain colons" + elif [[ $point == "" ]] + then + wd_print_msg $RED "Warp point cannot be empty" + elif [[ ${points[$2]} == "" ]] || $force + then + wd_remove $point > /dev/null + printf "%q:%q\n" "${point}" "${PWD}" >> $CONFIG + wd_print_msg $GREEN "Warp point added" else - wd_print_msg $YELLOW "Warp point '$2' already exists. Use 'add!' to overwrite." + wd_print_msg $YELLOW "Warp point '${point}' already exists. Use 'add!' to overwrite." fi } wd_remove() { - if [[ ${points[$1]} != "" ]] + local point=$1 + + if [[ ${points[$point]} != "" ]] then - if wd_tmp=`sed "/^$1:/d" $CONFIG` + if sed -i.bak "s,^${point}:.*$,,g" $CONFIG then - # `>!` forces overwrite - # we need this if people use `setopt NO_CLOBBER` - echo $wd_tmp >! $CONFIG wd_print_msg $GREEN "Warp point removed" else - wd_print_msg $RED "Warp point unsuccessfully removed. Sorry!" + wd_print_msg $RED "Something bad happened! Sorry." fi else wd_print_msg $RED "Warp point was not found" fi } -wd_show() -{ - wd_print_msg $BLUE "Warp points to current directory:" - wd_list_all | grep $PWD$ -} - wd_list_all() { wd_print_msg $BLUE "All warp points:" - while read line + + while IFS= read -r line do if [[ $line != "" ]] then @@ -112,38 +120,52 @@ wd_list_all() key=${arr[1]} val=${arr[2]} - print "\t" $key "\t -> \t" $val + printf "%20s -> %s\n" $key $val fi - done < $CONFIG + done <<< $(sed "s:${HOME}:~:g" $CONFIG) +} + +wd_show() +{ + local cwd=$(print $PWD | sed "s:^${HOME}:~:") + + wd_print_msg $BLUE "Warp points to current directory:" + wd_list_all | grep -e "${cwd}$" } wd_print_msg() { - if [[ $1 == "" || $2 == "" ]] + local color=$1 + local msg=$2 + + if [[ $color == "" || $msg == "" ]] then - print " $RED*$NOC Could not print message. Sorry!" + print " ${RED}*${NOC} Could not print message. Sorry!" else - print " $1*$NOC $2" + print " ${color}*${NOC} ${msg}" fi } wd_print_usage() { - print "Usage: wd [add|-a|--add] [rm|-r|--remove] [ls|-l|--list] <point>" - print "\nCommands:" - print "\t add \t Adds the current working directory to your warp points" - print "\t add! \t Overwrites existing warp point" - print "\t rm \t Removes the given warp point" - print "\t show \t Outputs warp points to current directory" - print "\t ls \t Outputs all stored warp points" - print "\t help \t Show this extremely helpful text" + cat <<- EOF +Usage: wd [add|-a|--add] [rm|-r|--remove] <point> + +Commands: + add Adds the current working directory to your warp points + add! Overwrites existing warp point + rm Removes the given warp point + show Outputs warp points to current directory + ls Outputs all stored warp points + help Show this extremely helpful text +EOF } ## run # get opts -args=`getopt -o a:r:lhs -l add:,rm:,ls,help,show -- $*` +args=$(getopt -o a:r:lhs -l add:,rm:,ls,help,show -- $*) # check if no arguments were given if [[ $? -ne 0 || $#* -eq 0 ]] @@ -151,19 +173,16 @@ then wd_print_usage # check if config file is writeable -elif [[ ! -w $CONFIG ]] +elif [ ! -w $CONFIG ] then - wd_print_msg $RED "\'$CONFIG\' is not writeable." - # do nothing => exit + # do nothing # can't run `exit`, as this would exit the executing shell - # i.e. your terminal + wd_print_msg $RED "\'$CONFIG\' is not writeable." else - #set -- $args # WTF - - for i + for o do - case "$i" + case "$o" in -a|--add|add) wd_add false $2 @@ -190,7 +209,7 @@ else break ;; *) - wd_warp $i + wd_warp $o break ;; --) @@ -200,10 +219,18 @@ else done fi - ## garbage collection # if not, next time warp will pick up variables from this run # remember, there's no sub shell -unset points + +unset wd_warp +unset wd_add +unset wd_remove +unset wd_show +unset wd_list_all +unset wd_print_msg +unset wd_print_usage + unset args +unset points unset val &> /dev/null # fixes issue #1 From bf134e9cb390c7ff464c1278782084bef2fae141 Mon Sep 17 00:00:00 2001 From: Christopher Kochan <ckochan@groupon.com> Date: Tue, 15 Jul 2014 12:37:53 -0700 Subject: [PATCH 112/488] Fix for recusion limit hit for _rake_command alias --- plugins/rails/rails.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/rails/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh index fb46cdcf0..824658e44 100644 --- a/plugins/rails/rails.plugin.zsh +++ b/plugins/rails/rails.plugin.zsh @@ -6,7 +6,7 @@ function _rails_command () { elif [ -e "script/server" ]; then ruby script/$@ else - rails $@ + command rails $@ fi } @@ -14,7 +14,7 @@ function _rake_command () { if [ -e "bin/rake" ]; then bin/rake $@ else - rake $@ + command rake $@ fi } From a6b655fae9640873c1629abe7ba25f4823f4b714 Mon Sep 17 00:00:00 2001 From: Markus Faerevaag <mf@bitblueprint.com> Date: Fri, 30 May 2014 10:21:16 +0200 Subject: [PATCH 113/488] [wd] v0.2.2: Added MIT-License --- plugins/wd/LICENSE | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 plugins/wd/LICENSE diff --git a/plugins/wd/LICENSE b/plugins/wd/LICENSE new file mode 100644 index 000000000..8caa6c6ce --- /dev/null +++ b/plugins/wd/LICENSE @@ -0,0 +1,21 @@ +The MIT License (MIT) + +Copyright (c) 2014 Markus Færevaag + +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. \ No newline at end of file From 5756ea0101dc60f5c5d3874a4a5baf58647aec9d Mon Sep 17 00:00:00 2001 From: ncanceill <nicolas.canceill@ens-cachan.org> Date: Tue, 8 Jul 2014 16:49:05 +0200 Subject: [PATCH 114/488] Revert "specify python2 in shebang" "/usr/bin/python2" does not exist on Mac OSX (see #2382), so fuck people who have "python" symlinked to "python3" This reverts commit e5ed07e2b5740346d2a32b3a47204612d8808723 --- plugins/git-prompt/gitstatus.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py index c665a9ee1..256841432 100644 --- a/plugins/git-prompt/gitstatus.py +++ b/plugins/git-prompt/gitstatus.py @@ -1,4 +1,4 @@ -#!/usr/bin/env python2 +#!/usr/bin/env python # -*- coding: UTF-8 -*- from subprocess import Popen, PIPE import re From 7478b754a1e53a6c058d7807700869474b68bb21 Mon Sep 17 00:00:00 2001 From: ncanceill <nicolas.canceill@ens-cachan.org> Date: Fri, 25 Apr 2014 00:48:37 +0200 Subject: [PATCH 115/488] make sure cache dir exists, just like log dir --- cache/.easter-egg | 4 ++++ plugins/zsh_reload/zsh_reload.plugin.zsh | 5 +++-- 2 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 cache/.easter-egg diff --git a/cache/.easter-egg b/cache/.easter-egg new file mode 100644 index 000000000..4b6164edb --- /dev/null +++ b/cache/.easter-egg @@ -0,0 +1,4 @@ +This file is only here so that Git will keep a cache directory as .gitignore is ignoring all the files within it. + +Feel free to add love notes for people here. + diff --git a/plugins/zsh_reload/zsh_reload.plugin.zsh b/plugins/zsh_reload/zsh_reload.plugin.zsh index 94945bd48..3f44b99c6 100644 --- a/plugins/zsh_reload/zsh_reload.plugin.zsh +++ b/plugins/zsh_reload/zsh_reload.plugin.zsh @@ -1,10 +1,11 @@ # reload zshrc function src() { + local cache="$ZSH/cache" autoload -U compinit zrecompile - compinit -d "$ZSH/cache/zcomp-$HOST" + compinit -d "$cache/zcomp-$HOST" - for f in ~/.zshrc "$ZSH/cache/zcomp-$HOST"; do + for f in ~/.zshrc "$cache/zcomp-$HOST"; do zrecompile -p $f && command rm -f $f.zwc.old done From 39a1e2a083872ccca63fcc9ead44834627c176cf Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20K=C3=B6stlin?= <christian.koestlin@esrlabs.com> Date: Wed, 11 Jul 2012 14:29:54 +0200 Subject: [PATCH 116/488] gem plugin: added _files to install command is useful if you want to install a local gem from the filesystem --- plugins/gem/_gem | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/gem/_gem b/plugins/gem/_gem index 25967f1e7..92feebe95 100644 --- a/plugins/gem/_gem +++ b/plugins/gem/_gem @@ -59,6 +59,8 @@ case "$words[1]" in build) _files -g "*.gemspec" ;; + install) + _files ;; list) if [[ "$state" == forms ]]; then _gem_installed From bb928b59c409feacc660a64e800ce9129c058104 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ben=20Z=C3=B6rb?= <ben@sommerlaune.com> Date: Thu, 17 Jul 2014 11:27:00 +0200 Subject: [PATCH 117/488] #2914 fixed symfony2 autocomplete --- plugins/symfony2/symfony2.plugin.zsh | 25 +++++++++++++------------ 1 file changed, 13 insertions(+), 12 deletions(-) diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh index 1d5177e6d..c8c102eee 100644 --- a/plugins/symfony2/symfony2.plugin.zsh +++ b/plugins/symfony2/symfony2.plugin.zsh @@ -1,23 +1,24 @@ # Symfony2 basic command completion +_symfony_console () { + echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console')" +} + _symfony2_get_command_list () { - php $(find . -maxdepth 2 -mindepth 1 -name 'console') --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }' + `_symfony_console` --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }' } _symfony2 () { - if [ -f $(find . -maxdepth 2 -mindepth 1 -name 'console') ]; then - compadd `_symfony2_get_command_list` - fi + compadd `_symfony2_get_command_list` } -compdef _symfony2 $(find . -maxdepth 2 -mindepth 1 -name 'console') +compdef _symfony2 '`_symfony_console`' compdef _symfony2 sf #Alias -alias sf='php $(find . -maxdepth 2 -mindepth 1 -name 'console') ' -alias sfcl='php $(find . -maxdepth 2 -mindepth 1 -name 'console') cache:clear' -alias sfcw='php $(find . -maxdepth 2 -mindepth 1 -name 'console') cache:warmup' -alias sfroute='php $(find . -maxdepth 2 -mindepth 1 -name 'console') router:debug' -alias sfcontainer='php $(find . -maxdepth 2 -mindepth 1 -name 'console') container:debug' -alias sfgb='php $(find . -maxdepth 2 -mindepth 1 -name 'console') generate:bundle' - +alias sf='`_symfony_console`' +alias sfcl='sf cache:clear' +alias sfcw='sf cache:warmup' +alias sfroute='sf router:debug' +alias sfcontainer='sf container:debug' +alias sfgb='sf generate:bundle' \ No newline at end of file From 877d55ce9213b668cf206c49ba3e38ab3b8ef7fd Mon Sep 17 00:00:00 2001 From: Nicolas Brousse <nicolas-brousse@users.noreply.github.com> Date: Sun, 20 Jul 2014 13:33:26 +0200 Subject: [PATCH 118/488] Update brew.plugin.zsh Add `brew cleanup` command to `bubu` alias --- plugins/brew/brew.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/brew/brew.plugin.zsh b/plugins/brew/brew.plugin.zsh index f9497aefb..42fb80c9a 100644 --- a/plugins/brew/brew.plugin.zsh +++ b/plugins/brew/brew.plugin.zsh @@ -1,2 +1,2 @@ alias brews='brew list -1' -alias bubu="brew update && brew upgrade" +alias bubu="brew update && brew upgrade && brew cleanup" From 73212ded4ee70c010a92eb7a126daa20c7453cba Mon Sep 17 00:00:00 2001 From: Elliott Williams <e@elliottwillia.ms> Date: Mon, 21 Jul 2014 11:15:09 -0400 Subject: [PATCH 119/488] Fix osx function: "not valid in this context" I have been continually having problems with the "trash" function provided by the osx plugin, getting this error: trash:local:2: not valid in this context: It seems like adding quotes around the assignment in [osx.plugin.zsh#L142](https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/osx/osx.plugin.zsh#L142) fixed my problem. Does this look good to you? Thanks! --- plugins/osx/osx.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index a63f0ee05..2eea0d8ef 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -139,7 +139,7 @@ function man-preview() { function trash() { local trash_dir="${HOME}/.Trash" - local temp_ifs=$IFS + local temp_ifs="$IFS" IFS=$'\n' for item in "$@"; do if [[ -e "$item" ]]; then From 0e00f0b0342cc088c1c3d4163787efb8433b8ea1 Mon Sep 17 00:00:00 2001 From: Shammel Lee <shammel.lee@gmail.com> Date: Tue, 22 Jul 2014 13:25:04 -0400 Subject: [PATCH 120/488] typo line 1: of => or --- plugins/forklift/forklift.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/forklift/forklift.plugin.zsh b/plugins/forklift/forklift.plugin.zsh index b0e60a434..692ca5790 100644 --- a/plugins/forklift/forklift.plugin.zsh +++ b/plugins/forklift/forklift.plugin.zsh @@ -1,4 +1,4 @@ -# Open folder in ForkLift.app of ForkLift2.app from console +# Open folder in ForkLift.app or ForkLift2.app from console # Author: Adam Strzelecki nanoant.com, modified by Bodo Tasche bitboxer.de # Updated to support ForkLift2 by Johan Kaving # From 00b21d5ac322178b9b9e397b0b6178a3d7f4e9ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ho=CC=88ltje?= <choltje@us.ibm.com> Date: Wed, 23 Apr 2014 09:41:09 -0400 Subject: [PATCH 121/488] Trust but verify 'scutil' to return ComputerName Apparently, it is possible to set up a Mac such that `scutil --get ComputerName` hasn't been set. This change checks if that fails and falls back to the original mechanism. Closes #2155 Closes #2183 --- oh-my-zsh.sh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index c217b91bb..8ce29ff38 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -38,9 +38,9 @@ for plugin ($plugins); do done # Figure out the SHORT hostname -if [ -n "$commands[scutil]" ]; then - # OS X - SHORT_HOST=$(scutil --get ComputerName) +if [[ "$OSTYPE" = darwin* ]]; then + # OS X's $HOST changes with dhcp, etc. Use ComputerName if possible. + SHORT_HOST=$(scutil --get ComputerName 2>/dev/null) || SHORT_HOST=${HOST/.*/} else SHORT_HOST=${HOST/.*/} fi From 63bae2aba9c43a70bbb374fc46e287d7bc46cc54 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christian=20Ho=CC=88ltje?= <choltje@us.ibm.com> Date: Wed, 23 Apr 2014 10:13:26 -0400 Subject: [PATCH 122/488] Use $OSTYPE instead of uname to speed things up The $OSTYPE variable is set at ZSH compile time and can be safely used to determine the OS of the system. e.g. darwin (os x) --- plugins/battery/battery.plugin.zsh | 2 +- plugins/bundler/bundler.plugin.zsh | 2 +- plugins/jira/jira.plugin.zsh | 2 +- plugins/node/node.plugin.zsh | 2 +- plugins/rake-fast/rake-fast.plugin.zsh | 2 +- plugins/sublime/sublime.plugin.zsh | 2 +- plugins/web-search/web-search.plugin.zsh | 2 +- 7 files changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/battery/battery.plugin.zsh b/plugins/battery/battery.plugin.zsh index 32dd4b624..014bb15dd 100644 --- a/plugins/battery/battery.plugin.zsh +++ b/plugins/battery/battery.plugin.zsh @@ -8,7 +8,7 @@ # Modified to add support for Apple Mac # ########################################### -if [[ $(uname) == "Darwin" ]] ; then +if [[ "$OSTYPE" = darwin* ]] ; then function battery_pct() { local smart_battery_status="$(ioreg -rc "AppleSmartBattery")" diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index 617dcde71..ba3d3f623 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -54,7 +54,7 @@ bundle_install() { if _bundler-installed && _within-bundled-project; then local bundler_version=`bundle version | cut -d' ' -f3` if [[ $bundler_version > '1.4.0' || $bundler_version = '1.4.0' ]]; then - if [[ "$(uname)" == 'Darwin' ]] + if [[ "$OSTYPE" = darwin* ]] then local cores_num="$(sysctl hw.ncpu | awk '{print $2}')" else diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index 3d510e430..e4881151e 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -12,7 +12,7 @@ # jira ABC-123 # Opens an existing issue open_jira_issue () { local open_cmd - if [[ $(uname -s) == 'Darwin' ]]; then + if [[ "$OSTYPE" = darwin* ]]; then open_cmd='open' else open_cmd='xdg-open' diff --git a/plugins/node/node.plugin.zsh b/plugins/node/node.plugin.zsh index 2d78f2b4c..39d8b10d9 100644 --- a/plugins/node/node.plugin.zsh +++ b/plugins/node/node.plugin.zsh @@ -3,7 +3,7 @@ function node-docs { # get the open command local open_cmd - if [[ $(uname -s) == 'Darwin' ]]; then + if [[ "$OSTYPE" = darwin* ]]; then open_cmd='open' else open_cmd='xdg-open' diff --git a/plugins/rake-fast/rake-fast.plugin.zsh b/plugins/rake-fast/rake-fast.plugin.zsh index cb84f69a1..cfc9a079f 100644 --- a/plugins/rake-fast/rake-fast.plugin.zsh +++ b/plugins/rake-fast/rake-fast.plugin.zsh @@ -10,7 +10,7 @@ _rake_refresh () { _rake_does_task_list_need_generating () { if [ ! -f .rake_tasks ]; then return 0; else - if [[ $(uname -s) == 'Darwin' ]]; then + if [[ "$OSTYPE" = darwin* ]]; then accurate=$(stat -f%m .rake_tasks) changed=$(stat -f%m Rakefile) else diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh index 438f386fb..5acc75cc7 100644 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -17,7 +17,7 @@ if [[ $('uname') == 'Linux' ]]; then fi done -elif [[ $('uname') == 'Darwin' ]]; then +elif [[ "$OSTYPE" = darwin* ]]; then local _sublime_darwin_paths > /dev/null 2>&1 _sublime_darwin_paths=( "/usr/local/bin/subl" diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index 8eedb90ee..f056e38e8 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -4,7 +4,7 @@ function web_search() { # get the open command local open_cmd - if [[ $(uname -s) == 'Darwin' ]]; then + if [[ "$OSTYPE" = darwin* ]]; then open_cmd='open' else open_cmd='xdg-open' From db3dd6d755776daf19b55f6a1cae080ae684030a Mon Sep 17 00:00:00 2001 From: Guerki <pol.guerkinger@gmail.com> Date: Tue, 29 Jul 2014 09:21:10 +0200 Subject: [PATCH 123/488] Run Web-search as a Background Process with Nohup --- plugins/web-search/web-search.plugin.zsh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index 8eedb90ee..e157a389d 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -1,7 +1,6 @@ # web_search from terminal function web_search() { - # get the open command local open_cmd if [[ $(uname -s) == 'Darwin' ]]; then @@ -38,8 +37,8 @@ function web_search() { done url="${url%?}" # remove the last '+' - - $open_cmd "$url" + nohup $open_cmd "$url" + rm nohup.out } From 0174feef0d57ac4110d2603ce2a25a5de4739414 Mon Sep 17 00:00:00 2001 From: Abhas Mittal <mittalabhas1@gmail.com> Date: Thu, 31 Jul 2014 18:24:01 +0530 Subject: [PATCH 124/488] Update README.textile Added instructions for installing zsh (due to the problems with first time zsh users) --- README.textile | 1 + 1 file changed, 1 insertion(+) diff --git a/README.textile b/README.textile index 28bab6b2c..143e87cab 100644 --- a/README.textile +++ b/README.textile @@ -7,6 +7,7 @@ bq. "OH MY ZSHELL!" h2. Setup @oh-my-zsh@ should work with any recent release of "zsh":http://www.zsh.org/, the minimum recommended version is 4.3.9. +You can install zsh using the command: @sudo apt-get install zsh@. h3. The automatic installer... (do you trust me?) From fbdacbfb1ae586af1008fe561bc3962d78a5973f Mon Sep 17 00:00:00 2001 From: Abhas Mittal <mittalabhas1@gmail.com> Date: Thu, 31 Jul 2014 18:32:57 +0530 Subject: [PATCH 125/488] Update README.textile --- README.textile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.textile b/README.textile index 143e87cab..5900c95d8 100644 --- a/README.textile +++ b/README.textile @@ -7,7 +7,7 @@ bq. "OH MY ZSHELL!" h2. Setup @oh-my-zsh@ should work with any recent release of "zsh":http://www.zsh.org/, the minimum recommended version is 4.3.9. -You can install zsh using the command: @sudo apt-get install zsh@. +If not already, install zsh using the command line first. h3. The automatic installer... (do you trust me?) From e5ac5009a4c5efbc1b9916d74d082ffc32761a4c Mon Sep 17 00:00:00 2001 From: Adam Poskitt <admpsktt@gmail.com> Date: Thu, 31 Jul 2014 21:30:15 +0100 Subject: [PATCH 126/488] Update rvm.plugin.zsh Ruby 2.1.1 -> Ruby 2.1.2. --- plugins/rvm/rvm.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/rvm/rvm.plugin.zsh b/plugins/rvm/rvm.plugin.zsh index ad23e18d7..234ac1642 100644 --- a/plugins/rvm/rvm.plugin.zsh +++ b/plugins/rvm/rvm.plugin.zsh @@ -6,7 +6,7 @@ alias gemsets='rvm gemset list' local ruby18='ruby-1.8.7' local ruby19='ruby-1.9.3' local ruby20='ruby-2.0.0' -local ruby21='ruby-2.1.1' +local ruby21='ruby-2.1.2' function rb18 { if [ -z "$1" ]; then From 80323ec4c3497e49c8294752e96b033426ae09db Mon Sep 17 00:00:00 2001 From: Josh Medeski <josh@medeskidesign.com> Date: Thu, 31 Jul 2014 19:37:22 -0500 Subject: [PATCH 127/488] WP-CLI plugin init --- plugins/wp-cli/wp-cli.plugin.zsh | 138 +++++++++++++++++++++++++++++++ 1 file changed, 138 insertions(+) create mode 100644 plugins/wp-cli/wp-cli.plugin.zsh diff --git a/plugins/wp-cli/wp-cli.plugin.zsh b/plugins/wp-cli/wp-cli.plugin.zsh new file mode 100644 index 000000000..5d9551e24 --- /dev/null +++ b/plugins/wp-cli/wp-cli.plugin.zsh @@ -0,0 +1,138 @@ +# WP-CLI +# A command line interface for WordPress +# http://wp-cli.org/ + +# Cache + +# Cap + +# CLI + +# Comment + +# Core +alias wpcc='wp core config' +alias wpcd='wp core download' +alias wpci='wp core install' +alias wpcii='wp core is-installed' +alias wpcmc='wp core multisite-convert' +alias wpcmi='wp core multisite-install' +alias wpcu='wp core update' +alias wpcudb='wp core update-db' +alias wpcvc='wp core verify-checksums' + +# Cron +alias wpcre='wp cron event' +alias wpcrs='wp cron schedule' +alias wpcrt='wp cron test' + +# Db + +# Eval + +# Eval-File + +# Export + +# Help + +# Import + +# Media + +# Menu +alias wpmc='wp menu create' +alias wpmd='wp menu delete' +alias wpmi='wp menu item' +alias wpml='wp menu list' +alias wpmlo='wp menu location' + +# Network + +# Option + +# Plugin +alias wppa='activate' +alias wppda='deactivate' +alias wppd='delete' +alias wppg='get' +alias wppi='install' +alias wppis='is-installed' +alias wppl='list' +alias wppp='path' +alias wpps='search' +alias wppst='status' +alias wppt='toggle' +alias wppu='uninstall' +alias wppu='update' + +# Post +alias wppoc='wp post create' +alias wppod='wp post delete' +alias wppoe='wp post edit' +alias wppogen='wp post generate' +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' + +# Rewrite + +# Role + +# Scaffold + +# Search-Replace + +# Shell + +# Sidebar +alias wpsbl='wp sidebar list' + +# Site + +# Super-Admin + +# Term + +# Theme +alias wpta='wp theme activate' +alias wptd='wp theme delete' +alias wptdis='wp theme disable' +alias wpte='wp theme enable' +alias wptg='wp theme get' +alias wpti='wp theme install' +alias wptis='wp theme is-installed' +alias wptl='wp theme list' +alias wptm='wp theme mod' +alias wptp='wp theme path' +alias wpts='wp theme search' +alias wptst='wp theme status' +alias wptu='wp theme updatet' + +# Transient + +# User +alias wpuac='wp user add-cap' +alias wpuar='wp user add-role' +alias wpuc='wp user create' +alias wpud='wp user delete' +alias wpugen='wp user generate' +alias wpug='wp user get' +alias wpui='wp user import-csv' +alias wpul='wp user list' +alias wpulc='wp user list-caps' +alias wpum='wp user meta' +alias wpurc='wp user remove-cap' +alias wpurr='wp user remove-role' +alias wpusr='wp user set-role' +alias wpuu='wp user update' + +# Widget +alias wpwa='wp widget add' +alias wpwda='wp widget deactivate' +alias wpwd='wp widget delete' +alias wpwl='wp widget list' +alias wpwm='wp widget move' +alias wpwu='wp widget update' From 961ca143b81fe5d15f67bd3a61fe174e41e155b5 Mon Sep 17 00:00:00 2001 From: Carlos Chacin <cchacin@groupon.com> Date: Fri, 1 Aug 2014 01:59:45 -0400 Subject: [PATCH 128/488] TomEE maven plugin + integration-test in common life-cycle --- plugins/mvn/mvn.plugin.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh index a70625fcf..0c4f77162 100644 --- a/plugins/mvn/mvn.plugin.zsh +++ b/plugins/mvn/mvn.plugin.zsh @@ -64,7 +64,7 @@ alias mvns='mvn site' function listMavenCompletions { reply=( # common lifecycle - clean process-resources compile process-test-resources test-compile test package verify install deploy site + clean process-resources compile process-test-resources test-compile test integration-test package verify install deploy site # common plugins deploy failsafe install site surefire checkstyle javadoc jxr pmd ant antrun archetype assembly dependency enforcer gpg help release repository source eclipse idea jetty cargo jboss tomcat tomcat6 tomcat7 exec versions war ear ejb android scm buildnumber nexus repository sonar license hibernate3 liquibase flyway gwt @@ -129,6 +129,8 @@ function listMavenCompletions { tomcat6:run tomcat6:run-war tomcat6:run-war-only tomcat6:stop tomcat6:deploy tomcat6:undeploy # tomcat7 tomcat7:run tomcat7:run-war tomcat7:run-war-only tomcat7:deploy + # tomee + tomee:run tomee:run-war tomee:run-war-only tomee:stop tomee:deploy tomee:undeploy # spring-boot spring-boot:run spring-boot:repackage # exec From 8a43d358c1d433c32fd940d3ff19cfa2f3fcf20c Mon Sep 17 00:00:00 2001 From: Nico Revin <whois@nicorevin.ru> Date: Fri, 1 Aug 2014 23:32:38 +0400 Subject: [PATCH 129/488] fix paclist() for non-english locales --- plugins/archlinux/archlinux.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh index bffe9657a..82c8d8a23 100644 --- a/plugins/archlinux/archlinux.plugin.zsh +++ b/plugins/archlinux/archlinux.plugin.zsh @@ -55,7 +55,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' From 4f1ee6c1eed04345c458458006a15381d35d8080 Mon Sep 17 00:00:00 2001 From: Jim Remsik <jim@adorable.io> Date: Fri, 1 Aug 2014 20:16:33 -0500 Subject: [PATCH 130/488] Add gap (git add --patch) --- plugins/git/git.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 9f7819df3..44c4617fb 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -70,6 +70,7 @@ 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 gm='git merge' compdef _git gm=git-merge alias grh='git reset HEAD' From 397a9f7b7bfd88678c5b10d2c3e96c0768677434 Mon Sep 17 00:00:00 2001 From: Adam Poskitt <admpsktt@gmail.com> Date: Sat, 2 Aug 2014 11:43:32 +0100 Subject: [PATCH 131/488] Update README.textile --- README.textile | 84 +++++++++++++++++++++++++------------------------- 1 file changed, 42 insertions(+), 42 deletions(-) diff --git a/README.textile b/README.textile index 5900c95d8..09cff2135 100644 --- a/README.textile +++ b/README.textile @@ -1,111 +1,111 @@ !https://s3.amazonaws.com/ohmyzsh/oh-my-zsh-logo.png! -oh-my-zsh is an open source, community-driven framework for managing your ZSH configuration. It comes bundled with a ton of helpful functions, helpers, plugins, themes, and few things that make you shout... +@oh-my-zsh@ is an open source, community-driven framework for managing your "Zsh":http://www.zsh.org/ configuration. + +It comes bundled with a ton of helpful functions, helpers, plugins, themes, and a few things that make you shout… bq. "OH MY ZSHELL!" h2. Setup -@oh-my-zsh@ should work with any recent release of "zsh":http://www.zsh.org/, the minimum recommended version is 4.3.9. -If not already, install zsh using the command line first. +@oh-my-zsh@ should work with any recent release of "Zsh":http://www.zsh.org/. The minimum recommended version is *4.3.9*. -h3. The automatic installer... (do you trust me?) +If not already installed, you can install "Zsh":http://www.zsh.org/ using the command-line. -You can install this via the command line with either @curl@ or @wget@. +h3. The automatic installer… do you trust me? -h4. via @curl@ +You can install this via the command-line with either @curl@ or @wget@. + +h4. via @curl@: @curl -L http://install.ohmyz.sh | sh@ -h4. via @wget@ +h4. via @wget@: @wget --no-check-certificate http://install.ohmyz.sh -O - | sh@ -h4. Optional: change the install directory +h4. *Optionally*, change the install directory: The default location is @~/.oh-my-zsh@ (hidden in your home directory). -You can change the install directory with the ZSH environment variable, either -by running @export ZSH=/your/path@ before installing, or setting it before the -end of the install pipeline like this: +You can change the install directory with the @ZSH@ environment variable, either by running @export ZSH=/your/path@ before installing, or by setting it before the end of the install pipeline like this: @curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | ZSH=~/.dotfiles/zsh sh@ - h3. The manual way -1. Clone the repository +1. Clone the repository: - @git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh@ +@git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh@ -2. *OPTIONAL* Backup your existing @~/.zshrc@ file +2. *Optionally*, backup your existing @~/.zshrc@ file: - @cp ~/.zshrc ~/.zshrc.orig@ +@cp ~/.zshrc ~/.zshrc.orig@ -3. Create a new zsh config by copying the zsh template we've provided. +3. Create a new "Zsh":http://www.zsh.org/ config file by copying the "Zsh":http://www.zsh.org/ template we've provided: - @cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc@ +@cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc@ -4. Set zsh as your default shell: +4. Set "Zsh":http://www.zsh.org/ as your default shell: - @chsh -s /bin/zsh@ +@chsh -s /bin/zsh@ -5. Start / restart zsh (open a new terminal is easy enough...) +5. Start or restart "Zsh":http://www.zsh.org/ by opening a new command-line window. h3. Problems? -You _might_ need to modify your @PATH@ in @~/.zshrc@ if you're not able to find some commands after switching to _Oh My Zsh_. +You _might_ need to modify your @PATH@ in @~/.zshrc@ if you're not able to find some commands after switching to @oh-my-zsh@. -If you installed manually or changed the install location, check ZSH in @~/.zshrc@ +If you installed manually or changed the install location, check the @ZSH@ environment variable in @~/.zshrc@. h2. Usage -* enable the plugins you want in your @~/.zshrc@ (take a look at the @plugins/@ directory and the "wiki":https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins to see what's possible) +* enable the plugins you want in your @~/.zshrc@ (take a look at the @plugins/@ directory and the "wiki":https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins to see what's available) ** example: @plugins=(git osx ruby)@ -* Theme support: Change the @ZSH_THEME@ environment variable in @~/.zshrc@. -** Take a look at the "current themes":https://wiki.github.com/robbyrussell/oh-my-zsh/themes that come bundled with _Oh My Zsh_. -* much much more... take a look at @lib/@ what _Oh My Zsh_ offers... +* theme support: change the @ZSH_THEME@ environment variable in @~/.zshrc@ +** take a look at the @themes/@ directory and the "wiki":https://wiki.github.com/robbyrussell/oh-my-zsh/themes to see what comes bundled with @oh-my-zsh@ +* & much, much more… take a look at the @lib/@ directory to see what @oh-my-zsh@ has to offer… h2. Useful -the "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty tasty for tips. +The "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty useful for tips. h3. Customization -If you want to override any of the default behavior, just add a new file (ending in @.zsh@) into the @custom/@ directory. -If you have many functions which go well together you can put them as a @*.plugin.zsh@ file in the @custom/plugins/@ directory and then enable this plugin. -If you would like to override the functionality of a plugin distributed with oh-my-zsh, create a plugin of the same name in the @custom/plugins/@ directory and it will be loaded instead of the one in @plugins/@. +If you want to override any of the default behaviors, just add a new file (ending in @.zsh@) in the @custom/@ directory. + +If you have many functions that go well together, you can put them as a @*.plugin.zsh@ file in the @custom/plugins/@ directory and then enable this plugin (see '"Usage":https://github.com/robbyrussell/oh-my-zsh#usage' above). + +If you would like to override the functionality of a plugin distributed with @oh-my-zsh@, create a plugin of the same name in the @custom/plugins/@ directory and it will be loaded instead of the one in @plugins/@. h3. Updates -By default you will be prompted to check for updates. If you would like oh-my-zsh to automatically update itself without prompting you, set the following in your @~/.zshrc@ +By default you will be prompted to check for upgrades. If you would like @oh-my-zsh@ to automatically upgrade itself without prompting you, set the following in your @~/.zshrc@: @DISABLE_UPDATE_PROMPT=true@ -To disable updates entirely, put this in your @~/.zshrc@ +To disable upgrades entirely, set the following in your @~/.zshrc@: @DISABLE_AUTO_UPDATE=true@ -To upgrade directly from the command line, just run @upgrade_oh_my_zsh@ +To upgrade directly from the command-line, just run @upgrade_oh_my_zsh@. h3. Uninstalling -If you want to uninstall it, just run @uninstall_oh_my_zsh@ from the command line and it'll remove itself and revert you to bash (or your previous zsh config). +If you want to uninstall @oh-my-zsh@, just run @uninstall_oh_my_zsh@ from the command-line and it'll remove itself and revert you to @bash@ (or your previous "Zsh":http://www.zsh.org/ configuration). h2. Help out! -I'm far from being a zsh-expert and suspect there are many ways to improve. If you have ideas on how to make the configuration easier to maintain (and faster), don't hesitate to fork and send pull requests! +I'm far from being a "Zsh":http://www.zsh.org/ expert and suspect there are many ways to improve – if you have ideas on how to make the configuration easier to maintain (and faster), don't hesitate to fork and send pull requests! -h3. (Don't) Send us your theme! (for now) +h3. (Don't) send us your theme (for now)! --I'm hoping to collect a bunch of themes for our command prompts. You can see existing ones in the @themes/@ directory.- +-I'm hoping to collect a bunch of themes – you can see existing ones in the @themes/@ directory.- -We have enough themes for the time being. Please fork the project and add on in there, you can let people know how to grab it from there. +We have enough themes for the time being. Please fork the project and add on in there – you can let people know how to grab it from there. h2. Contributors -This project wouldn't exist without all of our awesome users and contributors. - -* "View our growing list of contributors":https://github.com/robbyrussell/oh-my-zsh/contributors +This project wouldn't exist without all of our awesome users and contributors: "view our growing list of contributors":https://github.com/robbyrussell/oh-my-zsh/contributors Thank you so much! From fdb30392b15ef0b7edd6d670340d1ba390f4a7b8 Mon Sep 17 00:00:00 2001 From: Adam Poskitt <admpsktt@gmail.com> Date: Mon, 4 Aug 2014 15:10:11 +0100 Subject: [PATCH 132/488] Update half-life.zsh-theme Add spaces before bullet-points to more easily distinguish them from one another and the rest of the prompt when using smaller font-sizes and do not add a blank line prior to prompt output; if there's a desire for spacing, one can use their terminal's line-height to achieve this. --- themes/half-life.zsh-theme | 9 ++++----- 1 file changed, 4 insertions(+), 5 deletions(-) diff --git a/themes/half-life.zsh-theme b/themes/half-life.zsh-theme index c8d09ce47..1bf4c7432 100644 --- a/themes/half-life.zsh-theme +++ b/themes/half-life.zsh-theme @@ -51,8 +51,8 @@ zstyle ':vcs_info:*:prompt:*' check-for-changes true PR_RST="%{${reset_color}%}" FMT_BRANCH=" on %{$turquoise%}%b%u%c${PR_RST}" FMT_ACTION=" performing a %{$limegreen%}%a${PR_RST}" -FMT_UNSTAGED="%{$orange%}●" -FMT_STAGED="%{$limegreen%}●" +FMT_UNSTAGED="%{$orange%} ●" +FMT_STAGED="%{$limegreen%} ●" zstyle ':vcs_info:*:prompt:*' unstagedstr "${FMT_UNSTAGED}" zstyle ':vcs_info:*:prompt:*' stagedstr "${FMT_STAGED}" @@ -83,7 +83,7 @@ function steeef_precmd { # check for untracked files or updated submodules, since vcs_info doesn't if [[ ! -z $(git ls-files --other --exclude-standard 2> /dev/null) ]]; then PR_GIT_UPDATE=1 - FMT_BRANCH="${PM_RST} on %{$turquoise%}%b%u%c%{$hotpink%}●${PR_RST}" + FMT_BRANCH="${PM_RST} on %{$turquoise%}%b%u%c%{$hotpink%} ●${PR_RST}" else FMT_BRANCH="${PM_RST} on %{$turquoise%}%b%u%c${PR_RST}" fi @@ -95,5 +95,4 @@ function steeef_precmd { } add-zsh-hook precmd steeef_precmd -PROMPT=$' -%{$purple%}%n%{$reset_color%} in %{$limegreen%}%~%{$reset_color%}$(rvm-prompt " with%{$fg[red]%} " v g "%{$reset_color%}")$vcs_info_msg_0_%{$orange%} λ%{$reset_color%} ' +PROMPT=$'%{$purple%}%n%{$reset_color%} in %{$limegreen%}%~%{$reset_color%}$(rvm-prompt " with%{$fg[red]%} " v g "%{$reset_color%}")$vcs_info_msg_0_%{$orange%} λ%{$reset_color%} ' From 89f1d94a3052e2eabd3e86b856eada8e51fc65b4 Mon Sep 17 00:00:00 2001 From: Frederik Mogensen <sodiaf@gmail.com> Date: Sun, 7 Aug 2011 21:43:32 +0200 Subject: [PATCH 133/488] Added autocompleting plugin for Android Debug Bridge (adb). --- plugins/adb/_adb | 37 +++++++++++++++++++++++++++++++++++++ 1 file changed, 37 insertions(+) create mode 100644 plugins/adb/_adb diff --git a/plugins/adb/_adb b/plugins/adb/_adb new file mode 100644 index 000000000..1efcb9eb0 --- /dev/null +++ b/plugins/adb/_adb @@ -0,0 +1,37 @@ +#compdef adb +#autoload + +# in order to make this work, you will need to have the android adb tools + +# adb zsh completion, based on homebrew completion + +local -a _1st_arguments +_1st_arguments=( +'bugreport:return all information from the device that should be included in a bug report.' +'connect:connect to a device via TCP/IP Port 5555 is default.' +'devices:list all connected devices' +'disconnect:disconnect from a TCP/IP device. Port 5555 is default.' +'emu:run emulator console command' +'forward:forward socket connections' +'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' +'pull:copy file/dir from device' +'push:copy file/dir to device' +'shell:run remote shell interactively' +'sync:copy host->device only if changed (-l means list but dont copy)' +'uninstall:remove this app package from the device' +'version:show version num' +) + +local expl +local -a pkgs installed_pkgs + +_arguments \ + '*:: :->subcmds' && return 0 + +if (( CURRENT == 1 )); then + _describe -t commands "adb subcommand" _1st_arguments + return +fi From 8ad9122ba49bb0a41ca7dbad03cf5438477cc283 Mon Sep 17 00:00:00 2001 From: Frederik Mogensen <sodiaf@gmail.com> Date: Tue, 3 Jan 2012 17:12:22 +0100 Subject: [PATCH 134/488] Added _files to complete all arguments following the first as files --- plugins/adb/_adb | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/adb/_adb b/plugins/adb/_adb index 1efcb9eb0..4c998172d 100644 --- a/plugins/adb/_adb +++ b/plugins/adb/_adb @@ -35,3 +35,5 @@ if (( CURRENT == 1 )); then _describe -t commands "adb subcommand" _1st_arguments return fi + +_files From 78a7c0c6aebc6415040464c704f64bce0c72d049 Mon Sep 17 00:00:00 2001 From: Celso Miranda <contacto@celsomiranda.net> Date: Sat, 9 Aug 2014 01:04:28 +0100 Subject: [PATCH 135/488] Add support for local aur databases With these simple changes the plugin checks for the local AUR database and updates the aliases so it can update it when you issue a `pacupd` or `yaupd`. --- plugins/archlinux/archlinux.plugin.zsh | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh index bffe9657a..22d9f0970 100644 --- a/plugins/archlinux/archlinux.plugin.zsh +++ b/plugins/archlinux/archlinux.plugin.zsh @@ -21,10 +21,14 @@ 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` ]]; then + if [[ -x `which abs` && -x `which 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 alias yaupd='yaourt -Sy && sudo abs' # Update and refresh the local package and ABS databases against repositories + elif [[ -x `which 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 and ABS databases against repositories + alias yaupd='yaourt -Sy' # Update and refresh the local package database against repositories fi alias yainsd='yaourt -S --asdeps' # Install given package(s) as dependencies of another package alias yamir='yaourt -Syy' # Force refresh of all package lists after updating /etc/pacman.d/mirrorlist @@ -45,10 +49,14 @@ 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` ]]; then - alias pacupd='sudo pacman -Sy && sudo abs' # Update and refresh the local package and ABS databases against repositories +if [[ -x `which abs` && -x `which 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 + alias pacupd='sudo pacman -Sy && sudo abs' # Update and refresh the local package and ABS databases against repositories +elif [[ -x `which 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 and ABS databases against repositories + alias pacupd='sudo pacman -Sy' # Update and refresh the local package database against repositories fi alias pacinsd='sudo pacman -S --asdeps' # Install given package(s) as dependencies of another package alias pacmir='sudo pacman -Syy' # Force refresh of all package lists after updating /etc/pacman.d/mirrorlist From 7d208be2a147657d6d8e936e3f03c26b3a936ac8 Mon Sep 17 00:00:00 2001 From: Celso Miranda <contacto@celsomiranda.net> Date: Sat, 9 Aug 2014 01:09:06 +0100 Subject: [PATCH 136/488] bugfix: two wild apostrophes oops --- plugins/archlinux/archlinux.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh index 22d9f0970..059884c27 100644 --- a/plugins/archlinux/archlinux.plugin.zsh +++ b/plugins/archlinux/archlinux.plugin.zsh @@ -21,7 +21,7 @@ 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 [[ -x `which abs` && -x `which 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 alias yaupd='yaourt -Sy && sudo abs' # Update and refresh the local package and ABS databases against repositories From 99e74b04981b2eb66714bf68245115520bcd25f0 Mon Sep 17 00:00:00 2001 From: Cherry NG <cherry92@gmail.com> Date: Sat, 9 Aug 2014 21:40:56 +0800 Subject: [PATCH 137/488] rounding to emoji clock --- plugins/emoji-clock/emoji-clock.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/emoji-clock/emoji-clock.plugin.zsh b/plugins/emoji-clock/emoji-clock.plugin.zsh index 7351a02ec..a69446e3c 100644 --- a/plugins/emoji-clock/emoji-clock.plugin.zsh +++ b/plugins/emoji-clock/emoji-clock.plugin.zsh @@ -8,8 +8,8 @@ # ----------------------------------------------------------------------------- function emoji-clock() { - hour=$(date '+%I') - minutes=$(date '+%M') + hour=$(date -v '+15M' '+%I') + minutes=$(date -v '+15M' '+%M') case $hour in 01) clock="🕐"; [ $minutes -ge 30 ] && clock="🕜";; 02) clock="🕑"; [ $minutes -ge 30 ] && clock="🕝";; From 45abe764e55a6c201acb3bf8e602f53e5d5574f0 Mon Sep 17 00:00:00 2001 From: Bruno Oliveira <bruno@abstractj.org> Date: Sat, 9 Aug 2014 12:26:35 -0300 Subject: [PATCH 138/488] Inclusion of aliases for sign git commits and tags --- plugins/git/git.plugin.zsh | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 9f7819df3..51a09a053 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -77,6 +77,18 @@ 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' From 9a0196dbf72521319a0fa0db4ae84603c2c79868 Mon Sep 17 00:00:00 2001 From: lundberg <allister@livrobo.com> Date: Sun, 10 Aug 2014 12:01:47 -0700 Subject: [PATCH 139/488] New alias for git plugin: gbr == git branch --remote --- plugins/git/git.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 9f7819df3..cef7926db 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -51,6 +51,7 @@ 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' From 49e10ae449d2e5570542e4f9011ea4e2fb14a348 Mon Sep 17 00:00:00 2001 From: Daniel Oaks <daniel@danieloaks.net> Date: Thu, 14 Aug 2014 00:01:35 +1000 Subject: [PATCH 140/488] Make 'ys' theme use hg repo info too --- themes/ys.zsh-theme | 33 +++++++++++++++++++++++++++++---- 1 file changed, 29 insertions(+), 4 deletions(-) diff --git a/themes/ys.zsh-theme b/themes/ys.zsh-theme index a44f295f4..9332b677a 100644 --- a/themes/ys.zsh-theme +++ b/themes/ys.zsh-theme @@ -14,12 +14,35 @@ function box_name { # Directory info. local current_dir='${PWD/#$HOME/~}' +# VCS +YS_VCS_PROMPT_PREFIX1=" %{$fg[white]%}on%{$reset_color%} " +YS_VCS_PROMPT_PREFIX2=":%{$fg[cyan]%}" +YS_VCS_PROMPT_SUFFIX="%{$reset_color%}" +YS_VCS_PROMPT_DIRTY=" %{$fg[red]%}x" +YS_VCS_PROMPT_CLEAN=" %{$fg[green]%}o" + # Git info. local git_info='$(git_prompt_info)' -ZSH_THEME_GIT_PROMPT_PREFIX=" %{$fg[white]%}on%{$reset_color%} git:%{$fg[cyan]%}" -ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" -ZSH_THEME_GIT_PROMPT_DIRTY=" %{$fg[red]%}x" -ZSH_THEME_GIT_PROMPT_CLEAN=" %{$fg[green]%}o" +ZSH_THEME_GIT_PROMPT_PREFIX="${YS_VCS_PROMPT_PREFIX1}git${YS_VCS_PROMPT_PREFIX2}" +ZSH_THEME_GIT_PROMPT_SUFFIX="$YS_VCS_PROMPT_SUFFIX" +ZSH_THEME_GIT_PROMPT_DIRTY="$YS_VCS_PROMPT_DIRTY" +ZSH_THEME_GIT_PROMPT_CLEAN="$YS_VCS_PROMPT_CLEAN" + +# HG info +local hg_info='$(ys_hg_prompt_info)' +ys_hg_prompt_info() { + # make sure this is a hg dir + if [ -d '.hg' ]; then + echo -n "${YS_VCS_PROMPT_PREFIX1}hg${YS_VCS_PROMPT_PREFIX2}" + echo -n $(hg branch 2>/dev/null) + if [ -n "$(hg status 2>/dev/null)" ]; then + echo -n "$YS_VCS_PROMPT_DIRTY" + else + echo -n "$YS_VCS_PROMPT_CLEAN" + fi + echo -n "$YS_VCS_PROMPT_SUFFIX" + fi +} # Prompt format: \n # USER at MACHINE in DIRECTORY on git:BRANCH STATE [TIME] \n $ PROMPT=" @@ -29,6 +52,7 @@ PROMPT=" %{$fg[green]%}$(box_name) \ %{$fg[white]%}in \ %{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\ +${hg_info}\ ${git_info} \ %{$fg[white]%}[%*] %{$terminfo[bold]$fg[red]%}$ %{$reset_color%}" @@ -41,6 +65,7 @@ PROMPT=" %{$fg[green]%}$(box_name) \ %{$fg[white]%}in \ %{$terminfo[bold]$fg[yellow]%}${current_dir}%{$reset_color%}\ +${hg_info}\ ${git_info} \ %{$fg[white]%}[%*] %{$terminfo[bold]$fg[red]%}$ %{$reset_color%}" From df1b0b328983dba57b4cea123b5a05c24493ae8f Mon Sep 17 00:00:00 2001 From: Tom Cammann <tom.cammann@hp.com> Date: Tue, 19 Aug 2014 15:42:39 +0100 Subject: [PATCH 141/488] Update jira plugin to allow lookup of issues Plugin now supports lookup of tickets by assignee and reporter --- plugins/jira/jira.plugin.zsh | 41 ++++++++++++++++++++++++++++++++++-- 1 file changed, 39 insertions(+), 2 deletions(-) diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index 3d510e430..a6d08410f 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -26,7 +26,7 @@ open_jira_issue () { jira_url=$JIRA_URL else echo "JIRA url is not specified anywhere." - return 0 + return 1 fi if [ -f .jira-prefix ]; then @@ -39,7 +39,9 @@ open_jira_issue () { if [ -z "$1" ]; then echo "Opening new issue" - $open_cmd "$jira_url/secure/CreateIssue!default.jspa" + $open_cmd "${jira_url}/secure/CreateIssue!default.jspa" + elif [[ "$1" = "assigned" || "$1" = "reported" ]]; then + jira_query $@ else echo "Opening issue #$1" if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then @@ -50,4 +52,39 @@ open_jira_issue () { fi } +jira_name () { + if [[ -z "$1" ]]; then + if [[ "x${JIRA_NAME}" != "x" ]]; then + jira_name=${JIRA_NAME} + else + echo "JIRA_NAME not specified" + return 1 + 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" +} + alias jira='open_jira_issue' + From eee7345f1f01df5f66151bc5bf34d8e2110224aa Mon Sep 17 00:00:00 2001 From: Alex Shadrin <alex@shdlabs.com> Date: Wed, 20 Aug 2014 13:57:28 +0300 Subject: [PATCH 142/488] Resets the font colour to original --- themes/fino.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/fino.zsh-theme b/themes/fino.zsh-theme index 35e6e02c1..411dec9b9 100644 --- a/themes/fino.zsh-theme +++ b/themes/fino.zsh-theme @@ -35,7 +35,7 @@ local prompt_char='$(prompt_char)' PROMPT="╭─%{$FG[040]%}%n%{$reset_color%} %{$FG[239]%}at%{$reset_color%} %{$FG[033]%}$(box_name)%{$reset_color%} %{$FG[239]%}in%{$reset_color%} %{$terminfo[bold]$FG[226]%}${current_dir}%{$reset_color%}${git_info} %{$FG[239]%}using%{$FG[243]%}${ruby_env} -╰─${prompt_char} " +╰─${prompt_char}%{$reset_color%} " ZSH_THEME_GIT_PROMPT_PREFIX=" %{$FG[239]%}on%{$reset_color%} %{$fg[255]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" From dac2a6e27a23071226495bfee54b390135cb20b6 Mon Sep 17 00:00:00 2001 From: Fredrik Fornwall <fredrik@fornwall.net> Date: Wed, 20 Aug 2014 23:52:05 +0200 Subject: [PATCH 143/488] Replace /usr/bin/env with env Some environments (such as Android) does not have /usr/bin. --- lib/functions.zsh | 4 ++-- oh-my-zsh.sh | 2 +- tools/check_for_upgrade.sh | 2 +- tools/install.sh | 4 ++-- 4 files changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/functions.zsh b/lib/functions.zsh index fda84a953..17f5f9cbf 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -3,11 +3,11 @@ function zsh_stats() { } function uninstall_oh_my_zsh() { - /usr/bin/env ZSH=$ZSH /bin/sh $ZSH/tools/uninstall.sh + env ZSH=$ZSH /bin/sh $ZSH/tools/uninstall.sh } function upgrade_oh_my_zsh() { - /usr/bin/env ZSH=$ZSH /bin/sh $ZSH/tools/upgrade.sh + env ZSH=$ZSH /bin/sh $ZSH/tools/upgrade.sh } function take() { diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index c217b91bb..a90b3e98a 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -1,6 +1,6 @@ # Check for updates on initial load... if [ "$DISABLE_AUTO_UPDATE" != "true" ]; then - /usr/bin/env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh -f $ZSH/tools/check_for_upgrade.sh + env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh -f $ZSH/tools/check_for_upgrade.sh fi # Initializes Oh My Zsh diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 8b8ecae03..35e074297 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -9,7 +9,7 @@ function _update_zsh_update() { } function _upgrade_zsh() { - /usr/bin/env ZSH=$ZSH /bin/sh $ZSH/tools/upgrade.sh + env ZSH=$ZSH /bin/sh $ZSH/tools/upgrade.sh # update the zsh file _update_zsh_update } diff --git a/tools/install.sh b/tools/install.sh index fc7ad70cf..7efab10b9 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -10,7 +10,7 @@ if [ -d "$ZSH" ]; then fi echo "\033[0;34mCloning Oh My Zsh...\033[0m" -hash git >/dev/null 2>&1 && /usr/bin/env git clone https://github.com/robbyrussell/oh-my-zsh.git $ZSH || { +hash git >/dev/null 2>&1 && env git clone https://github.com/robbyrussell/oh-my-zsh.git $ZSH || { echo "git not installed" exit } @@ -43,5 +43,5 @@ echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m echo "\033[0;32m"' /____/ ....is now installed!'"\033[0m" echo "\n\n \033[0;32mPlease look over the ~/.zshrc file to select plugins, themes, and options.\033[0m" echo "\n\n \033[0;32mp.s. Follow us at http://twitter.com/ohmyzsh.\033[0m" -/usr/bin/env zsh +env zsh . ~/.zshrc From 91ba6d98875c70d0736fd3eecd0ee4aae52cdc74 Mon Sep 17 00:00:00 2001 From: Mathieu Comandon <strycore@gmail.com> Date: Thu, 21 Aug 2014 12:47:48 +0200 Subject: [PATCH 144/488] Don't try running chsh if user already runs zsh --- tools/install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index fc7ad70cf..fc0a9fa64 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -32,8 +32,10 @@ sed -i -e "/export PATH=/ c\\ export PATH=\"$PATH\" " ~/.zshrc -echo "\033[0;34mTime to change your default shell to zsh!\033[0m" -chsh -s `which zsh` +if [ "$SHELL" != "$(which zsh)" ]; then + echo "\033[0;34mTime to change your default shell to zsh!\033[0m" + chsh -s `which zsh` +fi echo "\033[0;32m"' __ __ '"\033[0m" echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m" From 5d6c73d7d38930443bdc4357c337e0baf7d5b5fb Mon Sep 17 00:00:00 2001 From: DariusPHP <darius.grigalevicius@nfq.lt> Date: Fri, 22 Aug 2014 10:21:38 +0300 Subject: [PATCH 145/488] #git plugin git diff-tree --name-only added --- plugins/git/git.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 9f7819df3..a76bb1cdf 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -7,6 +7,8 @@ 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' From dc9e1764cfd0987f104f57bac0b974e0941f1e42 Mon Sep 17 00:00:00 2001 From: Jingwen Owen Ou <jingweno@gmail.com> Date: Fri, 22 Aug 2014 15:59:17 -0700 Subject: [PATCH 146/488] Fix missing add-zsh-hook In older version of zsh, `add-zsh-hook` is not available, causing issues like: ``` /Users/hugo/.oh-my-zsh/lib/termsupport.zsh:32: add-zsh-hook: function definition file not found /Users/hugo/.oh-my-zsh/lib/termsupport.zsh:33: add-zsh-hook: function definition file not found ``` See https://github.com/robbyrussell/oh-my-zsh/issues/748. This patch pulls in the changes suggested in https://github.com/robbyrussell/oh-my-zsh/issues/748#issuecomment-37862691 by @mcornella and I have tested it on RHEL 5. --- lib/termsupport.zsh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 9c0a430fb..9d6681603 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -34,6 +34,5 @@ function omz_termsupport_preexec { title '$CMD' '%100>...>$LINE%<<' } -autoload -U add-zsh-hook -add-zsh-hook precmd omz_termsupport_precmd -add-zsh-hook preexec omz_termsupport_preexec +precmd_functions+=(omz_termsupport_precmd) +preexec_functions+=(omz_termsupport_preexec) From ac053f4211ef2da6b66bd148a930cfdddd12991f Mon Sep 17 00:00:00 2001 From: sachin21 <sachin21dev@gmail.com> Date: Sun, 24 Aug 2014 00:50:02 +0900 Subject: [PATCH 147/488] This alias is conflict cause --- lib/aliases.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index 3044c9660..aae865046 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -30,7 +30,6 @@ alias lsa='ls -lah' alias l='ls -lah' alias ll='ls -lh' alias la='ls -lAh' -alias sl=ls # often screw this up alias afind='ack-grep -il' From ee33cee83e78b53ca200b5647b024bcd93f8ee3d Mon Sep 17 00:00:00 2001 From: Igor Zoriy <gh@igorzoriy.com> Date: Tue, 26 Aug 2014 01:05:13 +0700 Subject: [PATCH 148/488] Added 'uninstall' command to brew completion --- plugins/brew/_brew | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/brew/_brew b/plugins/brew/_brew index 9eb3bb557..40442a1d3 100644 --- a/plugins/brew/_brew +++ b/plugins/brew/_brew @@ -50,6 +50,7 @@ _1st_arguments=( 'server:start a local web app that lets you browse formulae (requires Sinatra)' 'services:small wrapper around `launchctl` for supported formulae' 'tap:tap a new formula repository from GitHub, or list existing taps' + 'uninstall:uninstall a formula' 'unlink:unlink a formula' 'unpin:unpin specified formulae' 'untap:remove a tapped repository' From e20ce81c6663e354f9ef29618e7149800b9a3b26 Mon Sep 17 00:00:00 2001 From: Chris Smith <csmith@bloomhealthco.com> Date: Tue, 26 Aug 2014 08:34:17 -0500 Subject: [PATCH 149/488] Adding BBEdit plugin --- plugins/bbedit/bbedit.plugin.zsh | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 plugins/bbedit/bbedit.plugin.zsh diff --git a/plugins/bbedit/bbedit.plugin.zsh b/plugins/bbedit/bbedit.plugin.zsh new file mode 100644 index 000000000..6eec10f21 --- /dev/null +++ b/plugins/bbedit/bbedit.plugin.zsh @@ -0,0 +1,21 @@ +alias bbpb='pbpaste | bbedit --clean --view-top' + +alias bbd=bbdiff + +# +# If the bb command is called without an argument, launch BBEdit +# If bb is passed a directory, cd to it and open it in BBEdit +# If bb is passed a file, open it in BBEdit +# +function bb() { + if [[ -z $1 ]] + then + bbedit --launch + else + bbedit $1 + if [[ -d $1 ]] + then + cd $1 + fi + fi +} From 9eb2118c556b81e4eb0965d3e4bc024e35687aba Mon Sep 17 00:00:00 2001 From: Chris Smith <csmith@bloomhealthco.com> Date: Tue, 26 Aug 2014 08:36:16 -0500 Subject: [PATCH 150/488] Adding Marked 2 plugin --- plugins/marked/marked.plugin.zsh | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 plugins/marked/marked.plugin.zsh diff --git a/plugins/marked/marked.plugin.zsh b/plugins/marked/marked.plugin.zsh new file mode 100644 index 000000000..8c014372b --- /dev/null +++ b/plugins/marked/marked.plugin.zsh @@ -0,0 +1,12 @@ +# +# If marked is called without an argument, open Marked +# If marked is passed a file, open it in Marked +# +function marked() { + if [ $1 ] + then + open -a "marked 2.app" $1 + else + open -a "marked 2.app" + fi +} From 325c18736e82d0688f7437cefff23910ebd7cedd Mon Sep 17 00:00:00 2001 From: Chris Smith <csmith@bloomhealthco.com> Date: Tue, 26 Aug 2014 08:37:04 -0500 Subject: [PATCH 151/488] Adding Textastic plugin --- plugins/textastic/textastic.plugin.zsh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 plugins/textastic/textastic.plugin.zsh diff --git a/plugins/textastic/textastic.plugin.zsh b/plugins/textastic/textastic.plugin.zsh new file mode 100644 index 000000000..c34162139 --- /dev/null +++ b/plugins/textastic/textastic.plugin.zsh @@ -0,0 +1,17 @@ +# +# If the tt command is called without an argument, launch Textastic +# If tt is passed a directory, cd to it and open it in Textastic +# If tt is passed a file, open it in Textastic +# +function tt() { + if [[ -z $1 ]] + then + open -a "textastic.app" + else + open -a "textastic.app" $1 + if [[ -d $1 ]] + then + cd $1 + fi + fi +} From 362f2a56d276aebfb8da4e3244994f69899bbdbd Mon Sep 17 00:00:00 2001 From: Chris Smith <csmith@bloomhealthco.com> Date: Wed, 27 Aug 2014 08:27:31 -0500 Subject: [PATCH 152/488] Adding quotes around $1 --- plugins/textastic/textastic.plugin.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/textastic/textastic.plugin.zsh b/plugins/textastic/textastic.plugin.zsh index c34162139..f5901eae2 100644 --- a/plugins/textastic/textastic.plugin.zsh +++ b/plugins/textastic/textastic.plugin.zsh @@ -4,14 +4,14 @@ # If tt is passed a file, open it in Textastic # function tt() { - if [[ -z $1 ]] + if [[ -z "$1" ]] then open -a "textastic.app" else - open -a "textastic.app" $1 - if [[ -d $1 ]] + open -a "textastic.app" "$1" + if [[ -d "$1" ]] then - cd $1 + cd "$1" fi fi } From 9be81015d0fcb7864be9cdfe550aeee20c52bf7a Mon Sep 17 00:00:00 2001 From: Chris Smith <csmith@bloomhealthco.com> Date: Wed, 27 Aug 2014 08:31:18 -0500 Subject: [PATCH 153/488] Adding quotes around $1 --- plugins/marked/marked.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/marked/marked.plugin.zsh b/plugins/marked/marked.plugin.zsh index 8c014372b..56863ade5 100644 --- a/plugins/marked/marked.plugin.zsh +++ b/plugins/marked/marked.plugin.zsh @@ -3,9 +3,9 @@ # If marked is passed a file, open it in Marked # function marked() { - if [ $1 ] + if [ "$1" ] then - open -a "marked 2.app" $1 + open -a "marked 2.app" "$1" else open -a "marked 2.app" fi From 1b4d4266131eb760fc0cc25aab847a9c08d1c6de Mon Sep 17 00:00:00 2001 From: Chris Smith <csmith@bloomhealthco.com> Date: Wed, 27 Aug 2014 08:34:17 -0500 Subject: [PATCH 154/488] Adding quotes around $1 --- plugins/bbedit/bbedit.plugin.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/bbedit/bbedit.plugin.zsh b/plugins/bbedit/bbedit.plugin.zsh index 6eec10f21..fe9e72c65 100644 --- a/plugins/bbedit/bbedit.plugin.zsh +++ b/plugins/bbedit/bbedit.plugin.zsh @@ -8,14 +8,14 @@ alias bbd=bbdiff # If bb is passed a file, open it in BBEdit # function bb() { - if [[ -z $1 ]] + if [[ -z "$1" ]] then bbedit --launch else - bbedit $1 - if [[ -d $1 ]] + bbedit "$1" + if [[ -d "$1" ]] then - cd $1 + cd "$1" fi fi } From 1aadd63cfc98987c42033aeb4d7b826abf1f49ef Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Thu, 17 Jul 2014 13:46:06 +0200 Subject: [PATCH 155/488] Add CONTRIBUTING.md file general structure --- CONTRIBUTING.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) create mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md new file mode 100644 index 000000000..ae8865b35 --- /dev/null +++ b/CONTRIBUTING.md @@ -0,0 +1,26 @@ +# CONTRIBUTING GUIDELINE + +1. [Luke, use the search](#luke-use-the-search) +2. [You have a problem](#you-have-a-problem) +3. [You have a solution](#you-have-a-solution) + +**BONUS:** [You have free time to volunteer](#you-have-free-time-to-volunteer) + +## LUKE, USE THE SEARCH + +May the experiences of other people be with you + + +## YOU HAVE A PROBLEM + +See point 1, then look at FAQ or Troubleshooting wiki pages (first we'll have to make them) + + +## YOU HAVE A SOLUTION + +See point 1, then go ahead (unless your solution is yet another theme) + + +## YOU HAVE FREE TIME TO VOLUNTEER + +Cool! From 1e2abe5d4e1cbf29b1630292ec3eb32cb993f49e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Mon, 4 Aug 2014 23:04:53 +0200 Subject: [PATCH 156/488] Categories of issues in oh-my-zsh (work-in-progress) --- CONTRIBUTING.md | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index ae8865b35..9964c380d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -23,4 +23,20 @@ See point 1, then go ahead (unless your solution is yet another theme) ## YOU HAVE FREE TIME TO VOLUNTEER -Cool! +Cool! Please have a look at the list below to understand how oh-my-zsh categorizes its issues. + +Classification of issues and + +- Bugs, which may be: + - Specific of zsh \* + - Regressions, in which we should summon the author of the offending commit once it is located + +- Feature requests + +- Helpdesk, which may be: + - Specific of zsh \* + - Everything else + +\* In the case of bugs, I see the benefit in going through the trouble of responding to that. After all, oh-my-zsh should be the missing link that makes zsh perfect, and hunting down an upstream bug can lead to a submitted PR. +In the case of helpdesk, minimal response should be done. That is, provide a link to the wiki with the relevant information, or +add it to the FAQ of the wiki and point to it afterwards. From 25a3244353076cbffc8ddb2ee592b94b17383694 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Santiago=20Borraz=C3=A1s?= <sanbor@gmail.com> Date: Sat, 8 Dec 2012 15:31:13 -0300 Subject: [PATCH 157/488] Added a link to the file's license and added the commiter as plugin maintaner. --- plugins/pass/_pass | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/plugins/pass/_pass b/plugins/pass/_pass index d8ec38828..f03aa0169 100644 --- a/plugins/pass/_pass +++ b/plugins/pass/_pass @@ -4,10 +4,13 @@ # Copyright (C) 2012: # Johan Venant <jvenant@invicem.pro> # Brian Mattern <rephorm@rephorm.com> -# Jason A. Donenfeld <Jason@zx2c4.com>. -# Santiago Borrazás <sanbor@gmail.com> +# Jason A. Donenfeld <Jason@zx2c4.com> # All Rights Reserved. -# This file is licensed under the GPLv2+. Please see COPYING for more information. +# +# This file is licensed under the GPLv2+. +# Please visit http://git.zx2c4.com/password-store/tree/COPYING for more information. +# +# Oh my zsh plugin maintainer: Santiago Borrazás <sanbor@gmail.com> _pass () { From 17dd5792b4a34e65311fda6ab469b98f31cf30df Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Sat, 26 Jul 2014 23:23:13 +0200 Subject: [PATCH 158/488] Update pass completion to upstream Conflicts: plugins/pass/_pass --- plugins/pass/_pass | 26 ++++++++++++++++++++------ 1 file changed, 20 insertions(+), 6 deletions(-) diff --git a/plugins/pass/_pass b/plugins/pass/_pass index f03aa0169..9c4b669bd 100644 --- a/plugins/pass/_pass +++ b/plugins/pass/_pass @@ -1,10 +1,10 @@ #compdef pass #autoload -# Copyright (C) 2012: +# Copyright (C) 2012 - 2014: # Johan Venant <jvenant@invicem.pro> # Brian Mattern <rephorm@rephorm.com> -# Jason A. Donenfeld <Jason@zx2c4.com> +# Jason A. Donenfeld <Jason@zx2c4.com>. # All Rights Reserved. # # This file is licensed under the GPLv2+. @@ -26,8 +26,8 @@ _pass () { case "${cmd}" in init) _arguments : \ - "-r[re-encrypt existing passwords]" \ - "--reencrypt[re-encrypt existing passwords]" + "-p[gpg-id will only be applied to this subfolder]" \ + "--path[gpg-id will only be applied to this subfolder]" _pass_complete_keys ;; ls|list|edit) @@ -46,9 +46,19 @@ _pass () { "-n[don't include symbols in password]" \ "--no-symbols[don't include symbols in password]" \ "-c[copy password to the clipboard]" \ - "--clip[copy password to the clipboard]" + "--clip[copy password to the clipboard]" \ + "-f[force overwrite]" \ + "--force[force overwrite]" \ + "-i[replace first line]" \ + "--in-place[replace first line]" _pass_complete_entries_with_subdirs ;; + cp|copy|mv|rename) + _arguments : \ + "-f[force rename]" \ + "--force[force rename]" + _pass_complete_entries_with_subdirs + ;; rm) _arguments : \ "-f[force deletion]" \ @@ -78,10 +88,14 @@ _pass () { subcommands=( "init:Initialize new password storage" "ls:List passwords" + "find:Find password files or directories based on pattern" + "grep:Search inside decrypted password files for matching pattern" "show:Decrypt and print a password" "insert:Insert a new password" "generate:Generate a new password using pwgen" "edit:Edit a password with \$EDITOR" + "mv:Rename the password" + "cp:Copy the password" "rm:Remove the password" "git:Call git on the password store" "version:Output version information" @@ -104,7 +118,7 @@ _pass_cmd_show () { _pass_complete_entries_helper () { local IFS=$'\n' local prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store}" - _values -C 'passwords' $(find -L "$prefix" \( -name .git -o -name .gpg-id \) -prune -o $@ -print | sed -e "s#${prefix}.##" -e 's#\.gpg##' | sort) + _values -C 'passwords' $(find -L "$prefix" \( -name .git -o -name .gpg-id \) -prune -o $@ -print | sed -e "s#${prefix}/\{0,1\}##" -e 's#\.gpg##' | sort) } _pass_complete_entries_with_subdirs () { From 142a6c7fd5bcda6c45c25aca582972a7d4e1da85 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Sat, 26 Jul 2014 23:26:12 +0200 Subject: [PATCH 159/488] Fix pass zsh completion and autoloading When autocompleting from `pass <TAB>', sometimes the following errors appear: _values:compvalues:10: not enough arguments find: `/home/user/.password-store': No such file or directory _values:compvalues:10: not enough arguments find: `/home/user/.password-store': No such file or directory The `_values' error happens when there is no password-store folder *or* there are no passwords in pass; the `find' error only when there is no password-store folder. We can trace it back to line 108, which contains the only `_values' statement that is executed when we autocomplete from pass. We confirm this by following the trail of execution, which is _pass -> _pass_cmd_show -> _pass_complete_entries -> -> _pass_complete_entries_helper If we try running the command inside `$()' on line 104, we see that it returns nothing and the output is blank. This means that `_values' only receives 1 of its 2 mandatory parameters, therefore the above error is triggered (not enough arguments). That is unless we don't have a password-store folder, in which case the `find: [...] no such file or directory' error is *also* triggered. We solve the first error by supplying a default value of "" if the command outputs nothing, using the zsh construct ${var:-else}. We solve the second error by redirecting the find command's stderr output to /dev/null, so the error is effectively suppressed. * * * * This patch also fixes the first tab completion, which currently only loads the completion function definition. We do this by adding a `_pass' statement at the end of the file, which runs the `_pass' completion function after loading its definition. This is the standard way an autoloaded function works; for other examples look at zsh's official completion files. --- plugins/pass/_pass | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/pass/_pass b/plugins/pass/_pass index 9c4b669bd..7a9b1f955 100644 --- a/plugins/pass/_pass +++ b/plugins/pass/_pass @@ -118,7 +118,7 @@ _pass_cmd_show () { _pass_complete_entries_helper () { local IFS=$'\n' local prefix="${PASSWORD_STORE_DIR:-$HOME/.password-store}" - _values -C 'passwords' $(find -L "$prefix" \( -name .git -o -name .gpg-id \) -prune -o $@ -print | sed -e "s#${prefix}/\{0,1\}##" -e 's#\.gpg##' | sort) + _values -C 'passwords' ${$(find -L "$prefix" \( -name .git -o -name .gpg-id \) -prune -o $@ -print 2>/dev/null | sed -e "s#${prefix}/\{0,1\}##" -e 's#\.gpg##' | sort):-""} } _pass_complete_entries_with_subdirs () { @@ -134,3 +134,5 @@ _pass_complete_keys () { # Extract names and email addresses from gpg --list-keys _values 'gpg keys' $(gpg2 --list-secret-keys --with-colons | cut -d : -f 10 | sort -u | sed '/^$/d') } + +_pass From cd98283a92a5b2726e3164653e6b8c674eeedb92 Mon Sep 17 00:00:00 2001 From: Eduardo San Martin Morote <eduardo.san-martin-morote@ensimag.grenoble-inp.fr> Date: Fri, 29 Aug 2014 10:40:08 +0200 Subject: [PATCH 160/488] tmuxinator completion update: Current completion plugin isn't up to date and #2075 PR, which is also the completion plugin on the official tmuxinator repository, doesn't work. Thus this should do the trick for the moment. Also suppressed an error when no completion is available --- plugins/tmuxinator/_tmuxinator | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/tmuxinator/_tmuxinator b/plugins/tmuxinator/_tmuxinator index cd227b7df..e4f8b6ce0 100644 --- a/plugins/tmuxinator/_tmuxinator +++ b/plugins/tmuxinator/_tmuxinator @@ -11,10 +11,12 @@ _arguments -C \ case $state in cmds) _values "tmuxinator command" \ + "new[create a new project file and open it in your editor]" \ "start[start a tmux session using project's tmuxinator config]" \ "open[create a new project file and open it in your editor]" \ "copy[copy source_project project file to a new project called new_project]" \ "delete[deletes the project called project_name]" \ + "debug[output the shell commands generated by a projet]" \ "implode[deletes all existing projects!]" \ "list[list all existing projects]" \ "doctor[look for problems in your configuration]" \ @@ -24,9 +26,9 @@ case $state in ;; args) case $line[1] in - start|open|copy|delete) + start|open|copy|delete|debug) _configs=(`find ~/.tmuxinator -name \*.yml | cut -d/ -f5 | sed s:.yml::g`) - _values 'configs' $_configs + [[ -n "$_configs" ]] && _values 'configs' $_configs ret=0 ;; esac From f49220732904ed254400f14e621ea5ebe9e4a5f5 Mon Sep 17 00:00:00 2001 From: "Douglas S.D. Hall" <doug.hall@gmail.com> Date: Sat, 30 Aug 2014 17:20:28 +0100 Subject: [PATCH 161/488] Amended to source the original aws_zsh_completer.sh rather than the mangled version installed into $(brew-prefix)/bin if using homebrew installed awscli on OSX. This was discussed here - https://github.com/Homebrew/homebrew/issues/30268 --- plugins/aws/aws.plugin.zsh | 15 ++++++++++++++- 1 file changed, 14 insertions(+), 1 deletion(-) diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index 3f7fb1995..8b57d7db1 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -1,3 +1,11 @@ +_homebrew-installed() { + type brew &> /dev/null +} + +_awscli-homebrew-installed() { + brew --prefix awscli &> /dev/null +} + export AWS_HOME=~/.aws function agp { @@ -14,4 +22,9 @@ function aws_profiles { } compctl -K aws_profiles asp -source `which aws_zsh_completer.sh` + +if _homebrew-installed && _awscli-homebrew-installed ; then + source $(brew --prefix)/opt/awscli/libexec/bin/aws_zsh_completer.sh +else + source `which aws_zsh_completer.sh` +fi From 14f055d0bb737520edf6dfcf27d3e3d6e3aaa863 Mon Sep 17 00:00:00 2001 From: nervo <nervo@nervo.net> Date: Sun, 31 Aug 2014 15:41:02 +0200 Subject: [PATCH 162/488] Add Composer's local binaries to PATH --- plugins/composer/composer.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh index 86f2ca4df..2243dd3c1 100644 --- a/plugins/composer/composer.plugin.zsh +++ b/plugins/composer/composer.plugin.zsh @@ -47,5 +47,5 @@ alias cdu='composer dump-autoload' # install composer in the current directory alias cget='curl -s https://getcomposer.org/installer | php' -# Add Composer's global binaries to PATH -export PATH=$PATH:~/.composer/vendor/bin +# Add Composer's global & local binaries to PATH +export PATH=$PATH:~/.composer/vendor/bin:./bin From a8dad6fa87867ff2629a55e26f78175635a0ad06 Mon Sep 17 00:00:00 2001 From: Chris Smith <csmith@bloomhealthco.com> Date: Sun, 31 Aug 2014 12:55:46 -0500 Subject: [PATCH 163/488] Adding README.md --- plugins/textastic/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 plugins/textastic/README.md diff --git a/plugins/textastic/README.md b/plugins/textastic/README.md new file mode 100644 index 000000000..369c2c137 --- /dev/null +++ b/plugins/textastic/README.md @@ -0,0 +1,15 @@ +## textastic + +Plugin for Textastic, a text and code editor for Mac OS X + +### Requirements + + * [Textastic](http://www.textasticapp.com/mac.html) + +### Usage + + * If `tt` command is called without an argument, launch Textastic + + * If `tt` is passed a directory, cd to it and open it in Textastic + + * If `tt` is passed a file, open it in Textastic From d7f77f818d3f094f42e02554b3c697c0f3d26ed6 Mon Sep 17 00:00:00 2001 From: Chris Smith <csmith@bloomhealthco.com> Date: Sun, 31 Aug 2014 12:56:23 -0500 Subject: [PATCH 164/488] Adding README.md --- plugins/bbedit/README.md | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 plugins/bbedit/README.md diff --git a/plugins/bbedit/README.md b/plugins/bbedit/README.md new file mode 100644 index 000000000..ec2b743d6 --- /dev/null +++ b/plugins/bbedit/README.md @@ -0,0 +1,20 @@ +## bbedit + +Plugin for BBEdit, an HTML and text editor for Mac OS X + +### Requirements + + * [BBEdit](http://www.barebones.com/products/bbedit/) + * [BBEdit Command-Line Tools](http://www.barebones.com/support/bbedit/cmd-line-tools.html) + +### Usage + + * If the `bb` command is called without an argument, launch BBEdit + + * If `bb` is passed a directory, cd to it and open it in BBEdit + + * If `bb` is passed a file, open it in BBEdit + + * If `bbpb` create a new BBEdit document with the contents of the clipboard + + * If `bbd` alias for BBEdit diff tool From 9bf5b90c81ce2cbde321c3d6d97d5ff6d561b83c Mon Sep 17 00:00:00 2001 From: Chris Smith <csmith@bloomhealthco.com> Date: Sun, 31 Aug 2014 12:57:58 -0500 Subject: [PATCH 165/488] Adding README.md and renaming plugin --- plugins/marked2/README.md | 13 +++++++++++++ .../marked2.plugin.zsh} | 0 2 files changed, 13 insertions(+) create mode 100644 plugins/marked2/README.md rename plugins/{marked/marked.plugin.zsh => marked2/marked2.plugin.zsh} (100%) diff --git a/plugins/marked2/README.md b/plugins/marked2/README.md new file mode 100644 index 000000000..101343abb --- /dev/null +++ b/plugins/marked2/README.md @@ -0,0 +1,13 @@ +## marked2 + +Plugin for Marked 2, a previewer for Markdown files on Mac OS X + +### Requirements + + * [Marked 2](http://marked2app.com) + +### Usage + + * If `marked` is called without an argument, open Marked + + * If `marked` is passed a file, open it in Marked diff --git a/plugins/marked/marked.plugin.zsh b/plugins/marked2/marked2.plugin.zsh similarity index 100% rename from plugins/marked/marked.plugin.zsh rename to plugins/marked2/marked2.plugin.zsh From 9f8d7d85c2cacce54a5839d90b93e90b22228624 Mon Sep 17 00:00:00 2001 From: Robby Russell <robby@planetargon.com> Date: Sun, 31 Aug 2014 11:30:30 -0700 Subject: [PATCH 166/488] Adding link to the store for swag in upgrade process --- tools/upgrade.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 9a8497d96..5f0a81f1d 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -9,8 +9,8 @@ then printf '\033[0;32m%s\033[0m\n' '\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ ' printf '\033[0;32m%s\033[0m\n' ' /____/ ' printf '\033[0;34m%s\033[0m\n' 'Hooray! Oh My Zsh has been updated and/or is at the current version.' - printf '\033[0;34m%s\033[1m%s\033[0m\n' 'To keep up on the latest, be sure to follow Oh My Zsh on twitter: ' 'http://twitter.com/ohmyzsh' + printf '\033[0;34m%s\033[1m%s\033[0m\n' 'To keep up on the latest news and updates, follow us on twitter: ' 'http://twitter.com/ohmyzsh' + printf '\033[0;34m%s\033[1m%s\033[0m\n' 'Get your Oh My Zsh swag at: ' 'http://shop.planetargon.com/' else printf '\033[0;31m%s\033[0m\n' 'There was an error updating. Try again later?' fi - From 671bd0cf4f0face60883a2b476e75e6364d0154e Mon Sep 17 00:00:00 2001 From: Robby Russell <robby@planetargon.com> Date: Sun, 31 Aug 2014 11:32:07 -0700 Subject: [PATCH 167/488] Link to swag in installer... shameless profiting --- tools/install.sh | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/install.sh b/tools/install.sh index 7efab10b9..3ff897a01 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -43,5 +43,6 @@ echo "\033[0;32m"'\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ '"\033[0m echo "\033[0;32m"' /____/ ....is now installed!'"\033[0m" echo "\n\n \033[0;32mPlease look over the ~/.zshrc file to select plugins, themes, and options.\033[0m" echo "\n\n \033[0;32mp.s. Follow us at http://twitter.com/ohmyzsh.\033[0m" +echo "\n\n \033[0;32mp.p.s. Get stickers and t-shirts at http://shop.planetargon.com.\033[0m" env zsh . ~/.zshrc From 65f97a66c7fa2979ba454e9bcc578854912721d9 Mon Sep 17 00:00:00 2001 From: Tobias Preuss <tobias.preuss@googlemail.com> Date: Sun, 31 Aug 2014 21:42:49 +0200 Subject: [PATCH 168/488] Add README.md for adb-autocompletion plugin. --- plugins/adb/README.md | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 plugins/adb/README.md diff --git a/plugins/adb/README.md b/plugins/adb/README.md new file mode 100644 index 000000000..075beec0e --- /dev/null +++ b/plugins/adb/README.md @@ -0,0 +1,8 @@ +# adb autocomplete plugin + +* Adds autocomplete options for all adb commands. + + +## Requirements + +In order to make this work, you will need to have the Android adb tools set up in your path. From e7fdb028b52505947c7c3eb088586590f5b0b8cd Mon Sep 17 00:00:00 2001 From: Michael Stucki <michael.stucki@typo3.org> Date: Sun, 31 Aug 2014 23:50:59 +0200 Subject: [PATCH 169/488] Improve support for Vagrant VM definitions --- plugins/vagrant/_vagrant | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant index 9ddfa1be7..f842b4fbb 100644 --- a/plugins/vagrant/_vagrant +++ b/plugins/vagrant/_vagrant @@ -56,7 +56,7 @@ __box_list () __vm_list () { - _wanted application expl 'command' compadd $(command grep Vagrantfile -oe '^[^#]*\.vm\.define *:\([a-zA-Z0-9]\+\)' 2>/dev/null | cut -d: -f2) + _wanted application expl 'command' compadd $(command grep Vagrantfile -oe '^[^#]*\.vm\.define *[:"]\([a-zA-Z0-9_-]\+\)' 2>/dev/null | awk '{print substr($2, 2)}') } __vagrant-box () From 2b83accbf8d8668f4b46e449087317dc90a43873 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C3=96zg=C3=BCr?= <halil.ozgur@gmail.com> Date: Mon, 1 Sep 2014 04:14:03 +0300 Subject: [PATCH 170/488] Use the library function for ruby prompt Not everyone uses rvm and the library has already got a function for this. --- themes/half-life.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/half-life.zsh-theme b/themes/half-life.zsh-theme index 1bf4c7432..942affa94 100644 --- a/themes/half-life.zsh-theme +++ b/themes/half-life.zsh-theme @@ -95,4 +95,4 @@ function steeef_precmd { } add-zsh-hook precmd steeef_precmd -PROMPT=$'%{$purple%}%n%{$reset_color%} in %{$limegreen%}%~%{$reset_color%}$(rvm-prompt " with%{$fg[red]%} " v g "%{$reset_color%}")$vcs_info_msg_0_%{$orange%} λ%{$reset_color%} ' +PROMPT=$'%{$purple%}%n%{$reset_color%} in %{$limegreen%}%~%{$reset_color%}$(ruby_prompt_info " with%{$fg[red]%} " v g "%{$reset_color%}")$vcs_info_msg_0_%{$orange%} λ%{$reset_color%} ' From 9c1255d358fa98397ce20370fa3843199c663990 Mon Sep 17 00:00:00 2001 From: Letian Zhang <zlthooray@gmail.com> Date: Mon, 1 Sep 2014 09:49:31 +0800 Subject: [PATCH 171/488] fix missing add-zsh-hook in pygmalion.zsh-theme Fix "command not found: add-zsh-hook" since #3053 removes `autoload -U add-zsh-hook` --- themes/pygmalion.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/pygmalion.zsh-theme b/themes/pygmalion.zsh-theme index 654e0fc37..5f5fe7f9a 100644 --- a/themes/pygmalion.zsh-theme +++ b/themes/pygmalion.zsh-theme @@ -12,7 +12,7 @@ prompt_setup_pygmalion(){ base_prompt_nocolor=$(echo "$base_prompt" | perl -pe "s/%\{[^}]+\}//g") post_prompt_nocolor=$(echo "$post_prompt" | perl -pe "s/%\{[^}]+\}//g") - add-zsh-hook precmd prompt_pygmalion_precmd + precmd_functions+=(prompt_pygmalion_precmd) } prompt_pygmalion_precmd(){ From f0d5cfdc33561a16e26e9db2b2dbb9141eabe5c1 Mon Sep 17 00:00:00 2001 From: AJ Henriques <aj@10beat.com> Date: Sun, 31 Aug 2014 20:30:42 -0700 Subject: [PATCH 172/488] add git difftool alias (gdt) --- plugins/git/git.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 4b5ddf44c..bb1978f78 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -18,6 +18,7 @@ compdef _git gp=git-push alias gd='git diff' gdv() { git diff -w "$@" | view - } compdef _git gdv=git-diff +alias gdt='git difftool' alias gc='git commit -v' compdef _git gc=git-commit alias gc!='git commit -v --amend' From b8e10ca16d1caa55e3e6759b9130e32629986d98 Mon Sep 17 00:00:00 2001 From: Joshua Medeski <josh.medeski@gmail.com> Date: Sun, 31 Aug 2014 23:33:43 -0500 Subject: [PATCH 173/488] add wp-cli plugin readme --- plugins/wp-cli/README.md | 105 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 105 insertions(+) create mode 100644 plugins/wp-cli/README.md diff --git a/plugins/wp-cli/README.md b/plugins/wp-cli/README.md new file mode 100644 index 000000000..6dda07d17 --- /dev/null +++ b/plugins/wp-cli/README.md @@ -0,0 +1,105 @@ +# WP-CLI + +**Maintainer:** [joshmedeski](https://github.com/joshmedeski) + +WordPress Command Line Interface (http://wp-cli.org/) + +WP-CLI is a set of command-line tools for managing WordPress installations. You can update plugins, set up multisite installs and much more, without using a web browser. + +## List of Aliases + +### Core +- wpcc='wp core config' +- wpcd='wp core download' +- wpci='wp core install' +- wpcii='wp core is-installed' +- wpcmc='wp core multisite-convert' +- wpcmi='wp core multisite-install' +- wpcu='wp core update' +- wpcudb='wp core update-db' +- wpcvc='wp core verify-checksums' + +### Cron +- wpcre='wp cron event' +- wpcrs='wp cron schedule' +- wpcrt='wp cron test' + +### Menu +- wpmc='wp menu create' +- wpmd='wp menu delete' +- wpmi='wp menu item' +- wpml='wp menu list' +- wpmlo='wp menu location' + +### Plugin +- wppa='activate' +- wppda='deactivate' +- wppd='delete' +- wppg='get' +- wppi='install' +- wppis='is-installed' +- wppl='list' +- wppp='path' +- wpps='search' +- wppst='status' +- wppt='toggle' +- wppu='uninstall' +- wppu='update' + +### Post +- wppoc='wp post create' +- wppod='wp post delete' +- wppoe='wp post edit' +- wppogen='wp post generate' +- wppog='wp post get' +- wppol='wp post list' +- wppom='wp post meta' +- wppou='wp post update' +- wppou='wp post url' + +### Sidebar +- wpsbl='wp sidebar list' + +### Theme +- wpta='wp theme activate' +- wptd='wp theme delete' +- wptdis='wp theme disable' +- wpte='wp theme enable' +- wptg='wp theme get' +- wpti='wp theme install' +- wptis='wp theme is-installed' +- wptl='wp theme list' +- wptm='wp theme mod' +- wptp='wp theme path' +- wpts='wp theme search' +- wptst='wp theme status' +- wptu='wp theme updatet' + +### User +- wpuac='wp user add-cap' +- wpuar='wp user add-role' +- wpuc='wp user create' +- wpud='wp user delete' +- wpugen='wp user generate' +- wpug='wp user get' +- wpui='wp user import-csv' +- wpul='wp user list' +- wpulc='wp user list-caps' +- wpum='wp user meta' +- wpurc='wp user remove-cap' +- wpurr='wp user remove-role' +- wpusr='wp user set-role' +- wpuu='wp user update' + +### Widget +- wpwa='wp widget add' +- wpwda='wp widget deactivate' +- wpwd='wp widget delete' +- wpwl='wp widget list' +- wpwm='wp widget move' +- wpwu='wp widget update' + +The entire list of wp-cli commands can be found here: http://wp-cli.org/commands/ + +I only included the commands that are most used. Please feel free to contribute to this project if you want more commands. + From 39fb6c9d35a555674de36ea02a4ae4c226c387a4 Mon Sep 17 00:00:00 2001 From: Robby Russell <robby@planetargon.com> Date: Mon, 1 Sep 2014 12:59:47 +0200 Subject: [PATCH 174/488] Revert "Add a CONTRIBUTING file to instruct people on issues and pull requests" --- CONTRIBUTING.md | 42 ------------------------------------------ 1 file changed, 42 deletions(-) delete mode 100644 CONTRIBUTING.md diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md deleted file mode 100644 index 9964c380d..000000000 --- a/CONTRIBUTING.md +++ /dev/null @@ -1,42 +0,0 @@ -# CONTRIBUTING GUIDELINE - -1. [Luke, use the search](#luke-use-the-search) -2. [You have a problem](#you-have-a-problem) -3. [You have a solution](#you-have-a-solution) - -**BONUS:** [You have free time to volunteer](#you-have-free-time-to-volunteer) - -## LUKE, USE THE SEARCH - -May the experiences of other people be with you - - -## YOU HAVE A PROBLEM - -See point 1, then look at FAQ or Troubleshooting wiki pages (first we'll have to make them) - - -## YOU HAVE A SOLUTION - -See point 1, then go ahead (unless your solution is yet another theme) - - -## YOU HAVE FREE TIME TO VOLUNTEER - -Cool! Please have a look at the list below to understand how oh-my-zsh categorizes its issues. - -Classification of issues and - -- Bugs, which may be: - - Specific of zsh \* - - Regressions, in which we should summon the author of the offending commit once it is located - -- Feature requests - -- Helpdesk, which may be: - - Specific of zsh \* - - Everything else - -\* In the case of bugs, I see the benefit in going through the trouble of responding to that. After all, oh-my-zsh should be the missing link that makes zsh perfect, and hunting down an upstream bug can lead to a submitted PR. -In the case of helpdesk, minimal response should be done. That is, provide a link to the wiki with the relevant information, or -add it to the FAQ of the wiki and point to it afterwards. From a910aef0c4e33868d25e3410f1e8f8c9844b55c8 Mon Sep 17 00:00:00 2001 From: Robby Russell <robby@planetargon.com> Date: Mon, 1 Sep 2014 13:01:01 +0200 Subject: [PATCH 175/488] Revert "Add Composer's local binaries to PATH" --- plugins/composer/composer.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh index 2243dd3c1..86f2ca4df 100644 --- a/plugins/composer/composer.plugin.zsh +++ b/plugins/composer/composer.plugin.zsh @@ -47,5 +47,5 @@ alias cdu='composer dump-autoload' # install composer in the current directory alias cget='curl -s https://getcomposer.org/installer | php' -# Add Composer's global & local binaries to PATH -export PATH=$PATH:~/.composer/vendor/bin:./bin +# Add Composer's global binaries to PATH +export PATH=$PATH:~/.composer/vendor/bin From ed6c2c9106cdaf570da6f7a260c41ca1c4b4ed2a Mon Sep 17 00:00:00 2001 From: Philipp Wahala <philipp.wahala@gmail.com> Date: Wed, 3 Sep 2014 11:13:21 +0200 Subject: [PATCH 176/488] Symfony2 plugin use first console found --- plugins/symfony2/symfony2.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh index c8c102eee..fcb811fa5 100644 --- a/plugins/symfony2/symfony2.plugin.zsh +++ b/plugins/symfony2/symfony2.plugin.zsh @@ -1,7 +1,7 @@ # Symfony2 basic command completion _symfony_console () { - echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console')" + echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console' | head -n 1)" } _symfony2_get_command_list () { From 677d8b1a21c4b1d8cffef4cbfa259797a11f338a Mon Sep 17 00:00:00 2001 From: Philipp Wahala <philipp.wahala@gmail.com> Date: Wed, 3 Sep 2014 11:36:22 +0200 Subject: [PATCH 177/488] Symfony2 plugin look for files only --- plugins/symfony2/symfony2.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh index fcb811fa5..2783cd387 100644 --- a/plugins/symfony2/symfony2.plugin.zsh +++ b/plugins/symfony2/symfony2.plugin.zsh @@ -1,7 +1,7 @@ # Symfony2 basic command completion _symfony_console () { - echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console' | head -n 1)" + echo "php $(find . -maxdepth 2 -mindepth 1 -name 'console' -type f | head -n 1)" } _symfony2_get_command_list () { From 8d2dd8cc6a530e79ffdf307d444cb15430004efa Mon Sep 17 00:00:00 2001 From: Philipp Wahala <philipp.wahala@gmail.com> Date: Wed, 3 Sep 2014 11:58:52 +0200 Subject: [PATCH 178/488] Symfony2 plugin autocomplete for app/console and bin/console --- plugins/symfony2/symfony2.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh index 2783cd387..8df22e9ad 100644 --- a/plugins/symfony2/symfony2.plugin.zsh +++ b/plugins/symfony2/symfony2.plugin.zsh @@ -13,6 +13,8 @@ _symfony2 () { } compdef _symfony2 '`_symfony_console`' +compdef _symfony2 'app/console' +compdef _symfony2 'bin/console' compdef _symfony2 sf #Alias From ae901fa0d5163728de3dde787071df0e2fcf47d5 Mon Sep 17 00:00:00 2001 From: Michael Stucki <michael.stucki@typo3.org> Date: Tue, 11 Jun 2013 13:51:17 +0200 Subject: [PATCH 179/488] Support dynamically defined Vagrant machines --- plugins/vagrant/_vagrant | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant index f842b4fbb..0c82acd42 100644 --- a/plugins/vagrant/_vagrant +++ b/plugins/vagrant/_vagrant @@ -57,6 +57,7 @@ __box_list () __vm_list () { _wanted application expl 'command' compadd $(command grep Vagrantfile -oe '^[^#]*\.vm\.define *[:"]\([a-zA-Z0-9_-]\+\)' 2>/dev/null | awk '{print substr($2, 2)}') + _wanted application expl 'command' compadd $(command ls .vagrant/machines/ 2>/dev/null) } __vagrant-box () From 87fb118dd252d7e9b658c66c51b5e3cb905f10fb Mon Sep 17 00:00:00 2001 From: Matt Walker <matt@suckerfish.net> Date: Wed, 3 Sep 2014 12:01:29 -0700 Subject: [PATCH 180/488] Changed brew cmd to properly report if awscli is installed via homebrew --- plugins/aws/aws.plugin.zsh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index 8b57d7db1..de786725f 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -3,19 +3,17 @@ _homebrew-installed() { } _awscli-homebrew-installed() { - brew --prefix awscli &> /dev/null + brew list awscli &> /dev/null } export AWS_HOME=~/.aws function agp { echo $AWS_DEFAULT_PROFILE - } function asp { export AWS_DEFAULT_PROFILE=$1 - export RPROMPT="<aws:$AWS_DEFAULT_PROFILE>" - + export RPROMPT="<aws:$AWS_DEFAULT_PROFILE>" } function aws_profiles { reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_-]*\).*/\1/')) From 5e2591317810dba5d61f085faaf4e3050f90559c Mon Sep 17 00:00:00 2001 From: Robby Russell <robby@planetargon.com> Date: Thu, 4 Sep 2014 12:53:43 +0200 Subject: [PATCH 181/488] Revert "Exit early from git plugin if not in git repo." --- plugins/git/git.plugin.zsh | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index bb1978f78..bf7cd1ac9 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -125,14 +125,12 @@ alias gsd='git svn dcommit' # Usage example: git pull origin $(current_branch) # function current_branch() { - if [ ! -d .git ]; then return; fi 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() { - if [ ! -d .git ]; then return; fi 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) From 6855dd4727a395bfe8bd471c939819d907cb6c27 Mon Sep 17 00:00:00 2001 From: Markus Faerevaag <mafaer@gmail.com> Date: Sun, 7 Sep 2014 21:56:34 +0200 Subject: [PATCH 182/488] [wd] New minor version (v0.4) --- plugins/wd/README.md | 110 ++++++++++- plugins/wd/_wd.sh | 6 +- plugins/wd/wd.sh | 460 +++++++++++++++++++++++++++++-------------- 3 files changed, 426 insertions(+), 150 deletions(-) diff --git a/plugins/wd/README.md b/plugins/wd/README.md index bc0ebe334..bcfeab684 100644 --- a/plugins/wd/README.md +++ b/plugins/wd/README.md @@ -1,8 +1,60 @@ -## wd +wd +== + +[](https://travis-ci.org/mfaerevaag/wd) + +`wd` (*warp directory*) lets you jump to custom directories in zsh, without using `cd`. Why? Because `cd` seems ineffecient when the folder is frequently visited or has a long path. + + +### Setup + +### oh-my-zsh + +`wd` comes bundles with [oh-my-zshell](https://github.com/robbyrussell/oh-my-zsh)! + +Just add the plugin in your `~/.zshrc` file: + + plugins=(... wd) + + +#### Automatic + +Run either in terminal: + + * `curl -L https://github.com/mfaerevaag/wd/raw/master/install.sh | sh` + + * `wget --no-check-certificate https://github.com/mfaerevaag/wd/raw/master/install.sh -O - | sh` + + +#### Manual + + * Clone this repo to your liking + + * Add `wd` function to `.zshrc` (or `.profile` etc.): + + wd() { + . ~/paht/to/wd/wd.sh + } + + * Install manpage. From `wd`'s base directory (requires root permissions): + + # cp wd.1 /usr/share/man/man1/wd.1 + # chmod 644 /usr/share/man/man1/wd.1 + + Note, when pulling and updating `wd`, you'll need to do this again in case of changes to the manpage. + + +#### Completion + +If you're NOT using [oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh) and you want to utelize the zsh-completion feature, you will also need to add the path to your `wd` installation (`~/bin/wd` if you used the automatic installer) to your `fpath`. E.g. in your `~/.zshrc`: + + fpath=(~/path/to/wd $fpath) + +Also, you may have to force a rebuild of `zcompdump` by running: + + $ rm -f ~/.zcompdump; compinit -**Maintainer:** [mfaerevaag](https://github.com/mfaerevaag) -`wd` (*warp directory*) lets you jump to custom directories in zsh, without using `cd`. Why? Because `cd` seems ineffecient when the folder is frequently visited or has a long path. [Source](https://github.com/mfaerevaag/wd) ### Usage @@ -24,6 +76,7 @@ $ wd ... This is a wrapper for the zsh `dirs` function. + (You might need `setopt AUTO_PUSHD` in your `.zshrc` if you hare not using [oh-my-zshell](https://github.com/robbyrussell/oh-my-zsh)). * Remove warp point test point: @@ -33,8 +86,55 @@ $ wd ls - * List warp points to current directory + * List warp points to current directory, or optionally, path to given warp point: $ wd show - * Print usage with no opts or the `help` argument. + * Remove warp points to non-existent directories. + + $ wd clean + + Use `clean!` to not be prompted with confirmation (force). + + * Print usage with no opts or the `help` argument: + + $ wd help + + * Print the running version of `wd`: + + $ wd --version + + * Specifically set the config file (default `~/.warprc`), which is useful when testing: + + $ wd --config ./file <action> + + * Force `exit` with return code after running. This is not default, as it will *exit your terminal*, though required when testing/debugging. + + $ wd --debug <action> + + * Silence all output: + + $ wd --quiet <action> + + +### Testing + +`wd` comes with a small test suite, run with [shunit2](https://code.google.com/p/shunit2/). This can be used to confirm that things are working as it should on your setup, or to demonstrate an issue. + +To run, simply `cd` into the `test` directory and run the `tests.sh`. + + $ ./tests.sh + + +### License + +The project is licensed under the [MIT-license](https://github.com/mfaerevaag/wd/blob/master/LICENSE). + + +### Finally + +If you have issues, feedback or improvements, don't hesitate to report it or submit a pull-request. In the case of an issue, we would much appreciate if you would include a failing test in `test/tests.sh`. Explanation on how to run the tests, read the section "Testing" in this README. + +Credit to [altschuler](https://github.com/altschuler) for awesome idea. + +Hope you enjoy! diff --git a/plugins/wd/_wd.sh b/plugins/wd/_wd.sh index 0b03d8fff..2bb58dd31 100644 --- a/plugins/wd/_wd.sh +++ b/plugins/wd/_wd.sh @@ -21,7 +21,8 @@ function _wd() { 'add!:Overwrites existing warp point' 'rm:Removes the given warp point' 'ls:Outputs all stored warp points' - 'show:Outputs all warp points that point to the current directory' + 'show:Outputs all warp points that point to the current directory or shows a specific target directory for a point' + 'show:Outputs all warp points that point to the current directory or shows a specific target directory for a point' 'help:Show this extremely helpful text' '..:Go back to last directory' ) @@ -43,6 +44,9 @@ function _wd() { add) _message 'Write the name of your warp point' && ret=0 ;; + show) + _describe -t points "Warp points" warp_points && ret=0 + ;; esac ;; esac diff --git a/plugins/wd/wd.sh b/plugins/wd/wd.sh index dfb9ad89a..4e45b48e1 100755 --- a/plugins/wd/wd.sh +++ b/plugins/wd/wd.sh @@ -7,25 +7,301 @@ # # @github.com/mfaerevaag/wd - -## variables -readonly CONFIG=$HOME/.warprc +# version +readonly WD_VERSION=0.4 # colors -readonly BLUE="\033[96m" -readonly GREEN="\033[92m" -readonly YELLOW="\033[93m" -readonly RED="\033[91m" -readonly NOC="\033[m" +readonly WD_BLUE="\033[96m" +readonly WD_GREEN="\033[92m" +readonly WD_YELLOW="\033[93m" +readonly WD_RED="\033[91m" +readonly WD_NOC="\033[m" +## functions -## init +# helpers +wd_yesorno() +{ + # variables + local question="${1}" + local prompt="${question} " + local yes_RETVAL="0" + local no_RETVAL="3" + local RETVAL="" + local answer="" + + # read-eval loop + while true ; do + printf $prompt + read -r answer + + case ${answer:=${default}} in + Y|y|YES|yes|Yes ) + RETVAL=${yes_RETVAL} && \ + break + ;; + N|n|NO|no|No ) + RETVAL=${no_RETVAL} && \ + break + ;; + * ) + echo "Please provide a valid answer (y or n)" + ;; + esac + done + + return ${RETVAL} +} + +wd_print_msg() +{ + if [[ -z $wd_quiet_mode ]] + then + local color=$1 + local msg=$2 + + if [[ $color == "" || $msg == "" ]] + then + print " ${WD_RED}*${WD_NOC} Could not print message. Sorry!" + else + print " ${color}*${WD_NOC} ${msg}" + fi + fi +} + +wd_print_usage() +{ + cat <<- EOF +Usage: wd [command] <point> + +Commands: + add <point> Adds the current working directory to your warp points + add! <point> Overwrites existing warp point + rm <point> Removes the given warp point + show Print warp points to current directory + show <point> Print path to given warp point + ls Print all stored warp points + clean! Remove points warping to nonexistent directories + + -v | --version Print version + -d | --debug Exit after execution with exit codes (for testing) + -c | --config Specify config file (default ~/.warprc) + -q | --quiet Suppress all output + + help Show this extremely helpful text +EOF +} + +wd_exit_fail() +{ + local msg=$1 + + wd_print_msg $WD_RED $1 + WD_EXIT_CODE=1 +} + +wd_exit_warn() +{ + local msg=$1 + + wd_print_msg $WD_YELLOW $msg + WD_EXIT_CODE=1 +} + +# core + +wd_warp() +{ + local point=$1 + + if [[ $point =~ "^\.+$" ]] + then + if [ $#1 < 2 ] + then + wd_exit_warn "Warping to current directory?" + else + (( n = $#1 - 1 )) + cd -$n > /dev/null + fi + elif [[ ${points[$point]} != "" ]] + then + cd ${points[$point]} + else + wd_exit_fail "Unknown warp point '${point}'" + fi +} + +wd_add() +{ + local force=$1 + local point=$2 + + if [[ $point =~ "^[\.]+$" ]] + then + wd_exit_fail "Warp point cannot be just dots" + elif [[ $point =~ "(\s|\ )+" ]] + then + wd_exit_fail "Warp point should not contain whitespace" + elif [[ $point == *:* ]] + then + wd_exit_fail "Warp point cannot contain colons" + elif [[ $point == "" ]] + then + wd_exit_fail "Warp point cannot be empty" + elif [[ ${points[$2]} == "" ]] || $force + then + wd_remove $point > /dev/null + printf "%q:%q\n" "${point}" "${PWD}" >> $WD_CONFIG + + wd_print_msg $WD_GREEN "Warp point added" + + # override exit code in case wd_remove did not remove any points + # TODO: we should handle this kind of logic better + WD_EXIT_CODE=0 + else + wd_exit_warn "Warp point '${point}' already exists. Use 'add!' to overwrite." + fi +} + +wd_remove() +{ + local point=$1 + + if [[ ${points[$point]} != "" ]] + then + local config_tmp=$WD_CONFIG.tmp + if sed -n "/^${point}:.*$/!p" $WD_CONFIG > $config_tmp && mv $config_tmp $WD_CONFIG + then + wd_print_msg $WD_GREEN "Warp point removed" + else + wd_exit_fail "Something bad happened! Sorry." + fi + else + wd_exit_fail "Warp point was not found" + fi +} + +wd_list_all() +{ + wd_print_msg $WD_BLUE "All warp points:" + + while IFS= read -r line + do + if [[ $line != "" ]] + then + arr=(${(s,:,)line}) + key=${arr[1]} + val=${arr[2]} + + if [[ -z $wd_quiet_mode ]] + then + printf "%20s -> %s\n" $key $val + fi + fi + done <<< $(sed "s:${HOME}:~:g" $WD_CONFIG) +} + +wd_show() +{ + local name_arg=$1 + # if there's an argument we look up the value + if [[ ! -z $name_arg ]] + then + if [[ -z $points[$name_arg] ]] + then + wd_print_msg $WD_BLUE "No warp point named $name_arg" + else + wd_print_msg $WD_GREEN "Warp point: ${WD_GREEN}$name_arg${WD_NOC} -> $points[$name_arg]" + fi + else + # hax to create a local empty array + local wd_matches + wd_matches=() + # do a reverse lookup to check whether PWD is in $points + if [[ ${points[(r)$PWD]} == $PWD ]] + then + for name in ${(k)points} + do + if [[ $points[$name] == $PWD ]] + then + wd_matches[$(($#wd_matches+1))]=$name + fi + done + + wd_print_msg $WD_BLUE "$#wd_matches warp point(s) to current directory: ${WD_GREEN}$wd_matches${WD_NOC}" + else + wd_print_msg $WD_BLUE "No warp points to $cwd" + fi + fi +} + +wd_clean() { + local force=$1 + local count=0 + local wd_tmp="" + + while read line + do + if [[ $line != "" ]] + then + arr=(${(s,:,)line}) + key=${arr[1]} + val=${arr[2]} + + if [ -d "$val" ] + then + wd_tmp=$wd_tmp"\n"`echo $line` + else + wd_print_msg $WD_YELLOW "Nonexistent directory: ${key} -> ${val}" + count=$((count+1)) + fi + fi + done < $WD_CONFIG + + if [[ $count -eq 0 ]] + then + wd_print_msg $WD_BLUE "No warp points to clean, carry on!" + else + if $force || wd_yesorno "Removing ${count} warp points. Continue? (Y/n)" + then + echo $wd_tmp >! $WD_CONFIG + wd_print_msg $WD_GREEN "Cleanup complete. ${count} warp point(s) removed" + else + wd_print_msg $WD_BLUE "Cleanup aborted" + fi + fi +} + +local WD_CONFIG=$HOME/.warprc +local WD_QUIET=0 +local WD_EXIT_CODE=0 +local WD_DEBUG=0 + +# Parse 'meta' options first to avoid the need to have them before +# other commands. The `-D` flag consumes recognized options so that +# the actual command parsing won't be affected. + +zparseopts -D -E \ + c:=wd_alt_config -config:=wd_alt_config \ + q=wd_quiet_mode -quiet=wd_quiet_mode \ + v=wd_print_version -version=wd_print_version \ + d=wd_debug_mode -debug=wd_debug_mode + +if [[ ! -z $wd_print_version ]] +then + echo "wd version $WD_VERSION" +fi + +if [[ ! -z $wd_alt_config ]] +then + WD_CONFIG=$wd_alt_config[2] +fi # check if config file exists -if [ ! -e $CONFIG ] +if [ ! -e $WD_CONFIG ] then # if not, create config file - touch $CONFIG + touch $WD_CONFIG fi # load warp points @@ -37,149 +313,26 @@ do val=${arr[2]} points[$key]=$val -done < $CONFIG - - -## functions - -wd_warp() -{ - local point=$1 - - if [[ $point =~ "^\.+$" ]] - then - if [ $#1 < 2 ] - then - wd_print_msg $YELLOW "Warping to current directory?" - else - (( n = $#1 - 1 )) - cd -$n > /dev/null - fi - elif [[ ${points[$point]} != "" ]] - then - cd ${points[$point]} - else - wd_print_msg $RED "Unknown warp point '${point}'" - fi -} - -wd_add() -{ - local force=$1 - local point=$2 - - if [[ $point =~ "^[\.]+$" ]] - then - wd_print_msg $RED "Warp point cannot be just dots" - elif [[ $point =~ "(\s|\ )+" ]] - then - wd_print_msg $RED "Warp point should not contain whitespace" - elif [[ $point == *:* ]] - then - wd_print_msg $RED "Warp point cannot contain colons" - elif [[ $point == "" ]] - then - wd_print_msg $RED "Warp point cannot be empty" - elif [[ ${points[$2]} == "" ]] || $force - then - wd_remove $point > /dev/null - printf "%q:%q\n" "${point}" "${PWD}" >> $CONFIG - - wd_print_msg $GREEN "Warp point added" - else - wd_print_msg $YELLOW "Warp point '${point}' already exists. Use 'add!' to overwrite." - fi -} - -wd_remove() -{ - local point=$1 - - if [[ ${points[$point]} != "" ]] - then - if sed -i.bak "s,^${point}:.*$,,g" $CONFIG - then - wd_print_msg $GREEN "Warp point removed" - else - wd_print_msg $RED "Something bad happened! Sorry." - fi - else - wd_print_msg $RED "Warp point was not found" - fi -} - -wd_list_all() -{ - wd_print_msg $BLUE "All warp points:" - - while IFS= read -r line - do - if [[ $line != "" ]] - then - arr=(${(s,:,)line}) - key=${arr[1]} - val=${arr[2]} - - printf "%20s -> %s\n" $key $val - fi - done <<< $(sed "s:${HOME}:~:g" $CONFIG) -} - -wd_show() -{ - local cwd=$(print $PWD | sed "s:^${HOME}:~:") - - wd_print_msg $BLUE "Warp points to current directory:" - wd_list_all | grep -e "${cwd}$" -} - -wd_print_msg() -{ - local color=$1 - local msg=$2 - - if [[ $color == "" || $msg == "" ]] - then - print " ${RED}*${NOC} Could not print message. Sorry!" - else - print " ${color}*${NOC} ${msg}" - fi -} - -wd_print_usage() -{ - cat <<- EOF -Usage: wd [add|-a|--add] [rm|-r|--remove] <point> - -Commands: - add Adds the current working directory to your warp points - add! Overwrites existing warp point - rm Removes the given warp point - show Outputs warp points to current directory - ls Outputs all stored warp points - help Show this extremely helpful text -EOF -} - - -## run +done < $WD_CONFIG # get opts -args=$(getopt -o a:r:lhs -l add:,rm:,ls,help,show -- $*) +args=$(getopt -o a:r:c:lhs -l add:,rm:,clean\!,ls,help,show -- $*) -# check if no arguments were given -if [[ $? -ne 0 || $#* -eq 0 ]] +# check if no arguments were given, and that version is not set +if [[ ($? -ne 0 || $#* -eq 0) && -z $wd_print_version ]] then wd_print_usage -# check if config file is writeable -elif [ ! -w $CONFIG ] + # check if config file is writeable +elif [ ! -w $WD_CONFIG ] then # do nothing # can't run `exit`, as this would exit the executing shell - wd_print_msg $RED "\'$CONFIG\' is not writeable." + wd_exit_fail "\'$WD_CONFIG\' is not writeable." else + + # parse rest of options for o do case "$o" @@ -205,7 +358,15 @@ else break ;; -s|--show|show) - wd_show + wd_show $2 + break + ;; + -c|--clean|clean) + wd_clean false + break + ;; + -c!|--clean!|clean!) + wd_clean true break ;; *) @@ -229,8 +390,19 @@ unset wd_remove unset wd_show unset wd_list_all unset wd_print_msg +unset wd_yesorno unset wd_print_usage +unset wd_alt_config +unset wd_quiet_mode +unset wd_print_version unset args unset points unset val &> /dev/null # fixes issue #1 + +if [[ ! -z $wd_debug_mode ]] +then + exit $WD_EXIT_CODE +else + unset wd_debug_mode +fi From b5093859af472c04dfca33adfeba49bfbe417c9d Mon Sep 17 00:00:00 2001 From: Markus Faerevaag <mafaer@gmail.com> Date: Mon, 8 Sep 2014 09:09:44 +0200 Subject: [PATCH 183/488] [wd] Minor bug fix in show command --- plugins/wd/wd.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/wd/wd.sh b/plugins/wd/wd.sh index 4e45b48e1..d63e92472 100755 --- a/plugins/wd/wd.sh +++ b/plugins/wd/wd.sh @@ -230,7 +230,7 @@ wd_show() wd_print_msg $WD_BLUE "$#wd_matches warp point(s) to current directory: ${WD_GREEN}$wd_matches${WD_NOC}" else - wd_print_msg $WD_BLUE "No warp points to $cwd" + wd_print_msg $WD_YELLOW "No warp point to $(echo $PWD | sed "s:$HOME:~:")" fi fi } From 7a5d68c96332b5f50969f75384f67694639dbce2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Halil=20=C3=96zg=C3=BCr?= <halil.ozgur@gmail.com> Date: Sat, 13 Sep 2014 10:30:16 +0300 Subject: [PATCH 184/488] Remove j alias for autojump j alias conflicts with autojump's j() function. Fixes #2989 --- plugins/common-aliases/common-aliases.plugin.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh index 228a39da0..90d59910c 100644 --- a/plugins/common-aliases/common-aliases.plugin.zsh +++ b/plugins/common-aliases/common-aliases.plugin.zsh @@ -46,7 +46,6 @@ alias ff='find . -type f -name' alias h='history' alias hgrep="fc -El 0 | grep" alias help='man' -alias j='jobs' alias p='ps -f' alias sortnr='sort -n -r' alias unexport='unset' From 1e7c6743a7b221cb2069a84c70890014597672d8 Mon Sep 17 00:00:00 2001 From: Giel van Schijndel <giel.van.schijndel@sioux.eu> Date: Mon, 15 Sep 2014 15:36:34 +0200 Subject: [PATCH 185/488] sudo: maintain cursor position I.e. when prefixing the current command-line with 'sudo ' maintain the current cursor position instead of jumping to the end of the line. --- plugins/sudo/sudo.plugin.zsh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/sudo/sudo.plugin.zsh b/plugins/sudo/sudo.plugin.zsh index d12e06853..e3ba39918 100644 --- a/plugins/sudo/sudo.plugin.zsh +++ b/plugins/sudo/sudo.plugin.zsh @@ -13,9 +13,8 @@ # ------------------------------------------------------------------------------ sudo-command-line() { -[[ -z $BUFFER ]] && zle up-history -[[ $BUFFER != sudo\ * ]] && BUFFER="sudo $BUFFER" -zle end-of-line + [[ -z $BUFFER ]] && zle up-history + [[ $BUFFER != sudo\ * ]] && LBUFFER="sudo $LBUFFER" } zle -N sudo-command-line # Defined shortcut keys: [Esc] [Esc] From eb0549750fccde126584d6be59df8d2d62882750 Mon Sep 17 00:00:00 2001 From: Peter Butkovic <butkovic@gmail.com> Date: Tue, 16 Sep 2014 10:35:43 +0200 Subject: [PATCH 186/488] additional tmux aliases --- plugins/tmux/tmux.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/tmux/tmux.plugin.zsh b/plugins/tmux/tmux.plugin.zsh index 626c41f3d..bc32c8907 100644 --- a/plugins/tmux/tmux.plugin.zsh +++ b/plugins/tmux/tmux.plugin.zsh @@ -5,6 +5,8 @@ alias ta='tmux attach -t' alias ts='tmux new-session -s' alias tl='tmux list-sessions' +alias tksv='tmux kill-server' +alias tkss='tmux kill-session -t' # Only run if tmux is actually installed if which tmux &> /dev/null From b0013ceb29e4214a76c92bfbdc0d87354c374277 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Rodrigo=20Ram=C3=ADrez=20Norambuena?= <decipher.hk@gmail.com> Date: Mon, 15 Sep 2014 12:13:43 -0300 Subject: [PATCH 187/488] remove path not found for linuxonly theme --- themes/linuxonly.zsh-theme | 1 - 1 file changed, 1 deletion(-) diff --git a/themes/linuxonly.zsh-theme b/themes/linuxonly.zsh-theme index a11b80d7f..f9e0aa07d 100644 --- a/themes/linuxonly.zsh-theme +++ b/themes/linuxonly.zsh-theme @@ -13,7 +13,6 @@ local c7=$(printf "\033[38;5;149m") local c8=$(printf "\033[38;5;126m") local c9=$(printf "\033[38;5;162m") -local foopath=$(perl /home/scp1/bin/foopath) if [ "$TERM" = "linux" ]; then c1=$(printf "\033[34;1m") From 5f38a537cef0d79c9d53c01e8f88d150e985c70a Mon Sep 17 00:00:00 2001 From: Moinak Ghosh <moinakg@gmail.com> Date: Tue, 16 Sep 2014 22:29:52 +0530 Subject: [PATCH 188/488] Update Solaris changes to use OSTYPE and zsh datetime module. --- lib/completion.zsh | 2 +- oh-my-zsh.sh | 1 - plugins/colored-man/colored-man.plugin.zsh | 2 +- tools/check_for_upgrade.sh | 12 ++++-------- 4 files changed, 6 insertions(+), 11 deletions(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index faea36118..83b6efb66 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -25,7 +25,7 @@ bindkey -M menuselect '^o' accept-and-infer-next-history zstyle ':completion:*:*:*:*:*' menu select zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' -if [ "$PLAT" = "SunOS" ] +if [ "$OSTYPE[0,7]" = "solaris" ] then zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm" else diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 4683c2bc0..c217b91bb 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -1,4 +1,3 @@ -PLAT=`uname -s` # Check for updates on initial load... if [ "$DISABLE_AUTO_UPDATE" != "true" ]; then /usr/bin/env ZSH=$ZSH DISABLE_UPDATE_PROMPT=$DISABLE_UPDATE_PROMPT zsh -f $ZSH/tools/check_for_upgrade.sh diff --git a/plugins/colored-man/colored-man.plugin.zsh b/plugins/colored-man/colored-man.plugin.zsh index 4956f4346..5c613f49d 100644 --- a/plugins/colored-man/colored-man.plugin.zsh +++ b/plugins/colored-man/colored-man.plugin.zsh @@ -1,4 +1,4 @@ -if [ "${PLAT}" = "SunOS" ] +if [ "$OSTYPE[0,7]" = "solaris" ] then if [ ! -x ${HOME}/bin/nroff ] then diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 1aba9a272..0e8845ab4 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -1,13 +1,9 @@ -#!/bin/sh +#!/usr/bin/env zsh + +zmodload zsh/datetime -PLAT=`uname -s` function _current_epoch() { - if [ "$PLAT" = "SunOS" ] - then - echo $(($(perl -e 'print time') / 60 / 60 / 24)) - else - echo $(($(date +%s) / 60 / 60 / 24)) - fi + echo $EPOCHSECONDS } function _update_zsh_update() { From 90762eee49efcdfd6b92ad5d5d9e5f43d113ae0b Mon Sep 17 00:00:00 2001 From: Moinak Ghosh <moinakg@gmail.com> Date: Wed, 17 Sep 2014 11:11:48 +0530 Subject: [PATCH 189/488] Convert epoch_target from days to seconds. --- tools/check_for_upgrade.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 0e8845ab4..f49bb151f 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -22,6 +22,8 @@ if [[ -z "$epoch_target" ]]; then epoch_target=13 fi +epoch_target_seconds=$((epoch_target * 86400)) + [ -f ~/.profile ] && source ~/.profile # Cancel upgrade if the current user doesn't have write permissions for the @@ -37,7 +39,7 @@ then fi epoch_diff=$(($(_current_epoch) - $LAST_EPOCH)) - if [ $epoch_diff -gt $epoch_target ] + if [ $epoch_diff -gt $epoch_target_seconds ] then if [ "$DISABLE_UPDATE_PROMPT" = "true" ] then From 3a3973284534c318e2cb987a0db1121302d04e10 Mon Sep 17 00:00:00 2001 From: Moinak Ghosh <moinakg@gmail.com> Date: Tue, 14 Oct 2014 12:05:01 +0530 Subject: [PATCH 190/488] Change to epoch target in days instead of seconds. --- tools/check_for_upgrade.sh | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index f49bb151f..a8ba4820c 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -3,7 +3,7 @@ zmodload zsh/datetime function _current_epoch() { - echo $EPOCHSECONDS + echo $(( $EPOCHSECONDS / 60 / 60 / 24 )) } function _update_zsh_update() { @@ -22,8 +22,6 @@ if [[ -z "$epoch_target" ]]; then epoch_target=13 fi -epoch_target_seconds=$((epoch_target * 86400)) - [ -f ~/.profile ] && source ~/.profile # Cancel upgrade if the current user doesn't have write permissions for the @@ -39,7 +37,7 @@ then fi epoch_diff=$(($(_current_epoch) - $LAST_EPOCH)) - if [ $epoch_diff -gt $epoch_target_seconds ] + if [ $epoch_diff -gt $epoch_target ] then if [ "$DISABLE_UPDATE_PROMPT" = "true" ] then From 71ee0d7b2bc717e815cddc9ee8e062f84587d2c4 Mon Sep 17 00:00:00 2001 From: Nikhil Gupta <me@nikhgupta.com> Date: Sun, 12 Oct 2014 08:30:08 +0530 Subject: [PATCH 191/488] added support for GNU version of `date` --- plugins/emoji-clock/emoji-clock.plugin.zsh | 28 ++++++++++++---------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/plugins/emoji-clock/emoji-clock.plugin.zsh b/plugins/emoji-clock/emoji-clock.plugin.zsh index a69446e3c..0a55528f0 100644 --- a/plugins/emoji-clock/emoji-clock.plugin.zsh +++ b/plugins/emoji-clock/emoji-clock.plugin.zsh @@ -8,21 +8,25 @@ # ----------------------------------------------------------------------------- function emoji-clock() { - hour=$(date -v '+15M' '+%I') - minutes=$(date -v '+15M' '+%M') + # Add 15 minutes to the current time and save the value as $minutes. + (( minutes = $(date '+%M') + 15 )) + (( hour = $(date '+%I') + minutes / 60 )) + # make sure minutes and hours don't exceed 60 nor 12 respectively + (( minutes %= 60 )); (( hour %= 12 )) + case $hour in - 01) clock="🕐"; [ $minutes -ge 30 ] && clock="🕜";; - 02) clock="🕑"; [ $minutes -ge 30 ] && clock="🕝";; - 03) clock="🕒"; [ $minutes -ge 30 ] && clock="🕞";; - 04) clock="🕓"; [ $minutes -ge 30 ] && clock="🕟";; - 05) clock="🕔"; [ $minutes -ge 30 ] && clock="🕠";; - 06) clock="🕕"; [ $minutes -ge 30 ] && clock="🕡";; - 07) clock="🕖"; [ $minutes -ge 30 ] && clock="🕢";; - 08) clock="🕗"; [ $minutes -ge 30 ] && clock="🕣";; - 09) clock="🕘"; [ $minutes -ge 30 ] && clock="🕤";; + 0) clock="🕛"; [ $minutes -ge 30 ] && clock="🕧";; + 1) clock="🕐"; [ $minutes -ge 30 ] && clock="🕜";; + 2) clock="🕑"; [ $minutes -ge 30 ] && clock="🕝";; + 3) clock="🕒"; [ $minutes -ge 30 ] && clock="🕞";; + 4) clock="🕓"; [ $minutes -ge 30 ] && clock="🕟";; + 5) clock="🕔"; [ $minutes -ge 30 ] && clock="🕠";; + 6) clock="🕕"; [ $minutes -ge 30 ] && clock="🕡";; + 7) clock="🕖"; [ $minutes -ge 30 ] && clock="🕢";; + 8) clock="🕗"; [ $minutes -ge 30 ] && clock="🕣";; + 9) clock="🕘"; [ $minutes -ge 30 ] && clock="🕤";; 10) clock="🕙"; [ $minutes -ge 30 ] && clock="🕥";; 11) clock="🕚"; [ $minutes -ge 30 ] && clock="🕦";; - 12) clock="🕛"; [ $minutes -ge 30 ] && clock="🕧";; *) clock="⌛";; esac echo $clock From d794a502f6e551c2ccb1479fc68dbae352c839f5 Mon Sep 17 00:00:00 2001 From: Neal <neal@ineal.me> Date: Tue, 14 Oct 2014 13:57:02 -0500 Subject: [PATCH 192/488] Update path for the iOS simulator. --- plugins/xcode/xcode.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index e59bee8c7..3d7781bf9 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -16,4 +16,4 @@ function xcsel { alias xcb='xcodebuild' alias xcp='xcode-select --print-path' -alias simulator='open $(xcode-select -p)/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone\ Simulator.app' +alias simulator='open $(xcode-select -p)/Applications/iOS\ Simulator.app' From 6f1eb081e343208f881b19d1c9499e6e93b29e4b Mon Sep 17 00:00:00 2001 From: willmendesneto <willmendesneto@gmail.com> Date: Thu, 16 Oct 2014 23:32:42 -0300 Subject: [PATCH 193/488] Fix error using compass search alias --- plugins/frontend-search/frontend-search.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh index 38b1a80ea..f1d45b0d1 100644 --- a/plugins/frontend-search/frontend-search.plugin.zsh +++ b/plugins/frontend-search/frontend-search.plugin.zsh @@ -118,7 +118,7 @@ alias jquery='frontend jquery' alias mdn='frontend mdn' # pre processors frameworks -alias compass='frontend compass' +alias compassdoc='frontend compass' # important links alias html5please='frontend html5please' From 9f801ff48d46847e3c91e58b2ba2f5b61f6dcef8 Mon Sep 17 00:00:00 2001 From: Markus Faerevaag <mafaer@gmail.com> Date: Tue, 21 Oct 2014 09:51:13 +0200 Subject: [PATCH 194/488] [wd] fix space in path --- plugins/wd/wd.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/wd/wd.sh b/plugins/wd/wd.sh index d63e92472..5ecbdc503 100755 --- a/plugins/wd/wd.sh +++ b/plugins/wd/wd.sh @@ -139,7 +139,7 @@ wd_add() if [[ $point =~ "^[\.]+$" ]] then wd_exit_fail "Warp point cannot be just dots" - elif [[ $point =~ "(\s|\ )+" ]] + elif [[ $point =~ "[[:space:]]+" ]] then wd_exit_fail "Warp point should not contain whitespace" elif [[ $point == *:* ]] @@ -151,7 +151,7 @@ wd_add() elif [[ ${points[$2]} == "" ]] || $force then wd_remove $point > /dev/null - printf "%q:%q\n" "${point}" "${PWD}" >> $WD_CONFIG + printf "%q:%s\n" "${point}" "${PWD}" >> $WD_CONFIG wd_print_msg $WD_GREEN "Warp point added" From 36e05e95adf6218eb8c154706a5a101b687d6368 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Wed, 22 Oct 2014 15:16:15 +0200 Subject: [PATCH 195/488] Don't set auto_name_dirs because it messes up prompts MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From http://zsh.sourceforge.net/Doc/Release/Options.html#Completion-4 > AUTO_NAME_DIRS > Any parameter that is set to the absolute name of a directory immediately > becomes a name for that directory, that will be used by the ‘%~’ and > related prompt sequences, and will be available when completion is performed > on a word starting with ‘~’. > (Otherwise, the parameter must be used in the form ‘~param’ first.) Explained in more detail in https://github.com/wayneeseguin/rvm/issues/3091#issuecomment-60083194 Related issues: https://github.com/robbyrussell/oh-my-zsh/issues/2857 https://github.com/robbyrussell/oh-my-zsh/issues/3238 https://github.com/wayneeseguin/rvm/issues/3091 --- lib/directories.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/directories.zsh b/lib/directories.zsh index 1896945f4..02743e0c7 100644 --- a/lib/directories.zsh +++ b/lib/directories.zsh @@ -1,5 +1,4 @@ # Changing/making/removing directory -setopt auto_name_dirs setopt auto_pushd setopt pushd_ignore_dups setopt pushdminus From b9a11b16fec80c5d68f8a215565da3624748197f Mon Sep 17 00:00:00 2001 From: Andrii Kostenko <andrey@kostenko.name> Date: Sat, 6 Sep 2014 22:44:18 +0300 Subject: [PATCH 196/488] fixed URL on github.io github.io moved to https and http returns 301 redirect --- plugins/gitignore/gitignore.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh index be037d87a..5bf302452 100644 --- a/plugins/gitignore/gitignore.plugin.zsh +++ b/plugins/gitignore/gitignore.plugin.zsh @@ -1,7 +1,7 @@ -function gi() { curl http://www.gitignore.io/api/$@ ;} +function gi() { curl https://www.gitignore.io/api/$@ ;} _gitignireio_get_command_list() { - curl -s http://www.gitignore.io/api/list | tr "," "\n" + curl -s https://www.gitignore.io/api/list | tr "," "\n" } _gitignireio () { From 69a0b280c7939406c930082469756e217d1bd789 Mon Sep 17 00:00:00 2001 From: Alex Shaindlin <ashaindlin@gmail.com> Date: Wed, 15 Oct 2014 09:33:49 -0400 Subject: [PATCH 197/488] Fix misspellings in gitignore plugin --- plugins/gitignore/gitignore.plugin.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh index 5bf302452..3f2a6dec1 100644 --- a/plugins/gitignore/gitignore.plugin.zsh +++ b/plugins/gitignore/gitignore.plugin.zsh @@ -1,12 +1,12 @@ function gi() { curl https://www.gitignore.io/api/$@ ;} -_gitignireio_get_command_list() { +_gitignoreio_get_command_list() { curl -s https://www.gitignore.io/api/list | tr "," "\n" } -_gitignireio () { +_gitignoreio () { compset -P '*,' - compadd -S '' `_gitignireio_get_command_list` + compadd -S '' `_gitignoreio_get_command_list` } -compdef _gitignireio gi +compdef _gitignoreio gi From 04d1428fcbda05a96d54396679c6c74c7006b032 Mon Sep 17 00:00:00 2001 From: WooParadog <guohaochuan@gmail.com> Date: Thu, 9 Oct 2014 13:17:35 +0800 Subject: [PATCH 198/488] Fix gitignore curl, should follow redirects --- plugins/gitignore/gitignore.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh index 3f2a6dec1..484c6a699 100644 --- a/plugins/gitignore/gitignore.plugin.zsh +++ b/plugins/gitignore/gitignore.plugin.zsh @@ -1,4 +1,4 @@ -function gi() { curl https://www.gitignore.io/api/$@ ;} +function gi() { curl -L https://www.gitignore.io/api/$@ ;} _gitignoreio_get_command_list() { curl -s https://www.gitignore.io/api/list | tr "," "\n" From b452cafb163cde6619ac741027251bed2709f78e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Wed, 15 Oct 2014 17:17:04 +0200 Subject: [PATCH 199/488] Follow-redirect and silent mode curl throughout gitignore This commit completes previous efforts and standardizes both curl commands into using silent mode and following redirects in case the URL changes again in the future. --- plugins/gitignore/gitignore.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/gitignore/gitignore.plugin.zsh b/plugins/gitignore/gitignore.plugin.zsh index 484c6a699..481d487ba 100644 --- a/plugins/gitignore/gitignore.plugin.zsh +++ b/plugins/gitignore/gitignore.plugin.zsh @@ -1,7 +1,7 @@ -function gi() { curl -L https://www.gitignore.io/api/$@ ;} +function gi() { curl -sL https://www.gitignore.io/api/$@ ;} _gitignoreio_get_command_list() { - curl -s https://www.gitignore.io/api/list | tr "," "\n" + curl -sL https://www.gitignore.io/api/list | tr "," "\n" } _gitignoreio () { From 071de5fb39ff951bffe75a4d6f590d85f25871f3 Mon Sep 17 00:00:00 2001 From: Neal <neal@ineal.me> Date: Mon, 27 Oct 2014 22:17:11 -0500 Subject: [PATCH 200/488] Make the simulator alias work with older Xcode versions as well. --- plugins/xcode/xcode.plugin.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index 3d7781bf9..b7b75cf93 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -16,4 +16,9 @@ function xcsel { alias xcb='xcodebuild' alias xcp='xcode-select --print-path' -alias simulator='open $(xcode-select -p)/Applications/iOS\ Simulator.app' + +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 From b6012bc2c32a124183d7c5713edee4e2341e1d3f Mon Sep 17 00:00:00 2001 From: Pavol Juhas <pavol.juhas@gmail.com> Date: Wed, 2 Apr 2014 19:25:47 -0400 Subject: [PATCH 201/488] Update to the upstream smart-change-directory. Synced with the master branch pavoljuhas/smart-change-directory@20b5a80cf05f72c07e88a9b166593f52517029e4. --- plugins/scd/README.md | 15 +++--- plugins/scd/scd | 119 +++++++++++++++++++++++++++--------------- 2 files changed, 86 insertions(+), 48 deletions(-) diff --git a/plugins/scd/README.md b/plugins/scd/README.md index 197cea50a..86ab67203 100644 --- a/plugins/scd/README.md +++ b/plugins/scd/README.md @@ -11,12 +11,9 @@ the index. A selection menu is displayed in case of several matches, with a preference given to recently visited paths. `scd` can create permanent directory aliases, which appear as named directories in zsh session. -## INSTALLATION +## INSTALLATION NOTES -For oh-my-zsh, add `scd` to the `plugins` array in the ~/.zshrc file as in the -[template file](../../templates/zshrc.zsh-template#L45). - -Besides zsh, `scd` can be used with *bash*, *dash* or *tcsh* +Besides oh-my-zsh, `scd` can be used with *bash*, *dash* or *tcsh* shells and is also available as [Vim](http://www.vim.org/) plugin and [IPython](http://ipython.org/) extension. For installation details, see https://github.com/pavoljuhas/smart-change-directory. @@ -34,7 +31,7 @@ scd [options] [pattern1 pattern2 ...] add specified directories to the directory index.</dd><dt> --unindex</dt><dd> - remove specified directories from the index.</dd><dt> + remove current or specified directories from the index.</dd><dt> -r, --recursive</dt><dd> apply options <em>--add</em> or <em>--unindex</em> recursively.</dd><dt> @@ -47,6 +44,10 @@ scd [options] [pattern1 pattern2 ...] remove ALIAS definition for the current or specified directory from <em>~/.scdalias.zsh</em>.</dd><dt> +-A, --all</dt><dd> + include all matching directories. Disregard matching by directory + alias and filtering of less likely paths.</dd><dt> + --list</dt><dd> show matching directories and exit.</dd><dt> @@ -70,7 +71,7 @@ scd doc scd a b c # Change to a directory path that ends with "ts" -scd "ts(#e)" +scd "ts$" # Show selection menu and ranking of 20 most likely directories scd -v diff --git a/plugins/scd/scd b/plugins/scd/scd index 1567d2736..39b28237d 100755 --- a/plugins/scd/scd +++ b/plugins/scd/scd @@ -11,20 +11,22 @@ fi local DOC='scd -- smart change to a recently used directory usage: scd [options] [pattern1 pattern2 ...] Go to a directory path that contains all fixed string patterns. Prefer -recently visited directories and directories with patterns in their tail -component. Display a selection menu in case of multiple matches. +recent or frequently visited directories as found in the directory index. +Display a selection menu in case of multiple matches. Options: - -a, --add add specified directories to the directory index - --unindex remove specified directories from the index - -r, --recursive apply options --add or --unindex recursively + -a, --add add specified directories to the directory index. + --unindex remove current or specified directories from the index. + -r, --recursive apply options --add or --unindex recursively. --alias=ALIAS create alias for the current or specified directory and - store it in ~/.scdalias.zsh + store it in ~/.scdalias.zsh. --unalias remove ALIAS definition for the current or specified - directory from ~/.scdalias.zsh - --list show matching directories and exit - -v, --verbose display directory rank in the selection menu - -h, --help display this message and exit + directory from ~/.scdalias.zsh. + -A, --all include all matching directories. Disregard matching by + directory alias and filtering of less likely paths. + --list show matching directories and exit. + -v, --verbose display directory rank in the selection menu. + -h, --help display this message and exit. ' local SCD_HISTFILE=${SCD_HISTFILE:-${HOME}/.scdhistory} @@ -35,9 +37,9 @@ local SCD_THRESHOLD=${SCD_THRESHOLD:-0.005} local SCD_SCRIPT=${RUNNING_AS_COMMAND:+$SCD_SCRIPT} local SCD_ALIAS=~/.scdalias.zsh -local ICASE a d m p i tdir maxrank threshold +local ICASE a d m p i maxrank threshold local opt_help opt_add opt_unindex opt_recursive opt_verbose -local opt_alias opt_unalias opt_list +local opt_alias opt_unalias opt_all opt_list local -A drank dalias local dmatching local last_directory @@ -56,7 +58,8 @@ zmodload -i zsh/zutil zmodload -i zsh/datetime zparseopts -D -- a=opt_add -add=opt_add -unindex=opt_unindex \ r=opt_recursive -recursive=opt_recursive \ - -alias:=opt_alias -unalias=opt_unalias -list=opt_list \ + -alias:=opt_alias -unalias=opt_unalias \ + A=opt_all -all=opt_all -list=opt_list \ v=opt_verbose -verbose=opt_verbose h=opt_help -help=opt_help \ || $EXIT $? @@ -68,6 +71,11 @@ fi # load directory aliases if they exist [[ -r $SCD_ALIAS ]] && source $SCD_ALIAS +# Private internal functions are prefixed with _scd_Y19oug_. +# Clean them up when the scd function returns. +setopt localtraps +trap 'unfunction -m "_scd_Y19oug_*"' EXIT + # works faster than the (:a) modifier and is compatible with zsh 4.2.6 _scd_Y19oug_abspath() { set -A $1 ${(ps:\0:)"$( @@ -123,11 +131,52 @@ if [[ -n $opt_unalias ]]; then $EXIT $? fi +# The "compress" function collapses repeated directories to +# one entry with a time stamp that gives equivalent-probability. +_scd_Y19oug_compress() { + awk -v epochseconds=$EPOCHSECONDS -v meanlife=$SCD_MEANLIFE ' + BEGIN { FS = "[:;]"; } + length($0) < 4096 && $2 > 0 { + tau = 1.0 * ($2 - epochseconds) / meanlife; + if (tau < -6.9078) tau = -6.9078; + prob = exp(tau); + sub(/^[^;]*;/, ""); + if (NF) { + dlist[last[$0]] = ""; + dlist[NR] = $0; + last[$0] = NR; + ptot[$0] += prob; + } + } + END { + for (i = 1; i <= NR; ++i) { + d = dlist[i]; + if (d) { + ts = log(ptot[d]) * meanlife + epochseconds; + printf(": %.0f:0;%s\n", ts, d); + } + } + } + ' $* +} + # Rewrite directory index if it is at least 20% oversized if [[ -s $SCD_HISTFILE ]] && \ (( $(wc -l <$SCD_HISTFILE) > 1.2 * $SCD_HISTSIZE )); then - m=( ${(f)"$(<$SCD_HISTFILE)"} ) - print -lr -- ${m[-$SCD_HISTSIZE,-1]} >| ${SCD_HISTFILE} + # compress repeated entries + m=( ${(f)"$(_scd_Y19oug_compress $SCD_HISTFILE)"} ) + # purge non-existent directories + m=( ${(f)"$( + for a in $m; do + if [[ -d ${a#*;} ]]; then print -r -- $a; fi + done + )"} + ) + # cut old entries if still oversized + if [[ $#m -gt $SCD_HISTSIZE ]]; then + m=( ${m[-$SCD_HISTSIZE,-1]} ) + fi + print -lr -- $m >| ${SCD_HISTFILE} fi # Determine the last recorded directory @@ -135,7 +184,6 @@ if [[ -s ${SCD_HISTFILE} ]]; then last_directory=${"$(tail -1 ${SCD_HISTFILE})"#*;} fi -# Internal functions are prefixed with "_scd_Y19oug_". # The "record" function adds its arguments to the directory index. _scd_Y19oug_record() { while [[ -n $last_directory && $1 == $last_directory ]]; do @@ -217,7 +265,7 @@ _scd_Y19oug_action() { # set global arrays dmatching and drank _scd_Y19oug_match() { ## single argument that is an existing directory or directory alias - if [[ $# == 1 ]] && \ + if [[ -z $opt_all && $# == 1 ]] && \ [[ -d ${d::=$1} || -d ${d::=${nameddirs[$1]}} ]] && [[ -x $d ]]; then _scd_Y19oug_abspath dmatching $d @@ -227,6 +275,8 @@ _scd_Y19oug_match() { # ignore case unless there is an argument with an uppercase letter [[ "$*" == *[[:upper:]]* ]] || ICASE='(#i)' + # support "$" as an anchor for the directory name ending + argv=( ${argv/(#m)?[$](#e)/${MATCH[1]}(#e)} ) # calculate rank of all directories in the SCD_HISTFILE and keep it as drank # include a dummy entry for splitting of an empty string is buggy @@ -237,10 +287,10 @@ _scd_Y19oug_match() { BEGIN { FS = "[:;]"; } length($0) < 4096 && $2 > 0 { tau = 1.0 * ($2 - epochseconds) / meanlife; - if (tau < -4.61) tau = -4.61; - prec = exp(tau); + if (tau < -6.9078) tau = -6.9078; + prob = exp(tau); sub(/^[^;]*;/, ""); - if (NF) ptot[$0] += prec; + if (NF) ptot[$0] += prob; } END { for (di in ptot) { print di; print ptot[di]; } }' )"} @@ -249,9 +299,12 @@ _scd_Y19oug_match() { # filter drank to the entries that match all arguments for a; do - p=${ICASE}"*${a}*" + p=${ICASE}"*(${a})*" drank=( ${(kv)drank[(I)${~p}]} ) done + # require at least one argument matches the directory name + p=${ICASE}"*(${(j:|:)argv})[^/]#" + drank=( ${(kv)drank[(I)${~p}]} ) # build a list of matching directories reverse-sorted by their probabilities dmatching=( ${(f)"$( @@ -261,26 +314,6 @@ _scd_Y19oug_match() { )"} ) - # if some directory paths match all patterns in order, discard all others - p=${ICASE}"*${(j:*:)argv}*" - m=( ${(M)dmatching:#${~p}} ) - [[ -d ${m[1]} ]] && dmatching=( $m ) - # if some directory names match last pattern, discard all others - p=${ICASE}"*${(j:*:)argv}[^/]#" - m=( ${(M)dmatching:#${~p}} ) - [[ -d ${m[1]} ]] && dmatching=( $m ) - # if some directory names match all patterns, discard all others - m=( $dmatching ) - for a; do - p=${ICASE}"*/[^/]#${a}[^/]#" - m=( ${(M)m:#${~p}} ) - done - [[ -d ${m[1]} ]] && dmatching=( $m ) - # if some directory names match all patterns in order, discard all others - p=${ICASE}"/*${(j:[^/]#:)argv}[^/]#" - m=( ${(M)dmatching:#${~p}} ) - [[ -d ${m[1]} ]] && dmatching=( $m ) - # do not match $HOME or $PWD when run without arguments if [[ $# == 0 ]]; then dmatching=( ${dmatching:#(${HOME}|${PWD})} ) @@ -302,6 +335,9 @@ _scd_Y19oug_match() { # discard all directories below the rank threshold threshold=$(( maxrank * SCD_THRESHOLD )) + if [[ -n ${opt_all} ]]; then + threshold=0 + fi dmatching=( ${^dmatching}(Ne:'(( ${drank[$REPLY]} >= threshold ))':) ) } @@ -339,6 +375,7 @@ fi ## here we have multiple matches - display selection menu a=( {a-z} {A-Z} ) +a=( ${a[1,${#dmatching}]} ) p=( ) for i in {1..${#dmatching}}; do [[ -n ${a[i]} ]] || break From eae70054d15948cc6ddb3d8d4f252ff2c7cf6ad5 Mon Sep 17 00:00:00 2001 From: Jaap Broekhuizen <jaapz.b@gmail.com> Date: Mon, 3 Nov 2014 12:29:19 +0100 Subject: [PATCH 202/488] Added VIRTUAL_ENV_DISABLE_PROMPT to steeef.zsh-theme This stops the virtual env name from being printed before it is actually being used in the zsh prompt. --- themes/steeef.zsh-theme | 2 ++ 1 file changed, 2 insertions(+) diff --git a/themes/steeef.zsh-theme b/themes/steeef.zsh-theme index 9d27410b8..e38188d35 100644 --- a/themes/steeef.zsh-theme +++ b/themes/steeef.zsh-theme @@ -7,6 +7,8 @@ # git untracked files modification from Brian Carper: # http://briancarper.net/blog/570/git-info-in-your-zsh-prompt +export VIRTUAL_ENV_DISABLE_PROMPT=1 + function virtualenv_info { [ $VIRTUAL_ENV ] && echo '('$fg[blue]`basename $VIRTUAL_ENV`%{$reset_color%}') ' } From 74177c5320b2a1b2f8c4c695c05984b57fd7c6ea Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Thu, 9 Oct 2014 13:44:54 +0200 Subject: [PATCH 203/488] Change all whoami calls for $USER variable This avoid spawning additional processes, as the $USER variable will **always** contain the current logged-in user. --- lib/completion.zsh | 4 ++-- plugins/systemadmin/systemadmin.plugin.zsh | 2 +- themes/adben.zsh-theme | 5 ++--- themes/agnoster.zsh-theme | 6 ++---- themes/flazz.zsh-theme | 2 +- themes/obraun.zsh-theme | 2 +- themes/re5et.zsh-theme | 2 +- themes/sunrise.zsh-theme | 2 +- themes/ys.zsh-theme | 2 +- 9 files changed, 12 insertions(+), 15 deletions(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index 83b6efb66..3a19a4eba 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -27,9 +27,9 @@ zstyle ':completion:*:*:*:*:*' menu select zstyle ':completion:*:*:kill:*:processes' list-colors '=(#b) #([0-9]#) ([0-9a-z-]#)*=01;34=0=01' if [ "$OSTYPE[0,7]" = "solaris" ] then - zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm" + zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm" else - zstyle ':completion:*:*:*:*:processes' command "ps -u `whoami` -o pid,user,comm -w -w" + zstyle ':completion:*:*:*:*:processes' command "ps -u $USER -o pid,user,comm -w -w" fi # disable named-directories autocompletion diff --git a/plugins/systemadmin/systemadmin.plugin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh index f5e44c66f..e0b1773ad 100644 --- a/plugins/systemadmin/systemadmin.plugin.zsh +++ b/plugins/systemadmin/systemadmin.plugin.zsh @@ -30,7 +30,7 @@ function retlog() { } alias ping='ping -c 5' -alias clr='clear;echo "Currently logged in on $(tty), as $(whoami) in directory $(pwd)."' +alias clr='clear;echo "Currently logged in on $(tty), as $USER in directory $(pwd)."' alias path='echo -e ${PATH//:/\\n}' alias mkdir='mkdir -pv' # get top process eating memory diff --git a/themes/adben.zsh-theme b/themes/adben.zsh-theme index aa3093f64..6869c8a20 100644 --- a/themes/adben.zsh-theme +++ b/themes/adben.zsh-theme @@ -89,9 +89,8 @@ function precmd { # Context: user@directory or just directory prompt_context () { - local user=`whoami` - if [[ "$user" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then - echo -n "${PR_RESET}${PR_RED}$user@%m${PR_RESET}${PR_BRIGHT_YELLOW}%~%<<${PR_RESET}" + if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then + echo -n "${PR_RESET}${PR_RED}$USER@%m${PR_RESET}${PR_BRIGHT_YELLOW}%~%<<${PR_RESET}" else echo -n "${PR_RESET}${PR_BRIGHT_YELLOW}%~%<<${PR_RESET}" fi diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 2b33c48bc..7a62bd860 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -60,10 +60,8 @@ prompt_end() { # Context: user@hostname (who am I and where am I) prompt_context() { - local user=`whoami` - - if [[ "$user" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then - prompt_segment black default "%(!.%{%F{yellow}%}.)$user@%m" + if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then + prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m" fi } diff --git a/themes/flazz.zsh-theme b/themes/flazz.zsh-theme index 280794f2b..c0a7fb5d0 100644 --- a/themes/flazz.zsh-theme +++ b/themes/flazz.zsh-theme @@ -1,4 +1,4 @@ -if [ "$(whoami)" = "root" ] +if [ "$USER" = "root" ] then CARETCOLOR="red" else CARETCOLOR="blue" fi diff --git a/themes/obraun.zsh-theme b/themes/obraun.zsh-theme index 08d137665..7af44056f 100644 --- a/themes/obraun.zsh-theme +++ b/themes/obraun.zsh-theme @@ -1,4 +1,4 @@ -if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi +if [ "$USER" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="blue"; fi local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" diff --git a/themes/re5et.zsh-theme b/themes/re5et.zsh-theme index 5bded76a3..95af1e2ee 100644 --- a/themes/re5et.zsh-theme +++ b/themes/re5et.zsh-theme @@ -1,4 +1,4 @@ -if [ "$(whoami)" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="magenta"; fi +if [ "$USER" = "root" ]; then CARETCOLOR="red"; else CARETCOLOR="magenta"; fi local return_code="%(?..%{$fg_bold[red]%}:( %?%{$reset_color%})" diff --git a/themes/sunrise.zsh-theme b/themes/sunrise.zsh-theme index 4bea20a1b..28befd01b 100644 --- a/themes/sunrise.zsh-theme +++ b/themes/sunrise.zsh-theme @@ -10,7 +10,7 @@ Y=$fg_no_bold[yellow] B=$fg_no_bold[blue] RESET=$reset_color -if [ "$(whoami)" = "root" ]; then +if [ "$USER" = "root" ]; then PROMPTCOLOR="%{$R%}" PREFIX="-!-"; else PROMPTCOLOR="" PREFIX="---"; diff --git a/themes/ys.zsh-theme b/themes/ys.zsh-theme index a44f295f4..65448964d 100644 --- a/themes/ys.zsh-theme +++ b/themes/ys.zsh-theme @@ -33,7 +33,7 @@ ${git_info} \ %{$fg[white]%}[%*] %{$terminfo[bold]$fg[red]%}$ %{$reset_color%}" -if [[ "$(whoami)" == "root" ]]; then +if [[ "$USER" == "root" ]]; then PROMPT=" %{$terminfo[bold]$fg[blue]%}#%{$reset_color%} \ %{$bg[yellow]%}%{$fg[cyan]%}%n%{$reset_color%} \ From 4310a15de5d0587ef135f9e12857620c4788dec2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Thu, 9 Oct 2014 13:55:50 +0200 Subject: [PATCH 204/488] Change all pwd calls for $PWD variable This avoids spawning additional processes as $PWD **always** contains the current working directory. --- plugins/dirhistory/dirhistory.plugin.zsh | 6 +++--- plugins/jump/jump.plugin.zsh | 6 +++--- plugins/pow/pow.plugin.zsh | 8 ++++---- plugins/svn/svn.plugin.zsh | 2 +- plugins/systemadmin/systemadmin.plugin.zsh | 2 +- plugins/vim-interaction/vim-interaction.plugin.zsh | 2 +- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/plugins/dirhistory/dirhistory.plugin.zsh b/plugins/dirhistory/dirhistory.plugin.zsh index 504d7ec14..d101cfcae 100644 --- a/plugins/dirhistory/dirhistory.plugin.zsh +++ b/plugins/dirhistory/dirhistory.plugin.zsh @@ -3,7 +3,7 @@ # that the user has changed to in the past, and ALT-RIGHT undoes ALT-LEFT. # -dirhistory_past=(`pwd`) +dirhistory_past=($PWD) dirhistory_future=() export dirhistory_past export dirhistory_future @@ -50,7 +50,7 @@ function push_future() { # Called by zsh when directory changes function chpwd() { - push_past `pwd` + push_past $PWD # If DIRHISTORY_CD is not set... if [[ -z "${DIRHISTORY_CD+x}" ]]; then # ... clear future. @@ -73,7 +73,7 @@ function dirhistory_back() { pop_past cw if [[ "" == "$cw" ]]; then # Someone overwrote our variable. Recover it. - dirhistory_past=(`pwd`) + dirhistory_past=($PWD) return fi diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh index 1b23b5d42..b16814fe4 100644 --- a/plugins/jump/jump.plugin.zsh +++ b/plugins/jump/jump.plugin.zsh @@ -14,12 +14,12 @@ jump() { mark() { if (( $# == 0 )); then - MARK=$(basename "$(pwd)") + MARK=$(basename "$PWD") else MARK="$1" fi - if read -q \?"Mark $(pwd) as ${MARK}? (y/n) "; then - mkdir -p "$MARKPATH"; ln -s "$(pwd)" "$MARKPATH/$MARK" + if read -q \?"Mark $PWD as ${MARK}? (y/n) "; then + mkdir -p "$MARKPATH"; ln -s "$PWD" "$MARKPATH/$MARK" fi } diff --git a/plugins/pow/pow.plugin.zsh b/plugins/pow/pow.plugin.zsh index d85c88777..ded3336a7 100644 --- a/plugins/pow/pow.plugin.zsh +++ b/plugins/pow/pow.plugin.zsh @@ -21,13 +21,13 @@ rack_root(){ setopt chaselinks - local orgdir="$(pwd)" - local basedir="$(pwd)" + local orgdir="$PWD" + local basedir="$PWD" while [[ $basedir != '/' ]]; do test -e "$basedir/config.ru" && break builtin cd ".." 2>/dev/null - basedir="$(pwd)" + basedir="$PWD" done builtin cd "$orgdir" 2>/dev/null @@ -56,7 +56,7 @@ kapow(){ compctl -W ~/.pow -/ kapow powit(){ - local basedir="$(pwd)" + local basedir="$PWD" local vhost=$1 [ ! -n "$vhost" ] && vhost=$(rack_root_detect) if [ ! -h ~/.pow/$vhost ] diff --git a/plugins/svn/svn.plugin.zsh b/plugins/svn/svn.plugin.zsh index ef6da5bd3..ba281d790 100644 --- a/plugins/svn/svn.plugin.zsh +++ b/plugins/svn/svn.plugin.zsh @@ -77,7 +77,7 @@ function svn_dirty() { function svn_dirty_choose_pwd () { if in_svn; then - root=`pwd` + root=$PWD if $(svn status $root 2> /dev/null | 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/systemadmin/systemadmin.plugin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh index e0b1773ad..4ae70dfa7 100644 --- a/plugins/systemadmin/systemadmin.plugin.zsh +++ b/plugins/systemadmin/systemadmin.plugin.zsh @@ -30,7 +30,7 @@ function retlog() { } alias ping='ping -c 5' -alias clr='clear;echo "Currently logged in on $(tty), as $USER in directory $(pwd)."' +alias clr='clear;echo "Currently logged in on $(tty), as $USER in directory $PWD."' alias path='echo -e ${PATH//:/\\n}' alias mkdir='mkdir -pv' # get top process eating memory diff --git a/plugins/vim-interaction/vim-interaction.plugin.zsh b/plugins/vim-interaction/vim-interaction.plugin.zsh index 5142f1f9b..b0b9414cd 100644 --- a/plugins/vim-interaction/vim-interaction.plugin.zsh +++ b/plugins/vim-interaction/vim-interaction.plugin.zsh @@ -9,7 +9,7 @@ function resolveFile if [ -f "$1" ]; then echo $(readlink -f "$1") elif [[ "${1#/}" == "$1" ]]; then - echo "$(pwd)/$1" + echo "$PWD/$1" else echo $1 fi From 95d795e8cad7d1a754dfad520309d7a41b69275f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Thu, 9 Oct 2014 17:05:48 +0200 Subject: [PATCH 205/488] Change all hostname calls for $HOST or $SHORT_HOST --- plugins/profiles/profiles.plugin.zsh | 2 +- themes/candy-kingdom.zsh-theme | 2 +- themes/dieter.zsh-theme | 2 +- themes/fino-time.zsh-theme | 2 +- themes/fino.zsh-theme | 2 +- themes/kardan.zsh-theme | 2 +- themes/michelebologna.zsh-theme | 2 +- themes/ys.zsh-theme | 2 +- 8 files changed, 8 insertions(+), 8 deletions(-) diff --git a/plugins/profiles/profiles.plugin.zsh b/plugins/profiles/profiles.plugin.zsh index 8faae6b53..4b3d6a852 100644 --- a/plugins/profiles/profiles.plugin.zsh +++ b/plugins/profiles/profiles.plugin.zsh @@ -2,7 +2,7 @@ # This will look for a custom profile for the local machine and each domain or # subdomain it belongs to. (e.g. com, example.com and foo.example.com) -parts=(${(s:.:)$(hostname)}) +parts=(${(s:.:)$HOST}) for i in {${#parts}..1}; do profile=${(j:.:)${parts[$i,${#parts}]}} file=$ZSH_CUSTOM/profiles/$profile diff --git a/themes/candy-kingdom.zsh-theme b/themes/candy-kingdom.zsh-theme index 718977d90..889128758 100644 --- a/themes/candy-kingdom.zsh-theme +++ b/themes/candy-kingdom.zsh-theme @@ -13,7 +13,7 @@ patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset } function box_name { - [ -f ~/.box-name ] && cat ~/.box-name || hostname -s + [ -f ~/.box-name ] && cat ~/.box-name || echo $SHORT_HOST || echo $HOST } PROMPT=' diff --git a/themes/dieter.zsh-theme b/themes/dieter.zsh-theme index 0a5e9265b..58d9f88a9 100644 --- a/themes/dieter.zsh-theme +++ b/themes/dieter.zsh-theme @@ -21,7 +21,7 @@ local user="%(!.%{$fg[blue]%}.%{$fg[blue]%})%n%{$reset_color%}" # Hostname part. compressed and colorcoded per host_repr array # if not found, regular hostname in default color -local host="@${host_repr[$(hostname)]:-$(hostname)}%{$reset_color%}" +local host="@${host_repr[$HOST]:-$HOST}%{$reset_color%}" # Compacted $PWD local pwd="%{$fg[blue]%}%c%{$reset_color%}" diff --git a/themes/fino-time.zsh-theme b/themes/fino-time.zsh-theme index 901c4d99f..67b6b6e08 100644 --- a/themes/fino-time.zsh-theme +++ b/themes/fino-time.zsh-theme @@ -21,7 +21,7 @@ function prompt_char { } function box_name { - [ -f ~/.box-name ] && cat ~/.box-name || hostname -s + [ -f ~/.box-name ] && cat ~/.box-name || echo $SHORT_HOST || echo $HOST } diff --git a/themes/fino.zsh-theme b/themes/fino.zsh-theme index 411dec9b9..50d41e899 100644 --- a/themes/fino.zsh-theme +++ b/themes/fino.zsh-theme @@ -17,7 +17,7 @@ function prompt_char { } function box_name { - [ -f ~/.box-name ] && cat ~/.box-name || hostname -s + [ -f ~/.box-name ] && cat ~/.box-name || echo $SHORT_HOST || echo $HOST } local ruby_env='' diff --git a/themes/kardan.zsh-theme b/themes/kardan.zsh-theme index fd6586a9d..9a3d59109 100644 --- a/themes/kardan.zsh-theme +++ b/themes/kardan.zsh-theme @@ -1,7 +1,7 @@ # Simple theme based on my old zsh settings. function get_host { - echo '@'`hostname`'' + echo '@'$HOST } PROMPT='> ' diff --git a/themes/michelebologna.zsh-theme b/themes/michelebologna.zsh-theme index ef4c6d740..a7599c8f5 100644 --- a/themes/michelebologna.zsh-theme +++ b/themes/michelebologna.zsh-theme @@ -17,7 +17,7 @@ USERNAME_NORMAL_COLOR=$WHITE USERNAME_ROOT_COLOR=$RED HOSTNAME_NORMAL_COLOR=$BLUE # uncomment next line if you want auto-generated hostname color -#for i in `hostname`; HOSTNAME_NORMAL_COLOR=$COLOR_ARRAY[$[((#i))%7+1]] +#for i in $HOST; HOSTNAME_NORMAL_COLOR=$COLOR_ARRAY[$[((#i))%7+1]] HOSTNAME_ROOT_COLOR=$RED HOSTNAME_COLOR=%(!.$HOSTNAME_ROOT_COLOR.$HOSTNAME_NORMAL_COLOR) CURRENT_DIR_COLOR=$CYAN diff --git a/themes/ys.zsh-theme b/themes/ys.zsh-theme index 65448964d..017139100 100644 --- a/themes/ys.zsh-theme +++ b/themes/ys.zsh-theme @@ -8,7 +8,7 @@ # Machine name. function box_name { - [ -f ~/.box-name ] && cat ~/.box-name || hostname + [ -f ~/.box-name ] && cat ~/.box-name || echo $HOST } # Directory info. From e16d3e45d30fbf981f503b4d078d84c71a070a1d Mon Sep 17 00:00:00 2001 From: Tim O'Brien <timo@t413.com> Date: Thu, 6 Nov 2014 10:34:26 -0800 Subject: [PATCH 206/488] Add bgnotify plugin, a cross-platform background notifier! --- plugins/bgnotify/README.md | 39 +++++++++++++++++ plugins/bgnotify/bgnotify.plugin.zsh | 65 ++++++++++++++++++++++++++++ 2 files changed, 104 insertions(+) create mode 100644 plugins/bgnotify/README.md create mode 100755 plugins/bgnotify/bgnotify.plugin.zsh diff --git a/plugins/bgnotify/README.md b/plugins/bgnotify/README.md new file mode 100644 index 000000000..bf4b1fd09 --- /dev/null +++ b/plugins/bgnotify/README.md @@ -0,0 +1,39 @@ +# bgnotify zsh plugin + +cross-platform background notifications for long running commands! Supports OSX and Ubuntu linux. + +Standalone homepage: [t413/zsh-background-notify](https://github.com/t413/zsh-background-notify) + +---------------------------------- + +## How to use! + +Just add bgnotify to your plugins list in your `.zshrc` + +- On OS X you'll need [terminal-notifer](https://github.com/alloy/terminal-notifier) + * `brew install terminal-notifier` (or `gem install terminal-notifier`) +- On ubuntu you're already all set! + + +## Configuration + +One can configure a few things: + +- `bgnotify_threshold` sets the notification threshold time (default 6 seconds) +- `function bgnotify_formatted` lets you change the notification + +Use these by adding a function definition before the your call to source. Example: + +~~~ sh +bgnotify_threshold=4 ## set your own notification threshold + +function bgnotify_formatted { + ## $1=exit_status, $2=command, $3=elapsed_time + [ $1 -eq 0 ] && title="Holy Smokes Batman!" || title="Holy Graf Zeppelin!" + bgnotify "$title -- after $3 s" "$2"; +} + +plugins=(git bgnotify) ## add to plugins list +source $ZSH/oh-my-zsh.sh ## existing source call +~~~ + diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh new file mode 100755 index 000000000..f204d9dc8 --- /dev/null +++ b/plugins/bgnotify/bgnotify.plugin.zsh @@ -0,0 +1,65 @@ +#!/usr/bin/env zsh + + +## setup ## + +[[ -o interactive ]] || return #interactive only! +zmodload zsh/datetime || { print "can't load zsh/datetime"; return } # faster than date() +autoload -Uz add-zsh-hook || { print "can't add zsh hook!"; return } + +(( ${+bgnotify_threshold} )) || bgnotify_threshold=5 #default 10 seconds + + +## definitions ## + +if ! (type notify_formatted | grep -q 'function'); then + echo "using default notify_formatted" + function bgnotify_formatted { + ## exit_status, command, elapsed_time + [ $1 -eq 0 ] && title="#win (took $3 s)" || title="#fail (took $3 s)" + bgnotify "$title" "$2" + } +fi + +currentWindowId () { + if hash notify-send 2>/dev/null; then #ubuntu! + xprop -root | awk '/NET_ACTIVE_WINDOW/ { print $5; exit }' + elif 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 + fi +} + +bgnotify () { + if hash notify-send 2>/dev/null; then #ubuntu! + notify-send $1 $2 + elif hash terminal-notifier 2>/dev/null; then #osx + terminal-notifier -message $2 -title $1 + elif hash growlnotify 2>/dev/null; then #osx growl + growlnotify -m $1 $2 + fi +} + + +## Zsh hooks ## + +bgnotify_begin() { + bgnotify_timestamp=$EPOCHSECONDS + bgnotify_lastcmd=$1 + bgnotify_windowid=$(currentWindowId) +} + +bgnotify_end() { + didexit=$? + elapsed=$(( $EPOCHSECONDS - $bgnotify_timestamp )) + past_threshold=$(( $elapsed >= $bgnotify_threshold )) + if (( bgnotify_timestamp > 0 )) && (( past_threshold )); then + if [ $(currentWindowId) != "$bgnotify_windowid" ]; then + print -n "\a" + bgnotify_formatted "$didexit" "$bgnotify_lastcmd" "$elapsed" + fi + fi + bgnotify_timestamp=0 #reset it to 0! +} + +add-zsh-hook preexec bgnotify_begin +add-zsh-hook precmd bgnotify_end From 0b0cc2cdea1e3b3e4af78d8d4a9992be468031eb Mon Sep 17 00:00:00 2001 From: Tim O'Brien <timo@t413.com> Date: Thu, 6 Nov 2014 10:31:27 -0800 Subject: [PATCH 207/488] Fixed math on linux, removed debug echo. --- plugins/bgnotify/bgnotify.plugin.zsh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh index f204d9dc8..b5fb76f7e 100755 --- a/plugins/bgnotify/bgnotify.plugin.zsh +++ b/plugins/bgnotify/bgnotify.plugin.zsh @@ -13,7 +13,6 @@ autoload -Uz add-zsh-hook || { print "can't add zsh hook!"; return } ## definitions ## if ! (type notify_formatted | grep -q 'function'); then - echo "using default notify_formatted" function bgnotify_formatted { ## exit_status, command, elapsed_time [ $1 -eq 0 ] && title="#win (took $3 s)" || title="#fail (took $3 s)" @@ -50,8 +49,8 @@ bgnotify_begin() { bgnotify_end() { didexit=$? - elapsed=$(( $EPOCHSECONDS - $bgnotify_timestamp )) - past_threshold=$(( $elapsed >= $bgnotify_threshold )) + elapsed=$(( EPOCHSECONDS - bgnotify_timestamp )) + past_threshold=$(( elapsed >= bgnotify_threshold )) if (( bgnotify_timestamp > 0 )) && (( past_threshold )); then if [ $(currentWindowId) != "$bgnotify_windowid" ]; then print -n "\a" From adafe271f02ab767c29f80f5657f448d593cdaf6 Mon Sep 17 00:00:00 2001 From: Tim O'Brien <timo@t413.com> Date: Thu, 6 Nov 2014 10:32:29 -0800 Subject: [PATCH 208/488] add cygwin windows support with notifu, add to readme --- plugins/bgnotify/README.md | 2 +- plugins/bgnotify/bgnotify.plugin.zsh | 2 ++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/bgnotify/README.md b/plugins/bgnotify/README.md index bf4b1fd09..68fa7529e 100644 --- a/plugins/bgnotify/README.md +++ b/plugins/bgnotify/README.md @@ -13,6 +13,7 @@ Just add bgnotify to your plugins list in your `.zshrc` - On OS X you'll need [terminal-notifer](https://github.com/alloy/terminal-notifier) * `brew install terminal-notifier` (or `gem install terminal-notifier`) - On ubuntu you're already all set! +- On windows you can use [notifu](http://www.paralint.com/projects/notifu/) or the Cygwin Ports libnotify package ## Configuration @@ -36,4 +37,3 @@ function bgnotify_formatted { plugins=(git bgnotify) ## add to plugins list source $ZSH/oh-my-zsh.sh ## existing source call ~~~ - diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh index b5fb76f7e..42129bd06 100755 --- a/plugins/bgnotify/bgnotify.plugin.zsh +++ b/plugins/bgnotify/bgnotify.plugin.zsh @@ -35,6 +35,8 @@ bgnotify () { terminal-notifier -message $2 -title $1 elif hash growlnotify 2>/dev/null; then #osx growl growlnotify -m $1 $2 + elif hash notifu 2>/dev/null; then #cygwyn support! + notifu /m "$2" /p "$1" fi } From 11253336cfc771537f63268fd03d466cd27936a0 Mon Sep 17 00:00:00 2001 From: Benjamin Stier <ben@unpatched.de> Date: Fri, 7 Nov 2014 10:47:27 +0100 Subject: [PATCH 209/488] Fixes the profiles-plugin An error was introduced with 7f75bb9, which uses special vars. This is the fix. --- plugins/profiles/profiles.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/profiles/profiles.plugin.zsh b/plugins/profiles/profiles.plugin.zsh index 4b3d6a852..5bc56cea0 100644 --- a/plugins/profiles/profiles.plugin.zsh +++ b/plugins/profiles/profiles.plugin.zsh @@ -2,7 +2,7 @@ # This will look for a custom profile for the local machine and each domain or # subdomain it belongs to. (e.g. com, example.com and foo.example.com) -parts=(${(s:.:)$HOST}) +parts=(${(s:.:)HOST}) for i in {${#parts}..1}; do profile=${(j:.:)${parts[$i,${#parts}]}} file=$ZSH_CUSTOM/profiles/$profile From 3d376bbd5b0a230e9e1a2d5497623d92ec94615e Mon Sep 17 00:00:00 2001 From: Tim O'Brien <timo@t413.com> Date: Fri, 7 Nov 2014 08:35:31 -0800 Subject: [PATCH 210/488] Fix renamed method issue. --- plugins/bgnotify/bgnotify.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh index 42129bd06..722213734 100755 --- a/plugins/bgnotify/bgnotify.plugin.zsh +++ b/plugins/bgnotify/bgnotify.plugin.zsh @@ -12,7 +12,7 @@ autoload -Uz add-zsh-hook || { print "can't add zsh hook!"; return } ## definitions ## -if ! (type notify_formatted | grep -q 'function'); then +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)" From cbec1d77b2b238eadcdad5d926339d4a034240e9 Mon Sep 17 00:00:00 2001 From: Tim O'Brien <timo@t413.com> Date: Fri, 7 Nov 2014 10:57:02 -0800 Subject: [PATCH 211/488] Add window ID fallback for windows. - maybe someday use GetForegroundWindow() from User32.lib ... --- plugins/bgnotify/bgnotify.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh index 722213734..f3cf0e3b8 100755 --- a/plugins/bgnotify/bgnotify.plugin.zsh +++ b/plugins/bgnotify/bgnotify.plugin.zsh @@ -25,6 +25,8 @@ currentWindowId () { xprop -root | awk '/NET_ACTIVE_WINDOW/ { print $5; exit }' elif 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 + else + echo $EPOCHSECONDS #fallback for windows fi } From 8bd8597e12d25ada4a288bffef946ac62b9f9de4 Mon Sep 17 00:00:00 2001 From: Ian Lancaster <ilancaster@gmail.com> Date: Sat, 8 Nov 2014 04:58:52 -0500 Subject: [PATCH 212/488] Remove deprecated brew commands, update core commands `brew services` and `brew server` were moved to homebrew-boneyard. --- plugins/brew/_brew | 38 +++++++++----------------------------- 1 file changed, 9 insertions(+), 29 deletions(-) diff --git a/plugins/brew/_brew b/plugins/brew/_brew index 40442a1d3..d11aa245d 100644 --- a/plugins/brew/_brew +++ b/plugins/brew/_brew @@ -19,21 +19,18 @@ _brew_outdated_formulae() { outdated_formulae=(`brew outdated`) } -_brew_running_services() { - running_services=(`brew services list | awk '{print $1}'`) -} - local -a _1st_arguments _1st_arguments=( 'audit:check formulae for Homebrew coding style' - 'bundle:look for a Brewfile and run each line as a brew command' 'cat:display formula file for a formula' 'cleanup:uninstall unused and old versions of packages' 'commands:show a list of commands' 'create:create a new formula' - 'deps:list dependencies and dependants of a formula' + 'deps:list dependencies of a formula' 'doctor:audits your installation for common issues' 'edit:edit a formula' + 'fetch:download formula resources to the cache' + 'gist-logs:generate a gist of the full build logs' 'home:visit the homepage of a formula or the brew project' 'info:information about a formula' 'install:install a formula' @@ -44,32 +41,24 @@ _1st_arguments=( 'missing:check all installed formuale for missing dependencies.' '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)' - 'server:start a local web app that lets you browse formulae (requires Sinatra)' - 'services:small wrapper around `launchctl` for supported formulae' + 'switch:switch linkage between installed versions of a formula' 'tap:tap a new formula repository from GitHub, or list existing taps' + 'test-bot:test a formula and build a bottle' 'uninstall:uninstall a formula' 'unlink:unlink a formula' 'unpin:unpin specified formulae' 'untap:remove a tapped repository' - 'update:freshen up links' + 'update:pull latest repository' 'upgrade:upgrade outdated formulae' 'uses:show formulae which depend on a formula' ) -local -a _service_arguments -_service_arguments=( - 'cleanup:get rid of stale services and unused plists' - 'list:list all services managed by `brew services`' - 'restart:gracefully restart selected service' - 'start:start selected service' - 'stop:stop selected service' -) - local expl -local -a formulae installed_formulae installed_taps outdated_formulae running_services +local -a formulae installed_formulae installed_taps outdated_formulae _arguments \ '(-v)-v[verbose]' \ @@ -80,6 +69,7 @@ _arguments \ '(--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 @@ -109,16 +99,6 @@ case "$words[1]" in _arguments \ '(--macports)--macports[search the macports repository]' \ '(--fink)--fink[search the fink repository]' ;; - services) - if [[ -n "$words[2]" ]]; then - case "$words[2]" in - restart|start|stop) - _brew_running_services - _wanted running_services expl 'running services' compadd -a running_services ;; - esac - else - _describe -t commands "brew services subcommand" _service_arguments - fi ;; untap) _brew_installed_taps _wanted installed_taps expl 'installed taps' compadd -a installed_taps ;; From 98fc8dd91adb5e8754b857127c4d121871d5fadb Mon Sep 17 00:00:00 2001 From: Tim O'Brien <timo@t413.com> Date: Sat, 8 Nov 2014 14:16:56 -0800 Subject: [PATCH 213/488] Fix for OS X when no window id is returned (like on the desktop) --- plugins/bgnotify/bgnotify.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh index f3cf0e3b8..259d27424 100755 --- a/plugins/bgnotify/bgnotify.plugin.zsh +++ b/plugins/bgnotify/bgnotify.plugin.zsh @@ -24,7 +24,7 @@ currentWindowId () { if hash notify-send 2>/dev/null; then #ubuntu! xprop -root | awk '/NET_ACTIVE_WINDOW/ { print $5; exit }' elif 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 + osascript -e 'tell application (path to frontmost application as text) to id of front window' 2&> /dev/null || echo "0" else echo $EPOCHSECONDS #fallback for windows fi From fd69c34e0ccb8b7754b05e6f0c797abddb00f920 Mon Sep 17 00:00:00 2001 From: Tim O'Brien <timo@t413.com> Date: Sat, 8 Nov 2014 14:20:37 -0800 Subject: [PATCH 214/488] Add screenshots to readme --- plugins/bgnotify/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/plugins/bgnotify/README.md b/plugins/bgnotify/README.md index 68fa7529e..b154916d6 100644 --- a/plugins/bgnotify/README.md +++ b/plugins/bgnotify/README.md @@ -16,6 +16,21 @@ Just add bgnotify to your plugins list in your `.zshrc` - On windows you can use [notifu](http://www.paralint.com/projects/notifu/) or the Cygwin Ports libnotify package +## Screenshots + +**Linux** + + + +**OS X** + + + +**Windows** + + + + ## Configuration One can configure a few things: From d0f3fb3a4fdce51e1f59bdf4817c7adec80b0784 Mon Sep 17 00:00:00 2001 From: Jarin Udom <jarin@robotmodehq.com> Date: Tue, 10 Jun 2014 07:24:38 -0700 Subject: [PATCH 215/488] Merge simplified superjarin theme --- themes/superjarin.zsh-theme | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/themes/superjarin.zsh-theme b/themes/superjarin.zsh-theme index 2920d17a2..86fa9c706 100644 --- a/themes/superjarin.zsh-theme +++ b/themes/superjarin.zsh-theme @@ -1,11 +1,5 @@ -# Grab the current version of ruby in use (via RVM): [ruby-1.8.7] -if [ -e ~/.rvm/bin/rvm-prompt ]; then - JARIN_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[red]%}\$(~/.rvm/bin/rvm-prompt i v)%{$fg[white]%}]%{$reset_color%}" -else - if which rbenv &> /dev/null; then - JARIN_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[red]%}\$(rbenv version | sed -e 's/ (set.*$//')%{$fg[white]%}]%{$reset_color%}" - fi -fi +# Grab the current version of ruby in use: [ruby-1.8.7] +JARIN_CURRENT_RUBY_="%{$fg[white]%}[%{$fg[red]%}\$(ruby_prompt_info)%{$fg[white]%}]%{$reset_color%}" # Grab the current filepath, use shortcuts: ~/Desktop # Append the current git branch, if in a git repository From 95d5f2c641d698b479dc8817ed1a85dcbc965fb6 Mon Sep 17 00:00:00 2001 From: Manfred Touron <m@42.am> Date: Thu, 13 Nov 2014 18:59:04 +0100 Subject: [PATCH 216/488] [boot2docker plugin] Initial version --- plugins/boot2docker/README.md | 6 +++ plugins/boot2docker/_boot2docker | 70 ++++++++++++++++++++++++++++++++ 2 files changed, 76 insertions(+) create mode 100644 plugins/boot2docker/README.md create mode 100644 plugins/boot2docker/_boot2docker 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..baa08b26d --- /dev/null +++ b/plugins/boot2docker/_boot2docker @@ -0,0 +1,70 @@ +#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]' \ + '(--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.]' \ + '(--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 From 923d2c85b40e14ea90d4342be1e1905bb238ea0b Mon Sep 17 00:00:00 2001 From: Geoffrey Washburn <geoffrey.washburn@logicblox.com> Date: Sun, 19 Jan 2014 14:10:16 -0500 Subject: [PATCH 217/488] Fix autojump script to support Nix installations --- plugins/autojump/autojump.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh index 50a694764..652d22696 100644 --- a/plugins/autojump/autojump.plugin.zsh +++ b/plugins/autojump/autojump.plugin.zsh @@ -1,6 +1,8 @@ if [ $commands[autojump] ]; then # check if autojump is installed if [ -f $HOME/.autojump/etc/profile.d/autojump.zsh ]; then # manual user-local installation . $HOME/.autojump/etc/profile.d/autojump.zsh + elif [ -f $HOME/.nix-profile/etc/profile.d/autojump.zsh ]; then # nix installation + . $HOME/.nix-profile/etc/profile.d/autojump.zsh elif [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package . /usr/share/autojump/autojump.zsh elif [ -f /etc/profile.d/autojump.zsh ]; then # manual installation From 00ec11d3c0a2b2b7413ad84940ddec299aafbb04 Mon Sep 17 00:00:00 2001 From: DanielFGray <DanielFGray@gmail.com> Date: Sun, 16 Nov 2014 02:47:35 -0600 Subject: [PATCH 218/488] ignore any grep aliases that might be defined --- lib/git.zsh | 2 +- plugins/mercurial/mercurial.plugin.zsh | 2 +- plugins/svn-fast-info/svn-fast-info.plugin.zsh | 12 ++++++------ plugins/svn/svn.plugin.zsh | 4 ++-- themes/agnoster.zsh-theme | 4 ++-- themes/bureau.zsh-theme | 2 +- themes/mortalscumbag.zsh-theme | 6 +++--- 7 files changed, 16 insertions(+), 16 deletions(-) diff --git a/lib/git.zsh b/lib/git.zsh index aba095422..913a642b3 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -78,7 +78,7 @@ function git_prompt_long_sha() { git_prompt_status() { INDEX=$(command git status --porcelain -b 2> /dev/null) STATUS="" - if $(echo "$INDEX" | grep -E '^\?\? ' &> /dev/null); then + if $(echo "$INDEX" | command grep -E '^\?\? ' &> /dev/null); then STATUS="$ZSH_THEME_GIT_PROMPT_UNTRACKED$STATUS" fi if $(echo "$INDEX" | grep '^A ' &> /dev/null); then diff --git a/plugins/mercurial/mercurial.plugin.zsh b/plugins/mercurial/mercurial.plugin.zsh index ff95d5e40..ed4d23713 100644 --- a/plugins/mercurial/mercurial.plugin.zsh +++ b/plugins/mercurial/mercurial.plugin.zsh @@ -42,7 +42,7 @@ $ZSH_THEME_REPO_NAME_COLOR$_DISPLAY$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_HG_PROMPT_SU function hg_dirty_choose { if [ $(in_hg) ]; then - hg status 2> /dev/null | grep -Eq '^\s*[ACDIM!?L]' + hg status 2> /dev/null | command grep -Eq '^\s*[ACDIM!?L]' if [ $pipestatus[-1] -eq 0 ]; then # Grep exits with 0 when "One or more lines were selected", return "dirty". echo $1 diff --git a/plugins/svn-fast-info/svn-fast-info.plugin.zsh b/plugins/svn-fast-info/svn-fast-info.plugin.zsh index ea19bcea0..9ea7f641d 100644 --- a/plugins/svn-fast-info/svn-fast-info.plugin.zsh +++ b/plugins/svn-fast-info/svn-fast-info.plugin.zsh @@ -63,11 +63,11 @@ function svn_current_revision() { function svn_status_info() { local svn_status_string="$ZSH_THEME_SVN_PROMPT_CLEAN" local svn_status="$(svn status 2> /dev/null)"; - if grep -E '^\s*A' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_ADDITIONS:-+}"; fi - if grep -E '^\s*D' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_DELETIONS:-✖}"; fi - if grep -E '^\s*M' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_MODIFICATIONS:-✎}"; fi - if grep -E '^\s*[R~]' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_REPLACEMENTS:-∿}"; fi - if grep -E '^\s*\?' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_UNTRACKED:-?}"; fi - if grep -E '^\s*[CI!L]' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_DIRTY:-'!'}"; fi + if command grep -E '^\s*A' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_ADDITIONS:-+}"; fi + if command grep -E '^\s*D' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_DELETIONS:-✖}"; fi + if command grep -E '^\s*M' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_MODIFICATIONS:-✎}"; fi + if command grep -E '^\s*[R~]' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_REPLACEMENTS:-∿}"; fi + if command grep -E '^\s*\?' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_UNTRACKED:-?}"; fi + if command grep -E '^\s*[CI!L]' &> /dev/null <<< $svn_status; then svn_status_string="$svn_status_string ${ZSH_THEME_SVN_PROMPT_DIRTY:-'!'}"; fi echo $svn_status_string } diff --git a/plugins/svn/svn.plugin.zsh b/plugins/svn/svn.plugin.zsh index ba281d790..9f7a4c6eb 100644 --- a/plugins/svn/svn.plugin.zsh +++ b/plugins/svn/svn.plugin.zsh @@ -61,7 +61,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'` - if $(svn status $root 2> /dev/null | grep -Eq '^\s*[ACDIM!?L]'); then + 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 else @@ -78,7 +78,7 @@ function svn_dirty() { function svn_dirty_choose_pwd () { if in_svn; then root=$PWD - if $(svn status $root 2> /dev/null | grep -Eq '^\s*[ACDIM!?L]'); then + 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 else diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 7a62bd860..8c7be6e01 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -123,10 +123,10 @@ prompt_hg() { st="" rev=$(hg id -n 2>/dev/null | sed 's/[^-0-9]//g') branch=$(hg id -b 2>/dev/null) - if `hg st | grep -Eq "^\?"`; then + if `hg st | grep -q "^\?"`; then prompt_segment red black st='±' - elif `hg st | grep -Eq "^(M|A)"`; then + elif `hg st | grep -q "^(M|A)"`; then prompt_segment yellow black st='±' else diff --git a/themes/bureau.zsh-theme b/themes/bureau.zsh-theme index 443d1d5ee..148abec10 100644 --- a/themes/bureau.zsh-theme +++ b/themes/bureau.zsh-theme @@ -31,7 +31,7 @@ bureau_git_status () { if $(echo "$_INDEX" | grep '^.[MTD] ' &> /dev/null); then _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED" fi - if $(echo "$_INDEX" | grep -E '^\?\? ' &> /dev/null); then + if $(echo "$_INDEX" | command grep -E '^\?\? ' &> /dev/null); then _STATUS="$_STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED" fi if $(echo "$_INDEX" | grep '^UU ' &> /dev/null); then diff --git a/themes/mortalscumbag.zsh-theme b/themes/mortalscumbag.zsh-theme index 5dbf2e4f6..ccce4197a 100644 --- a/themes/mortalscumbag.zsh-theme +++ b/themes/mortalscumbag.zsh-theme @@ -10,12 +10,12 @@ function my_git_prompt() { fi # is anything staged? - if $(echo "$INDEX" | grep -E -e '^(D[ M]|[MARC][ MD]) ' &> /dev/null); then + if $(echo "$INDEX" | command grep -E -e '^(D[ M]|[MARC][ MD]) ' &> /dev/null); then STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_STAGED" fi # is anything unstaged? - if $(echo "$INDEX" | grep -E -e '^[ MARC][MD] ' &> /dev/null); then + if $(echo "$INDEX" | command grep -E -e '^[ MARC][MD] ' &> /dev/null); then STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNSTAGED" fi @@ -25,7 +25,7 @@ function my_git_prompt() { fi # is anything unmerged? - if $(echo "$INDEX" | grep -E -e '^(A[AU]|D[DU]|U[ADU]) ' &> /dev/null); then + if $(echo "$INDEX" | command grep -E -e '^(A[AU]|D[DU]|U[ADU]) ' &> /dev/null); then STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNMERGED" fi From 0c04470f6370c329ce8252371fe617673b515d45 Mon Sep 17 00:00:00 2001 From: "Kravchuk S.V" <alfss.obsd@gmail.com> Date: Fri, 14 Nov 2014 13:05:11 +0300 Subject: [PATCH 219/488] [~] fix plugin pj https://github.com/robbyrussell/oh-my-zsh/commit/bce74975d055529cbd186782e2fd99e6da840460 --- plugins/pj/pj.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/pj/pj.plugin.zsh b/plugins/pj/pj.plugin.zsh index f9cbddf1a..1572e9363 100644 --- a/plugins/pj/pj.plugin.zsh +++ b/plugins/pj/pj.plugin.zsh @@ -42,8 +42,8 @@ function _pj () { # might be possible to improve this using glob, without the basename trick typeset -a projects projects=($PROJECT_PATHS/*) - projects=$projects:t - _arguments '*:file:($projects)' + projects=$projects:t + _arguments "*:file:($projects)" } compdef _pj pj From a301f567e3a7ac2eb0b1f77d6ff97f50d63ba864 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Wed, 19 Nov 2014 18:33:00 +0100 Subject: [PATCH 220/488] Switch back to oh-my-zsh.hide-dirty setting again Commit 81004dfaba509ff62a13ba303ab941938d619326 reverted the change in 9b811fb625c03c30a766191cdf65a1c7c1fd96b2 when editing the merge conflict from #2928. This commit fixes that so that we don't make the same mistake again. First seen in http://git.io/Cdaj5Q --- lib/git.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index aba095422..748520a6f 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -13,7 +13,7 @@ parse_git_dirty() { local STATUS='' local FLAGS FLAGS=('--porcelain') - if [[ "$(command git config --get oh-my-zsh.hide-status)" != "1" ]]; then + if [[ "$(command git config --get oh-my-zsh.hide-dirty)" != "1" ]]; then if [[ $POST_1_7_2_GIT -gt 0 ]]; then FLAGS+='--ignore-submodules=dirty' fi From b6b1dd3cd713751c5295b8346af071b420a99f87 Mon Sep 17 00:00:00 2001 From: Doan Truong Thi <t@thi.im> Date: Fri, 21 Nov 2014 10:07:23 +0900 Subject: [PATCH 221/488] Fix Yosemite broken zsh where $PATH var does not get appended correctly. Sourcing oh-my-zsh immediately after export PATH. --- templates/zshrc.zsh-template | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index a12eca2a0..763288dfd 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -47,13 +47,13 @@ ZSH_THEME="robbyrussell" # Add wisely, as too many plugins slow down shell startup. plugins=(git) -source $ZSH/oh-my-zsh.sh - # User configuration export PATH=$HOME/bin:/usr/local/bin:$PATH # export MANPATH="/usr/local/man:$MANPATH" +source $ZSH/oh-my-zsh.sh + # You may need to manually set your language environment # export LANG=en_US.UTF-8 From 1dfadc734cb10c5512be4ec1dbe329a3e362ab20 Mon Sep 17 00:00:00 2001 From: Eric Ripa <eric@ripa.io> Date: Mon, 24 Nov 2014 09:54:50 +0100 Subject: [PATCH 222/488] Fix chruby plugin to not complain if chruby is *not* installed --- plugins/chruby/chruby.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/chruby/chruby.plugin.zsh b/plugins/chruby/chruby.plugin.zsh index 2a2c80cf6..b461b0c9b 100644 --- a/plugins/chruby/chruby.plugin.zsh +++ b/plugins/chruby/chruby.plugin.zsh @@ -24,7 +24,7 @@ _homebrew-installed() { } _chruby-from-homebrew-installed() { - brew --prefix chruby &> /dev/null + [ -r $(brew --prefix chruby)] &> /dev/null } _ruby-build_installed() { @@ -45,11 +45,11 @@ _source_from_omz_settings() { zstyle -s :omz:plugins:chruby path _chruby_path zstyle -s :omz:plugins:chruby auto _chruby_auto - if _chruby_path && [[ -r _chruby_path ]]; then + if ${_chruby_path} && [[ -r ${_chruby_path} ]]; then source ${_chruby_path} fi - if _chruby_auto && [[ -r _chruby_auto ]]; then + if ${_chruby_auto} && [[ -r ${_chruby_auto} ]]; then source ${_chruby_auto} fi } From 663d43241cd890c2fa78040a612c6d424674c5f9 Mon Sep 17 00:00:00 2001 From: Christopher Harrison <github@acc.xoph.co> Date: Mon, 24 Nov 2014 09:56:47 +0000 Subject: [PATCH 223/488] Minor cosmetic fix to minimal theme Set the closing square-brace's FG colour to white, to match the opening brace, when the repo directory is dirty. --- themes/minimal.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/minimal.zsh-theme b/themes/minimal.zsh-theme index a2a16031f..fbd620225 100644 --- a/themes/minimal.zsh-theme +++ b/themes/minimal.zsh-theme @@ -1,6 +1,6 @@ ZSH_THEME_GIT_PROMPT_PREFIX="%{$reset_color%}%{$fg[white]%}[" ZSH_THEME_GIT_PROMPT_SUFFIX="" -ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$reset_color%}]%{$reset_color%} " +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}●%{$fg[white]%}]%{$reset_color%} " ZSH_THEME_GIT_PROMPT_CLEAN="]%{$reset_color%} " ZSH_THEME_SVN_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX ZSH_THEME_SVN_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX @@ -15,4 +15,4 @@ vcs_status() { fi } -PROMPT='%2~ $(vcs_status)»%b ' \ No newline at end of file +PROMPT='%2~ $(vcs_status)»%b ' From db8eacf6fd0570c8e49e59a44c214bd927479861 Mon Sep 17 00:00:00 2001 From: Will Boyce <me@willboyce.com> Date: Mon, 9 Jun 2014 18:04:16 +0100 Subject: [PATCH 224/488] use pigz if available in extract plugin --- plugins/extract/extract.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/extract/extract.plugin.zsh b/plugins/extract/extract.plugin.zsh index a6e16ddf7..898d3d36e 100644 --- a/plugins/extract/extract.plugin.zsh +++ b/plugins/extract/extract.plugin.zsh @@ -38,7 +38,7 @@ function extract() { file_name="$( basename "$1" )" extract_dir="$( echo "$file_name" | sed "s/\.${1##*.}//g" )" case "$1" in - (*.tar.gz|*.tgz) tar xvzf "$1" ;; + (*.tar.gz|*.tgz) [ -z $commands[pigz] ] && tar zxvf "$1" || pigz -dc "$1" | tar xv ;; (*.tar.bz2|*.tbz|*.tbz2) tar xvjf "$1" ;; (*.tar.xz|*.txz) tar --xz --help &> /dev/null \ && tar --xz -xvf "$1" \ @@ -47,7 +47,7 @@ function extract() { && tar --lzma -xvf "$1" \ || lzcat "$1" | tar xvf - ;; (*.tar) tar xvf "$1" ;; - (*.gz) gunzip "$1" ;; + (*.gz) [ -z $commands[pigz] ] && gunzip "$1" || pigz -d "$1" ;; (*.bz2) bunzip2 "$1" ;; (*.xz) unxz "$1" ;; (*.lzma) unlzma "$1" ;; From 4b05e548d0b56238521b07dac1969e8cd2dcf608 Mon Sep 17 00:00:00 2001 From: benjaoming <benjaoming@gmail.com> Date: Fri, 22 Nov 2013 11:48:13 +0100 Subject: [PATCH 225/488] Throw an error message when $WORKON_HOME is not set Took me a while to figure this one out, and I have a default installation of virtualenvwrapper -- this is a soft fix, just put an error message. But perhaps the fix should be to use the default value `~/.virtualenvs`. --- .../virtualenvwrapper.plugin.zsh | 100 ++++++++++-------- 1 file changed, 53 insertions(+), 47 deletions(-) diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index f58bda1ad..52e02d3e0 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -1,57 +1,63 @@ virtualenvwrapper='virtualenvwrapper.sh' if (( $+commands[$virtualenvwrapper] )); then + source ${${virtualenvwrapper}:c} - if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then - # Automatically activate Git projects's virtual environments 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 - function workon_cwd { - if [ ! $WORKON_CWD ]; then - WORKON_CWD=1 - # Check if this is a Git repo - PROJECT_ROOT=`git rev-parse --show-toplevel 2> /dev/null` - if (( $? != 0 )); then - PROJECT_ROOT="." - fi - # Check for virtualenv name override - if [[ -f "$PROJECT_ROOT/.venv" ]]; then - 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"` - else - ENV_NAME="" - fi - if [[ "$ENV_NAME" != "" ]]; then - # Activate the environment only if it is not already active - if [[ "$VIRTUAL_ENV" != "$WORKON_HOME/$ENV_NAME" ]]; then - if [[ -e "$WORKON_HOME/$ENV_NAME/bin/activate" ]]; then - workon "$ENV_NAME" && export CD_VIRTUAL_ENV="$ENV_NAME" - elif [[ -e "$ENV_NAME/bin/activate" ]]; then - source $ENV_NAME/bin/activate && export CD_VIRTUAL_ENV="$ENV_NAME" - fi - fi - elif [ $CD_VIRTUAL_ENV ]; then - # We've just left the repo, deactivate the environment - # Note: this only happens if the virtualenv was activated automatically - deactivate && unset CD_VIRTUAL_ENV - fi - unset PROJECT_ROOT - unset WORKON_CWD - fi - } + if [[ "$WORKON_HOME" == "" ]]; then + echo "\$WORKON_HOME is not defined so ZSH plugin virtualenvwrapper will not work" + else - # Append workon_cwd to the chpwd_functions array, so it will be called on cd - # http://zsh.sourceforge.net/Doc/Release/Functions.html - # TODO: replace with 'add-zsh-hook chpwd workon_cwd' when oh-my-zsh min version is raised above 4.3.4 - if (( ${+chpwd_functions} )); then - if (( $chpwd_functions[(I)workon_cwd] == 0 )); then - set -A chpwd_functions $chpwd_functions workon_cwd + if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then + # Automatically activate Git projects's virtual environments 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 + function workon_cwd { + if [ ! $WORKON_CWD ]; then + WORKON_CWD=1 + # Check if this is a Git repo + PROJECT_ROOT=`git rev-parse --show-toplevel 2> /dev/null` + if (( $? != 0 )); then + PROJECT_ROOT="." + fi + # Check for virtualenv name override + if [[ -f "$PROJECT_ROOT/.venv" ]]; then + 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"` + else + ENV_NAME="" + fi + if [[ "$ENV_NAME" != "" ]]; then + # Activate the environment only if it is not already active + if [[ "$VIRTUAL_ENV" != "$WORKON_HOME/$ENV_NAME" ]]; then + if [[ -e "$WORKON_HOME/$ENV_NAME/bin/activate" ]]; then + workon "$ENV_NAME" && export CD_VIRTUAL_ENV="$ENV_NAME" + elif [[ -e "$ENV_NAME/bin/activate" ]]; then + source $ENV_NAME/bin/activate && export CD_VIRTUAL_ENV="$ENV_NAME" + fi + fi + elif [ $CD_VIRTUAL_ENV ]; then + # We've just left the repo, deactivate the environment + # Note: this only happens if the virtualenv was activated automatically + deactivate && unset CD_VIRTUAL_ENV + fi + unset PROJECT_ROOT + unset WORKON_CWD fi - else + } + + # Append workon_cwd to the chpwd_functions array, so it will be called on cd + # http://zsh.sourceforge.net/Doc/Release/Functions.html + # TODO: replace with 'add-zsh-hook chpwd workon_cwd' when oh-my-zsh min version is raised above 4.3.4 + if (( ${+chpwd_functions} )); then + if (( $chpwd_functions[(I)workon_cwd] == 0 )); then + set -A chpwd_functions $chpwd_functions workon_cwd + fi + else set -A chpwd_functions workon_cwd + fi fi fi else From c6a8b2ea6d80e33716ce5590f4c4aff96776f06e Mon Sep 17 00:00:00 2001 From: mizabrik <myxabrik@users.noreply.github.com> Date: Fri, 28 Nov 2014 19:40:56 +0300 Subject: [PATCH 226/488] Save ZSH path in newly created .zshrc --- tools/install.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index a53ac48ab..35548005a 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -23,8 +23,8 @@ fi echo "\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[0m" cp $ZSH/templates/zshrc.zsh-template ~/.zshrc -sed -i -e "/^ZSH=/ c\\ -ZSH=$ZSH +sed -i -e "/^export ZSH=/ c\\ +export ZSH=$ZSH " ~/.zshrc echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m" From 1ebc98b9ede5ad5084b3e504e4fc8c01cb93be71 Mon Sep 17 00:00:00 2001 From: Joe Block <jpb@unixorn.net> Date: Sun, 30 Nov 2014 17:37:47 -0800 Subject: [PATCH 227/488] Don't clobber HISTSIZE or SAVEHIST if they're already set --- lib/history.zsh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/history.zsh b/lib/history.zsh index 1d83e56e3..12dbcf4ee 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -1,9 +1,13 @@ ## Command history configuration -if [ -z $HISTFILE ]; then +if [ -z "$HISTFILE" ]; then HISTFILE=$HOME/.zsh_history fi -HISTSIZE=10000 -SAVEHIST=10000 +if [ -z "$HISTSIZE" ]; then + HISTSIZE=10000 +fi +if [ -z "$SAVEHIST" ]; then + SAVEHIST=10000 +fi setopt extended_history setopt hist_expire_dups_first From 5bf715787a4483cafd70461417cb9a1bf8d1509f Mon Sep 17 00:00:00 2001 From: Joe Block <jpb@unixorn.net> Date: Sun, 30 Nov 2014 17:39:21 -0800 Subject: [PATCH 228/488] Existing code indents with spaces, not tabs, conform. --- lib/history.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/history.zsh b/lib/history.zsh index 12dbcf4ee..179c22848 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -3,10 +3,10 @@ if [ -z "$HISTFILE" ]; then HISTFILE=$HOME/.zsh_history fi if [ -z "$HISTSIZE" ]; then - HISTSIZE=10000 + HISTSIZE=10000 fi if [ -z "$SAVEHIST" ]; then - SAVEHIST=10000 + SAVEHIST=10000 fi setopt extended_history From 575bb91b5f2e1220e566385e2982ca4f72521819 Mon Sep 17 00:00:00 2001 From: Emil Marashliev <Emil.Marashliev@paddypower.com> Date: Mon, 1 Dec 2014 13:34:18 +0200 Subject: [PATCH 229/488] Added Xcode alias for deleting Derived Data. --- plugins/xcode/xcode.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index b7b75cf93..1d1205b80 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -16,6 +16,7 @@ function xcsel { alias xcb='xcodebuild' alias xcp='xcode-select --print-path' +alias xcdd='rm -rf ~/Library/Developer/Xcode/DerivedData/*' 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' From 011f25d492ab23b0f1dd50ea0f406892810e781e Mon Sep 17 00:00:00 2001 From: Ion Marusic <ion.marusic@gmail.com> Date: Tue, 2 Dec 2014 20:10:47 +0200 Subject: [PATCH 230/488] Fixed command autocomplete for Symfony 2.6.x --- plugins/symfony2/symfony2.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh index 8df22e9ad..7a19cbdd3 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 '/^ ?[a-z]+/ { print $1 }' } _symfony2 () { @@ -23,4 +23,4 @@ alias sfcl='sf cache:clear' alias sfcw='sf cache:warmup' alias sfroute='sf router:debug' alias sfcontainer='sf container:debug' -alias sfgb='sf generate:bundle' \ No newline at end of file +alias sfgb='sf generate:bundle' From a19d1d1f05281fc286991ff85010d6d431ae1d58 Mon Sep 17 00:00:00 2001 From: ZHANG Biao <bbbiao@gmail.com> Date: Thu, 4 Dec 2014 11:38:37 +0800 Subject: [PATCH 231/488] autojump installed from github has mv the autojump.zsh to $HOME/.autojump/share/autojump/autojump.zsh --- plugins/autojump/autojump.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh index 652d22696..4cf036401 100644 --- a/plugins/autojump/autojump.plugin.zsh +++ b/plugins/autojump/autojump.plugin.zsh @@ -1,6 +1,8 @@ if [ $commands[autojump] ]; then # check if autojump is installed if [ -f $HOME/.autojump/etc/profile.d/autojump.zsh ]; then # manual user-local installation . $HOME/.autojump/etc/profile.d/autojump.zsh + elif [ -f $HOME/.autojump/share/autojump/autojump.zsh ]; then # another manual user-local installation + . $HOME/.autojump/share/autojump/autojump.zsh elif [ -f $HOME/.nix-profile/etc/profile.d/autojump.zsh ]; then # nix installation . $HOME/.nix-profile/etc/profile.d/autojump.zsh elif [ -f /usr/share/autojump/autojump.zsh ]; then # debian and ubuntu package From ed029f18010ea10c7bc4a2a90f75111503e613d9 Mon Sep 17 00:00:00 2001 From: Will Boyce <me@willboyce.com> Date: Tue, 29 Apr 2014 14:38:48 +0100 Subject: [PATCH 232/488] allow overriding lib/*.zsh in custom/lib --- oh-my-zsh.sh | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index d0e89f31b..d75b521c7 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -8,18 +8,20 @@ fi # add a function path fpath=($ZSH/functions $ZSH/completions $fpath) -# Load all of the config files in ~/oh-my-zsh that end in .zsh -# TIP: Add files you don't want in git to .gitignore -for config_file ($ZSH/lib/*.zsh); do - source $config_file -done - # Set ZSH_CUSTOM to the path where your custom config files # and plugins exists, or else we will use the default custom/ if [[ -z "$ZSH_CUSTOM" ]]; then ZSH_CUSTOM="$ZSH/custom" fi +# Load all of the config files in ~/oh-my-zsh that end in .zsh +# TIP: Add files you don't want in git to .gitignore +for config_file ($ZSH/lib/*.zsh); do + custom_config_file="${ZSH_CUSTOM}/lib/${config_file:t}" + [ -f "${custom_config_file}" ] && config_file=${custom_config_file} + source $config_file +done + is_plugin() { local base_dir=$1 From 9bab8ccb89466be8bc8c579264f51b194aa89612 Mon Sep 17 00:00:00 2001 From: Anatoly Bubenkov <bubenkoff@gmail.com> Date: Wed, 10 Dec 2014 13:40:34 +0100 Subject: [PATCH 233/488] add current bookmark to rkj-repos theme --- themes/rkj-repos.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/rkj-repos.zsh-theme b/themes/rkj-repos.zsh-theme index 6289427c2..eed084f15 100644 --- a/themes/rkj-repos.zsh-theme +++ b/themes/rkj-repos.zsh-theme @@ -4,7 +4,7 @@ function hg_prompt_info { hg prompt --angle-brackets "\ -<hg:%{$fg[magenta]%}<branch>%{$reset_color%}>\ +<hg:%{$fg[magenta]%}<branch>%{$reset_color%}><:%{$fg[magenta]%}<bookmark>%{$reset_color%}>\ </%{$fg[yellow]%}<tags|%{$reset_color%}, %{$fg[yellow]%}>%{$reset_color%}>\ %{$fg[red]%}<status|modified|unknown><update>%{$reset_color%}< patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset_color%})|pre_unapplied(%{$fg_bold[black]%})|post_unapplied(%{$reset_color%})>>" 2>/dev/null From 6f70d288cc4625142413227109bf1eeac7e2a180 Mon Sep 17 00:00:00 2001 From: zghember <zghpku@gmail.com> Date: Thu, 11 Dec 2014 19:47:29 +0800 Subject: [PATCH 234/488] Update theme "jispwoso" to support ret status and git --- themes/jispwoso.zsh-theme | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/themes/jispwoso.zsh-theme b/themes/jispwoso.zsh-theme index cdfef3871..748430573 100644 --- a/themes/jispwoso.zsh-theme +++ b/themes/jispwoso.zsh-theme @@ -1,4 +1,10 @@ -PROMPT=$'%{$fg[green]%}%n@%m: %{$reset_color%}%{$fg[blue]%}%/%{$reset_color%} -%{$fg_bold[red]%}➜ %{$reset_color%} ' +local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)" +PROMPT=$'%{$fg[green]%}%n@%m: %{$reset_color%}%{$fg[blue]%}%/ %{$reset_color%}%{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%} +${ret_status} %{$reset_color%} ' PROMPT2="%{$fg_blod[black]%}%_> %{$reset_color%}" + +ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%})" From 9677cfb34e896a59896c4cc747108ca8e3d20e86 Mon Sep 17 00:00:00 2001 From: Rotem Yaari <vmalloc@gmail.com> Date: Thu, 11 Dec 2014 23:41:47 +0200 Subject: [PATCH 235/488] Fix dircycle plugin dircycle right did not behave as expected and was fixed --- plugins/dircycle/dircycle.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/dircycle/dircycle.plugin.zsh b/plugins/dircycle/dircycle.plugin.zsh index 46a0ab268..c6b6ba785 100644 --- a/plugins/dircycle/dircycle.plugin.zsh +++ b/plugins/dircycle/dircycle.plugin.zsh @@ -5,6 +5,6 @@ eval "insert-cycledleft () { zle push-line; LBUFFER='pushd -q +1'; zle accept-line }" zle -N insert-cycledleft bindkey "\e[1;6D" insert-cycledleft -eval "insert-cycledright () { zle push-line; LBUFFER='pushd -q -0'; zle accept-line }" +eval "insert-cycledright () { zle push-line; LBUFFER='pushd -q +0'; zle accept-line }" zle -N insert-cycledright bindkey "\e[1;6C" insert-cycledright From 1d2c1e8ab80922fb673a08440a8e2b33b9231de1 Mon Sep 17 00:00:00 2001 From: "Pete \"Peteches\" McCabe" <peteches@petemccabe.gb.net> Date: Fri, 12 Dec 2014 17:37:35 +0000 Subject: [PATCH 236/488] Fixed output issues webith websearch plugin. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - if user has rm set as an alias to 'rm -i' user is prompted to whether to remove the nohup.out file. $ ddg fools nohup: ignoring input and appending output to ‘nohup.out’ rm: remove regular empty file ‘nohup.out’? - if output redirected to a file nohup will not create nohup.out and rm is unecessary. --- plugins/web-search/web-search.plugin.zsh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index 371e3a303..28559deb9 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -37,8 +37,7 @@ function web_search() { done url="${url%?}" # remove the last '+' - nohup $open_cmd "$url" - rm nohup.out + nohup $open_cmd "$url" >/dev/null 2&>1 } From 43a2e24c25531c27e502313d23c44bd5d7e0c405 Mon Sep 17 00:00:00 2001 From: Ryan Robeson <ryan.robeson@gmail.com> Date: Fri, 12 Dec 2014 15:56:59 -0500 Subject: [PATCH 237/488] Add itunes shuffle command to OSX plugin. Added shuffle functionality to the itunes command in the OSX plugin. iTunes 12 doesn't support setting the "shuffle" property on the playlist from what I've read, so this simulates the user interacting with the iTunes interface. The toggle option "clicks" the shuffle button in the Now Playing area. This has the effect of toggling the shuffle setting on whatever is currently playing. The on and off options use the Shuffle menu bar items. Usage: itunes shuffle [on|off|toggle] --- plugins/osx/osx.plugin.zsh | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index 2eea0d8ef..d366f1fc8 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -177,12 +177,43 @@ function itunes() { vol) opt="set sound volume to $1" #$1 Due to the shift ;; + 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. + # Defaults to toggling when no options are given. + # The toggle option depends on the shuffle button being visible in the Now playing area. + # On and off use the menu bar items. + local state=$1 + + if [[ -n "$state" && ! "$state" =~ "^(on|off|toggle)$" ]] + then + print "Usage: itunes shuffle [on|off|toggle]. Invalid option." + return 1 + fi + + case "$state" in + on|off) + # Inspired by: http://stackoverflow.com/a/14675583 + osascript 1>/dev/null 2>&1 <<-EOF + tell application "System Events" to perform action "AXPress" of (menu item "${state}" of menu "Shuffle" of menu item "Shuffle" of menu "Controls" of menu bar item "Controls" of menu bar 1 of application process "iTunes" ) +EOF + return 0 + ;; + toggle|*) + osascript 1>/dev/null 2>&1 <<-EOF + tell application "System Events" to perform action "AXPress" of (button 2 of process "iTunes"'s window "iTunes"'s scroll area 1) +EOF + return 0 + ;; + esac + ;; ""|-h|--help) echo "Usage: itunes <option>" echo "option:" echo "\tlaunch|play|pause|stop|rewind|resume|quit" echo "\tmute|unmute\tcontrol volume set" 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 "\thelp\tshow this message and exit" return 0 From 0bd3c9996fa58494fbefaad483abbe60ed332889 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Sat, 13 Dec 2014 19:13:27 +0100 Subject: [PATCH 238/488] Extract VCS folders definition to avoid repetition --- lib/grep.zsh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/lib/grep.zsh b/lib/grep.zsh index 276fec382..ad38ec6fc 100644 --- a/lib/grep.zsh +++ b/lib/grep.zsh @@ -6,18 +6,17 @@ GREP_OPTIONS="--color=auto" # avoid VCS folders (if the necessary grep flags are available) +VCS_FOLDERS="{.cvs,.git,.hg,.svn}" + grep-flag-available() { echo | grep $1 "" >/dev/null 2>&1 } if grep-flag-available --exclude-dir=.cvs; then - for PATTERN in .cvs .git .hg .svn; do - GREP_OPTIONS+=" --exclude-dir=$PATTERN" - done + GREP_OPTIONS+=" --exclude-dir=$VCS_FOLDERS" elif grep-flag-available --exclude=.cvs; then - for PATTERN in .cvs .git .hg .svn; do - GREP_OPTIONS+=" --exclude=$PATTERN" - done + GREP_OPTIONS+=" --exclude=$VCS_FOLDERS" fi +unset VCS_FOLDERS unfunction grep-flag-available export GREP_OPTIONS="$GREP_OPTIONS" From cf586b54b8aacd7fad7afc74d4f395da56e828b6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Sat, 13 Dec 2014 19:14:23 +0100 Subject: [PATCH 239/488] Ignore .bzr folders in grep too --- lib/grep.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/grep.zsh b/lib/grep.zsh index ad38ec6fc..4a44113e1 100644 --- a/lib/grep.zsh +++ b/lib/grep.zsh @@ -6,7 +6,7 @@ GREP_OPTIONS="--color=auto" # avoid VCS folders (if the necessary grep flags are available) -VCS_FOLDERS="{.cvs,.git,.hg,.svn}" +VCS_FOLDERS="{.bzr,.cvs,.git,.hg,.svn}" grep-flag-available() { echo | grep $1 "" >/dev/null 2>&1 From 0190eb084bfb39bfa5920f85c2fc33730236217c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Sat, 13 Dec 2014 19:18:11 +0100 Subject: [PATCH 240/488] Use unaliased grep in flag check --- lib/grep.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/grep.zsh b/lib/grep.zsh index 4a44113e1..06751db1a 100644 --- a/lib/grep.zsh +++ b/lib/grep.zsh @@ -9,7 +9,7 @@ GREP_OPTIONS="--color=auto" VCS_FOLDERS="{.bzr,.cvs,.git,.hg,.svn}" grep-flag-available() { - echo | grep $1 "" >/dev/null 2>&1 + echo | command grep $1 "" >/dev/null 2>&1 } if grep-flag-available --exclude-dir=.cvs; then GREP_OPTIONS+=" --exclude-dir=$VCS_FOLDERS" From 711843153d6e53a89d37931217f59c4f6a3a35db Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Sat, 13 Dec 2014 19:36:57 +0100 Subject: [PATCH 241/488] Tidy up the grep.zsh library --- lib/grep.zsh | 21 +++++++++++---------- 1 file changed, 11 insertions(+), 10 deletions(-) diff --git a/lib/grep.zsh b/lib/grep.zsh index 06751db1a..4e55464c5 100644 --- a/lib/grep.zsh +++ b/lib/grep.zsh @@ -1,23 +1,24 @@ -# -# Color grep results -# Examples: http://rubyurl.com/ZXv -# +# is x grep argument available? +grep-flag-available() { + echo | grep $1 "" >/dev/null 2>&1 +} +# color grep results GREP_OPTIONS="--color=auto" -# avoid VCS folders (if the necessary grep flags are available) +# ignore VCS folders (if the necessary grep flags are available) VCS_FOLDERS="{.bzr,.cvs,.git,.hg,.svn}" -grep-flag-available() { - echo | command grep $1 "" >/dev/null 2>&1 -} if grep-flag-available --exclude-dir=.cvs; then GREP_OPTIONS+=" --exclude-dir=$VCS_FOLDERS" elif grep-flag-available --exclude=.cvs; then GREP_OPTIONS+=" --exclude=$VCS_FOLDERS" fi -unset VCS_FOLDERS -unfunction grep-flag-available +# export grep settings export GREP_OPTIONS="$GREP_OPTIONS" export GREP_COLOR='1;32' + +# clean up +unset VCS_FOLDERS +unfunction grep-flag-available From dd270878053a73600382de1c3592c04d985e5e08 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ond=C5=99ej=20S=C3=BAkup?= <mimi.vx@gmail.com> Date: Mon, 24 Nov 2014 13:08:39 +0100 Subject: [PATCH 242/488] Change to alias and remove deprecated GREP_COLOR --- lib/grep.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/grep.zsh b/lib/grep.zsh index 4e55464c5..348ebe623 100644 --- a/lib/grep.zsh +++ b/lib/grep.zsh @@ -16,9 +16,9 @@ elif grep-flag-available --exclude=.cvs; then fi # export grep settings -export GREP_OPTIONS="$GREP_OPTIONS" -export GREP_COLOR='1;32' +alias grep="grep $GREP_OPTIONS" # clean up +unset GREP_OPTIONS unset VCS_FOLDERS unfunction grep-flag-available From 08b9f8d6770e2f626bca0d320d2b577e0e1597c5 Mon Sep 17 00:00:00 2001 From: ekaragodin <ekaragodin@gmail.com> Date: Sun, 14 Dec 2014 11:09:34 +0600 Subject: [PATCH 243/488] Added Yii2 command completion --- plugins/yii2/yii2.plugin.zsh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 plugins/yii2/yii2.plugin.zsh diff --git a/plugins/yii2/yii2.plugin.zsh b/plugins/yii2/yii2.plugin.zsh new file mode 100644 index 000000000..137b3a076 --- /dev/null +++ b/plugins/yii2/yii2.plugin.zsh @@ -0,0 +1,29 @@ +# Yii2 command completion + +_yii2_format_command () { + awk '/^- [a-z]+/ { sub(":", "", $2); print $2 }' +} + +_yii2 () { + if [ -f ./yii ]; then + _arguments \ + '1: :->command'\ + '*: :->params' + + case $state in + command) + + local -a commands + local -a name + + if [[ $words[2] == *\/ ]]; then + name=$words[2] + fi + + commands=(${(f)"$(./yii help $name | _yii2_format_command)"}) + compadd -Q -S '' -a -- commands + esac + fi +} + +compdef _yii2 yii From 7488e9b510f0fec31bb05362f8aa97ec857e8962 Mon Sep 17 00:00:00 2001 From: ekaragodin <ekaragodin@gmail.com> Date: Mon, 15 Dec 2014 08:18:18 +0600 Subject: [PATCH 244/488] Add yii2 readme --- plugins/yii2/README.md | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 plugins/yii2/README.md diff --git a/plugins/yii2/README.md b/plugins/yii2/README.md new file mode 100644 index 000000000..345b66eb6 --- /dev/null +++ b/plugins/yii2/README.md @@ -0,0 +1,7 @@ +# Yii2 autocomplete plugin + +* Adds autocomplete commands and subcommands for yii. + +## Requirements + +Autocomplete works from directory where your `yii` file contains. From 77da20997e8dd753193768d46fe27175a21f23cb Mon Sep 17 00:00:00 2001 From: David Feinberg <david@rawberg.com> Date: Sun, 14 Dec 2014 18:19:00 -0800 Subject: [PATCH 245/488] mira theme shows active node, ruby and java versions --- themes/mira.zsh-theme | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 themes/mira.zsh-theme diff --git a/themes/mira.zsh-theme b/themes/mira.zsh-theme new file mode 100644 index 000000000..fa2bf42f3 --- /dev/null +++ b/themes/mira.zsh-theme @@ -0,0 +1,29 @@ +# Based on bira zsh theme with nvm, rvm and jenv support +local return_code="%(?..%{$fg[red]%}%? ↵%{$reset_color%})" + +local user_host='%{$terminfo[bold]$fg[green]%}%n@%m%{$reset_color%}' +local current_dir='%{$terminfo[bold]$fg[blue]%} %~%{$reset_color%}' + +local rvm_ruby='' +if which rvm-prompt &> /dev/null; then + rvm_ruby='%{$fg[red]%}‹$(rvm-prompt i v g)›%{$reset_color%}' +else + if which rbenv &> /dev/null; then + rvm_ruby='%{$fg[red]%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$reset_color%}' + fi +fi + +local nvm_node='' +nvm_node='%{$fg[green]%}‹$(nvm_prompt_info)›%{$reset_color%}' + +local jenv_java='' +jenv_java='%{$fg[blue]%}‹$(jenv_prompt_info)›%{$reset_color%}' + +local git_branch='$(git_prompt_info)%{$reset_color%}' + +PROMPT="╭─${user_host} ${current_dir} ${nvm_node} ${rvm_ruby} ${jenv_java} ${git_branch} +╰─%B$%b " +RPS1="${return_code}" + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}(" +ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}" \ No newline at end of file From 02d647773a4331a5464918a0cebe35cf0bd614ed Mon Sep 17 00:00:00 2001 From: David Feinberg <david@rawberg.com> Date: Sun, 14 Dec 2014 18:28:06 -0800 Subject: [PATCH 246/488] added node- before node version for consistency --- themes/mira.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/mira.zsh-theme b/themes/mira.zsh-theme index fa2bf42f3..e6c952998 100644 --- a/themes/mira.zsh-theme +++ b/themes/mira.zsh-theme @@ -14,7 +14,7 @@ else fi local nvm_node='' -nvm_node='%{$fg[green]%}‹$(nvm_prompt_info)›%{$reset_color%}' +nvm_node='%{$fg[green]%}‹node-$(nvm_prompt_info)›%{$reset_color%}' local jenv_java='' jenv_java='%{$fg[blue]%}‹$(jenv_prompt_info)›%{$reset_color%}' @@ -26,4 +26,4 @@ PROMPT="╭─${user_host} ${current_dir} ${nvm_node} ${rvm_ruby} ${jenv_java} $ RPS1="${return_code}" ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg[yellow]%}(" -ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}" \ No newline at end of file +ZSH_THEME_GIT_PROMPT_SUFFIX=") %{$reset_color%}" From 00ff1bbd1c666be789f94c30cfdd837d16d190d8 Mon Sep 17 00:00:00 2001 From: ekaragodin <ekaragodin@gmail.com> Date: Mon, 15 Dec 2014 21:37:38 +0600 Subject: [PATCH 247/488] Updated Yii2 command completion --- plugins/yii2/yii2.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/yii2/yii2.plugin.zsh b/plugins/yii2/yii2.plugin.zsh index 137b3a076..e8993adf4 100644 --- a/plugins/yii2/yii2.plugin.zsh +++ b/plugins/yii2/yii2.plugin.zsh @@ -20,10 +20,10 @@ _yii2 () { name=$words[2] fi - commands=(${(f)"$(./yii help $name | _yii2_format_command)"}) + commands=(${(f)"$(./yii help $name --color=0 | _yii2_format_command)"}) compadd -Q -S '' -a -- commands esac fi } -compdef _yii2 yii +compdef _yii2 yii \ No newline at end of file From 1978a0923c864cacdc520adff83ed63f62c91073 Mon Sep 17 00:00:00 2001 From: Robby Russell <robby@planetargon.com> Date: Mon, 15 Dec 2014 08:11:04 -0800 Subject: [PATCH 248/488] Revert PR #3359 as this is breaking stuff for many folks. Need to rethink how we handle system defaults differently on this --- lib/history.zsh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/lib/history.zsh b/lib/history.zsh index 179c22848..e78a98e9e 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -2,12 +2,9 @@ if [ -z "$HISTFILE" ]; then HISTFILE=$HOME/.zsh_history fi -if [ -z "$HISTSIZE" ]; then - HISTSIZE=10000 -fi -if [ -z "$SAVEHIST" ]; then - SAVEHIST=10000 -fi + +HISTSIZE=10000 +SAVEHIST=10000 setopt extended_history setopt hist_expire_dups_first From 7931d5ce1a72cc49cc64478042bc3ef3b667ac8e Mon Sep 17 00:00:00 2001 From: Superbil <superbil@gmail.com> Date: Tue, 16 Dec 2014 00:17:58 +0800 Subject: [PATCH 249/488] Fix aws.plugins.zsh check rule Check _aws_zsh_completer_path had exist or not --- plugins/aws/aws.plugin.zsh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index de786725f..0ae18dd56 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -22,7 +22,10 @@ function aws_profiles { compctl -K aws_profiles asp if _homebrew-installed && _awscli-homebrew-installed ; then - source $(brew --prefix)/opt/awscli/libexec/bin/aws_zsh_completer.sh + _aws_zsh_completer_path=$(brew --prefix)/opt/awscli/libexec/bin/aws_zsh_completer.sh else - source `which aws_zsh_completer.sh` + _aws_zsh_completer_path=$(which aws_zsh_completer.sh) fi + +[ -x $_aws_zsh_completer_path ] && source $_aws_zsh_completer_path +unset _aws_zsh_completer_path From 83553597a1430e2f3459de74de1cf33ae4ce67be Mon Sep 17 00:00:00 2001 From: Mark Feltner <feltner.mj@gmail.com> Date: Tue, 14 Jan 2014 23:13:49 -0600 Subject: [PATCH 250/488] fix(tools/check_for_upgrade): Don't source profile Reverts #2296, but mostly #1883. There is no need to source ~/.profile when this script is read. oh-my-zsh writes no configuration data in ~/.profile. If the user wishes to use data within ~/.profile, then they should source it in another place. Fixes #2315 --- tools/check_for_upgrade.sh | 2 -- 1 file changed, 2 deletions(-) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index 4a0803210..b2b356e0c 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -22,8 +22,6 @@ if [[ -z "$epoch_target" ]]; then epoch_target=13 fi -[ -f ~/.profile ] && source ~/.profile - # Cancel upgrade if the current user doesn't have write permissions for the # oh-my-zsh directory. [[ -w "$ZSH" ]] || return 0 From f7deb52c478e3ae7045320130c1aa8ca9dca993f Mon Sep 17 00:00:00 2001 From: Christophe Coevoet <stof@notk.org> Date: Tue, 16 Dec 2014 17:35:08 +0100 Subject: [PATCH 251/488] Update the list of Heroku Postgres commands --- plugins/heroku/_heroku | 32 +++++++++----------------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/plugins/heroku/_heroku b/plugins/heroku/_heroku index 46663303a..bb2f7403f 100644 --- a/plugins/heroku/_heroku +++ b/plugins/heroku/_heroku @@ -27,8 +27,6 @@ _1st_arguments=( "config\:push":"push local config vars to heroku" "config\:set":"set one or more config vars" "config\:unset":"unset one or more config vars" - "db\:push":"push local data up to your app" - "db\:pull":"pull heroku data down into your local database" "domains":"list custom domains for an app" "domains\:add":"add a custom domain to an app" "domains\:remove":"remove a custom domain from an app" @@ -43,12 +41,20 @@ _1st_arguments=( "logs\:drains":"manage syslog drains" "maintenance\:on":"put the app into maintenance mode" "maintenance\:off":"take the app out of maintenance mode" + "pg\:credentials":"display the DATABASE credentials" + "pg\:diagnose":"run diagnostics report on DATABASE" "pg\:info":"display database information" - "pg\:ingress":"allow direct connections to the database from this IP for one minute" + "pg\:kill":"kill a query" + "pg\:killall":"terminates ALL connections" + "pg\:maintenance":"manage maintenance for DATABASE" "pg\:promote":"sets DATABASE as your DATABASE_URL" + "pg\:ps":"view active queries with execution time" "pg\:psql":"open a psql shell to the database" + "pg\:pull":"pull from REMOTE_SOURCE_DATABASE to LOCAL_TARGET_DATABASE" + "pg\:push":"push from LOCAL_SOURCE_DATABASE to REMOTE_TARGET_DATABASE" "pg\:reset":"delete all data in DATABASE" "pg\:unfollow":"stop a replica from following and make it a read/write database" + "pg\:upgrade":"unfollow a database and upgrade it to the latest PostgreSQL version" "pg\:wait":"monitor database creation, exit when complete" "pgbackups":"list captured backups" "pgbackups\:url":"get a temporary URL for a backup" @@ -108,26 +114,6 @@ case "$words[1]" in '(-s|--shell)'{-s,--shell}'[output config vars in shell format]' \ ) ;; - db:push) - _command_args=( - '(-c|--chunksize)'{-c,--chunksize}'[specify the number of rows to send in each batch]' \ - '(-d|--debug)'{-d,--debug}'[enable debugging output]' \ - '(-e|--exclude)'{-e,--exclude}'[exclude the specified tables from the push]' \ - '(-f|--filter)'{-f,--filter}'[only push certain tables]' \ - '(-r|--resume)'{-r,--resume}'[resume transfer described by a .dat file]' \ - '(-t|--tables)'{-t,--tables}'[only push the specified tables]' \ - ) - ;; - db:pull) - _command_args=( - '(-c|--chunksize)'{-c,--chunksize}'[specify the number of rows to send in each batch]' \ - '(-d|--debug)'{-d,--debug}'[enable debugging output]' \ - '(-e|--exclude)'{-e,--exclude}'[exclude the specified tables from the pull]' \ - '(-f|--filter)'{-f,--filter}'[only pull certain tables]' \ - '(-r|--resume)'{-r,--resume}'[resume transfer described by a .dat file]' \ - '(-t|--tables)'{-t,--tables}'[only pull the specified tables]' \ - ) - ;; keys) _command_args=( '(-l|--long)'{-l,--long}'[display extended information for each key]' \ From 16d07683058719811a7871cbf7bed066ac8fc784 Mon Sep 17 00:00:00 2001 From: Joe Block <jpb@unixorn.net> Date: Sun, 14 Dec 2014 21:10:48 -0800 Subject: [PATCH 252/488] Quote path in case $HOME has a space in it. I've seen stranger things on OS X, unfortunately. This reverts commit 1f5cecee4768be192e439a72a873a6cfe8720927. --- lib/nvm.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/nvm.zsh b/lib/nvm.zsh index 5cadf7061..61d997fc0 100644 --- a/lib/nvm.zsh +++ b/lib/nvm.zsh @@ -1,6 +1,6 @@ # get the node.js version function nvm_prompt_info() { - [ -f $HOME/.nvm/nvm.sh ] || return + [ -f "$HOME/.nvm/nvm.sh" ] || return local nvm_prompt nvm_prompt=$(node -v 2>/dev/null) [[ "${nvm_prompt}x" == "x" ]] && return From 9e5f0f0e9d22af07bd6cb4d509e66dfc8cfcd3bd Mon Sep 17 00:00:00 2001 From: Paul van den Berg <paul.vandenberg@nedap.com> Date: Thu, 18 Dec 2014 22:59:00 +0100 Subject: [PATCH 253/488] added exec command to docker plugin --- plugins/docker/_docker | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/plugins/docker/_docker b/plugins/docker/_docker index 28568a6e5..880b6faa6 100644 --- a/plugins/docker/_docker +++ b/plugins/docker/_docker @@ -4,6 +4,7 @@ # Requires: Docker installed # Author: Azaan (@aeonazaan) # Updates: Bob Maerten (@bobmaerten) for Docker v0.9+ +# Paul van den Berg (@bergvandenp) for Docker v1.3+ # ----- Helper functions @@ -238,6 +239,14 @@ __wait() { __docker_containers } +__exec() { + _arguments \ + '(-d,--detach=)'{-d,--detach=}'[Detached mode: run command in the background]' \ + '(-i,--interactive=)'{-i,--interactive=}'[Keep STDIN open even if not attached]' \ + '(-t,--tty=)'{-t,--tty=}'[Allocate a pseudo-TTY]' + __docker_containers +} + # end commands --------- # ---------------------- @@ -276,6 +285,7 @@ _1st_arguments=( "top":"Lookup the running processes of a container" "version":"Show the docker version information" "wait":"Block until a container stops, then print its exit code" + "exec":"Run a task inside a running container" ) _arguments '*:: :->command' @@ -353,4 +363,6 @@ case "$words[1]" in __version ;; wait) __wait ;; + exec) + __exec ;; esac From 7295e38885080b0650cbb274f03efca737552116 Mon Sep 17 00:00:00 2001 From: Andrew Janke <janke@pobox.com> Date: Sun, 21 Dec 2014 15:05:22 -0500 Subject: [PATCH 254/488] termsupport: add chpwd hook for setting pwd in Apple Terminal.app --- lib/termsupport.zsh | 16 ++++++++++++++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 9d6681603..d9f2b64d4 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -1,7 +1,6 @@ #usage: title short_tab_title looooooooooooooooooooooggggggg_windows_title #http://www.faqs.org/docs/Linux-mini/Xterm-Title.html#ss3.1 #Fully support screen, iterm, and probably most modern xterm and rxvt -#Limited support for Apple Terminal (Terminal can't set window or tab separately) function title { if [[ "$DISABLE_AUTO_TITLE" == "true" ]] || [[ "$EMACS" == *term* ]]; then return @@ -10,7 +9,7 @@ function title { print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars elif [[ "$TERM" == xterm* ]] || [[ $TERM == rxvt* ]] || [[ $TERM == ansi ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then print -Pn "\e]2;$2:q\a" #set window name - print -Pn "\e]1;$1:q\a" #set icon (=tab) name (will override window name on broken terminal) + print -Pn "\e]1;$1:q\a" #set icon (=tab) name fi } @@ -34,5 +33,18 @@ function omz_termsupport_preexec { title '$CMD' '%100>...>$LINE%<<' } +#Appears each time pwd is changed +function omz_termsupport_chpwd { + #Notify Terminal.app of current directory using undocumented OSC sequence + #found in OS X 10.10's /etc/bashrc + if [[ $TERM_PROGRAM == Apple_Terminal ]] && [[ -z $INSIDE_EMACS ]]; then + local PWD_URL="file://$HOSTNAME${PWD// /%20}" + printf '\e]7;%s\a' "$PWD_URL" + fi +} +#Fire it once so the pwd is set properly upon shell startup +omz_termsupport_chpwd + precmd_functions+=(omz_termsupport_precmd) preexec_functions+=(omz_termsupport_preexec) +chpwd_functions+=(omz_termsupport_chpwd) From 957564ab9f515dd3565689c9974119310a08f4bc Mon Sep 17 00:00:00 2001 From: liuxiang <liuxiang921@gmail.com> Date: Sat, 27 Dec 2014 23:56:57 +0800 Subject: [PATCH 255/488] Add completion for httpie --- plugins/httpie/httpie.plugin.zsh | 33 ++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 plugins/httpie/httpie.plugin.zsh diff --git a/plugins/httpie/httpie.plugin.zsh b/plugins/httpie/httpie.plugin.zsh new file mode 100644 index 000000000..68ead6c67 --- /dev/null +++ b/plugins/httpie/httpie.plugin.zsh @@ -0,0 +1,33 @@ +function _httpie_completion() { + _arguments -C \ + '(- 1 *)--version[display version information]' \ + '(-j|--json)'{-j,--json}'[(default) Data items from the command line are serialized as a JSON object]' \ + '(-f|--form)'{-f,--form}'[Data items from the command line are serialized as form fields]' \ + '(--pretty)--pretty[<all,colors,format,none> Controls output processing]:options' \ + '(-s|--style)'{-s,--style}'[Output coloring style]' \ + '(-p|--print)'{-p,--print}'[String specifying what the output should contain: H(request headers), B(request body), h(response headers), b(response body)]' \ + '(-v|--verbose)'{-v,--verbose}'[Print the whole request as well as the response. Shortcut for --print=HBbh.]' \ + '(-h|--headers)'{-h,--headers}'[Print only the response headers. Shortcut for --print=h]' \ + '(-b|--body)'{-b,--body}'[Print only the response body. Shortcut for --print=b]' \ + '(-S|--stream)'{-S,--stream}'[Always stream the output by line, i.e., behave like `tail -f'"'"']' \ + '(-o|--output)'{-o,--output}'[Save output to FILE]:file:_files' \ + '(-d|--download)'{-d,--download}'[Do not print the response body to stdout. Rather, download it and store it in a file. The filename is guessed unless specified with --output filename. This action is similar to the default behaviour of wget.]' \ + '(-c|--continue)'{-c,--continue}'[Resume an interrupted download. Note that the --output option needs to be specified as well.]' \ + '(--session)--session[Create, or reuse and update a session. Within a session, custom headers, auth credential, as well as any cookies sent by the server persist between requests]:file:_files' \ + '(--session-read-only)--session-read-only[Create or read a session without updating it form the request/response exchange]:file:_files' \ + '(-a|--auth)'{-a,--auth}'[<USER:PASS> If only the username is provided (-a username), HTTPie will prompt for the password]' \ + '(--auth-type)--auth-type[<basic, digest> The authentication mechanism to be used. Defaults to "basic".]' \ + '(--proxy)--proxy[<PROTOCOL:PROXY_URL> String mapping protocol to the URL of the proxy]' \ + '(--follow)--follow[Set this flag if full redirects are allowed (e.g. re-POST-ing of data at new Location).]' \ + '(--verify)--verify[<VERIFY> Set to "no" to skip checking the host'"'"'s SSL certificate. You can also pass the path to a CA_BUNDLE file for private certs. You can also set the REQUESTS_CA_BUNDLE environment variable. Defaults to "yes".]' \ + '(--timeout)--timeout[<SECONDS> The connection timeout of the request in seconds. The default value is 30 seconds]' \ + '(--check-status)--check-status[By default, HTTPie exits with 0 when no network or other fatal errors occur. This flag instructs HTTPie to also check the HTTP status code and exit with an error if the status indicates one.]' \ + '(--ignore-stdin)--ignore-stdin[Do not attempt to read stdin]' \ + '(--help)--help[Show this help message and exit]' \ + '(--traceback)--traceback[Prints exception traceback should one occur]' \ + '(--debug)--debug[Prints exception traceback should one occur, and also other information that is useful for debugging HTTPie itself and for reporting bugs]' \ + '1: :->cmds' \ + '*: :->args' && ret=0 +} + +compdef _httpie_completion http \ No newline at end of file From 8790fa3723afb15dcac56e9fc71b4a84cd6c9a1f Mon Sep 17 00:00:00 2001 From: rexk <myungsunrex@gmail.com> Date: Tue, 30 Dec 2014 14:52:14 -0800 Subject: [PATCH 256/488] go plugin upgrade for version 1.4 --- plugins/golang/golang.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/golang/golang.plugin.zsh b/plugins/golang/golang.plugin.zsh index f2be6ca9c..900fc630d 100644 --- a/plugins/golang/golang.plugin.zsh +++ b/plugins/golang/golang.plugin.zsh @@ -23,6 +23,7 @@ __go_tool_complete() { 'env[print Go environment information]' 'fix[run go tool fix on packages]' 'fmt[run gofmt on package sources]' + 'generate[generate Go files by processing source]' 'get[download and install packages and dependencies]' 'help[display help]' 'install[compile and install packages and dependencies]' From 833e6f5958b9851d2dbcf8ae706474af4079a25e Mon Sep 17 00:00:00 2001 From: Jyrki Pulliainen <jyrki@spotify.com> Date: Wed, 7 Jan 2015 18:15:00 +0100 Subject: [PATCH 257/488] virtualenvwrapper: Deactivate only if in virtualenv If user manually deactivates the virtualenv when using this mode, zsh will produce following error: deactivate:12: command not found: virtualenv_deactivate To avoid this, check that the VIRTUAL_ENV flag is set before trying to automatically deactivate the virtual environment. Fixes #2185 --- plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index 52e02d3e0..217ab0722 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -38,7 +38,7 @@ if (( $+commands[$virtualenvwrapper] )); then source $ENV_NAME/bin/activate && export CD_VIRTUAL_ENV="$ENV_NAME" fi fi - elif [ $CD_VIRTUAL_ENV ]; then + elif [[ -n $CD_VIRTUAL_ENV && -n $VIRTUAL_ENV ]]; then # We've just left the repo, deactivate the environment # Note: this only happens if the virtualenv was activated automatically deactivate && unset CD_VIRTUAL_ENV From bf7b9165fd725d2bdf45ca7e639b2c91f5ef65bb Mon Sep 17 00:00:00 2001 From: Stephen <srj@thermeon.com> Date: Thu, 8 Jan 2015 16:01:16 +0000 Subject: [PATCH 258/488] Allow custom cache dir We are running oh-my-zsh on a shared install and the only issue is each user having a custom cache dir. This will allow us to set the cache dir to ZSH_CACHE_DIR=~/oh-my-zsh/cache/ . --- lib/completion.zsh | 2 +- oh-my-zsh.sh | 7 +++++++ 2 files changed, 8 insertions(+), 1 deletion(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index 3a19a4eba..ea6139fde 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -38,7 +38,7 @@ cdpath=(.) # Use caching so that commands like apt and dpkg complete are useable zstyle ':completion::complete:*' use-cache 1 -zstyle ':completion::complete:*' cache-path $ZSH/cache/ +zstyle ':completion::complete:*' cache-path $ZSH_CACHE_DIR # Don't complete uninteresting users zstyle ':completion:*:*:*:users' ignored-patterns \ diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index d75b521c7..bc7a8e496 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -14,6 +14,13 @@ if [[ -z "$ZSH_CUSTOM" ]]; then ZSH_CUSTOM="$ZSH/custom" fi +# Set ZSH_CACHE_DIR to the path where cache files sould be created +# or else we will use the default cache/ +if [[ -z "$ZSH_CACHE_DIR" ]]; then + ZSH_CACHE_DIR="$ZSH/cache/" +fi + + # Load all of the config files in ~/oh-my-zsh that end in .zsh # TIP: Add files you don't want in git to .gitignore for config_file ($ZSH/lib/*.zsh); do From ceb42ecdb6296b136e3ead9e6ab53c24a01fedc9 Mon Sep 17 00:00:00 2001 From: Stephen <srj@thermeon.com> Date: Thu, 8 Jan 2015 16:38:05 +0000 Subject: [PATCH 259/488] Update /home/srj/.oh-my-zsh/cache references --- plugins/last-working-dir/last-working-dir.plugin.zsh | 4 ++-- plugins/zsh_reload/zsh_reload.plugin.zsh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/last-working-dir/last-working-dir.plugin.zsh b/plugins/last-working-dir/last-working-dir.plugin.zsh index bc36c80db..e472578b0 100644 --- a/plugins/last-working-dir/last-working-dir.plugin.zsh +++ b/plugins/last-working-dir/last-working-dir.plugin.zsh @@ -4,8 +4,8 @@ # Flag indicating if we've previously jumped to last directory. typeset -g ZSH_LAST_WORKING_DIRECTORY -mkdir -p "$ZSH/cache" -local cache_file="$ZSH/cache/last-working-dir" +mkdir -p $ZSH_CACHE_DIR +local cache_file="$ZSH_CACHE_DIR/last-working-dir" # Updates the last directory once directory is changed. function chpwd() { diff --git a/plugins/zsh_reload/zsh_reload.plugin.zsh b/plugins/zsh_reload/zsh_reload.plugin.zsh index 3f44b99c6..cde9ebeca 100644 --- a/plugins/zsh_reload/zsh_reload.plugin.zsh +++ b/plugins/zsh_reload/zsh_reload.plugin.zsh @@ -1,7 +1,7 @@ # reload zshrc function src() { - local cache="$ZSH/cache" + local cache=$ZSH_CACHE_DIR autoload -U compinit zrecompile compinit -d "$cache/zcomp-$HOST" From a55a313328e7437e1ff9fcdc659e247c61a438f0 Mon Sep 17 00:00:00 2001 From: Dzianis Dashkevich <dskecse@gmail.com> Date: Fri, 9 Jan 2015 16:40:03 +0300 Subject: [PATCH 260/488] Add rdms alias to rails plugin --- plugins/rails/rails.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/rails/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh index 824658e44..5ed96f8cd 100644 --- a/plugins/rails/rails.plugin.zsh +++ b/plugins/rails/rails.plugin.zsh @@ -45,6 +45,7 @@ alias rsd='rails server --debugger' # Rake aliases alias rdm='rake db:migrate' +alias rdms='rake db:migrate:status' alias rdr='rake db:rollback' alias rdc='rake db:create' alias rds='rake db:seed' From f997ed7ed8028e400216cfac9bee64b53017e588 Mon Sep 17 00:00:00 2001 From: Andrey Sitnik <andrey@sitnik.ru> Date: Sat, 10 Jan 2015 15:38:49 +0100 Subject: [PATCH 261/488] Add Fedora support for command-not-found plugin --- .../command-not-found.plugin.zsh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/plugins/command-not-found/command-not-found.plugin.zsh b/plugins/command-not-found/command-not-found.plugin.zsh index f3d7ec2df..797554a13 100644 --- a/plugins/command-not-found/command-not-found.plugin.zsh +++ b/plugins/command-not-found/command-not-found.plugin.zsh @@ -7,3 +7,19 @@ # Arch Linux command-not-found support, you must have package pkgfile installed # https://wiki.archlinux.org/index.php/Pkgfile#.22Command_not_found.22_hook [[ -e /usr/share/doc/pkgfile/command-not-found.zsh ]] && source /usr/share/doc/pkgfile/command-not-found.zsh + +# Fedora command-not-found support +if [ -f /usr/libexec/pk-command-not-found ]; then + command_not_found_handler () { + runcnf=1 + retval=127 + [ ! -S /var/run/dbus/system_bus_socket ] && runcnf=0 + [ ! -x /usr/libexec/packagekitd ] && runcnf=0 + if [ $runcnf -eq 1 ] + then + /usr/libexec/pk-command-not-found $@ + retval=$? + fi + return $retval + } +fi From 5b90092555dc13c7577f1cad93857a859be02711 Mon Sep 17 00:00:00 2001 From: CkEsc <iamckesc@gmail.com> Date: Sun, 11 Jan 2015 17:52:08 +0300 Subject: [PATCH 262/488] Sublime Text plugin: added sst alias for sudo run sublime --- plugins/sublime/sublime.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh index 5acc75cc7..38a7596fd 100644 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -12,6 +12,8 @@ if [[ $('uname') == 'Linux' ]]; then for _sublime_path in $_sublime_linux_paths; do if [[ -a $_sublime_path ]]; then st_run() { $_sublime_path $@ >/dev/null 2>&1 &| } + st_run_sudo() {sudo $_sublime_path $@ >/dev/null 2>&1} + alias sst=st_run_sudo alias st=st_run break fi From 3c4998319ab0796221a70ba19437629afb18ac31 Mon Sep 17 00:00:00 2001 From: Yu Jiang <sunlight07@users.noreply.github.com> Date: Mon, 12 Jan 2015 21:57:00 +0800 Subject: [PATCH 263/488] Update django.plugin.zsh activate django plugin on command "django-admin" --- plugins/django/django.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/django/django.plugin.zsh b/plugins/django/django.plugin.zsh index aaaa7d21d..2e9ce1c52 100644 --- a/plugins/django/django.plugin.zsh +++ b/plugins/django/django.plugin.zsh @@ -236,5 +236,6 @@ _managepy() { compdef _managepy manage.py compdef _managepy django +compdef _managepy django-admin compdef _managepy django-admin.py compdef _managepy django-manage From 3abc2a4375ef2b623aa579d991aa802f3746de52 Mon Sep 17 00:00:00 2001 From: Luis Martins <luis.martins@multiweb.pt> Date: Mon, 12 Jan 2015 17:26:04 +0000 Subject: [PATCH 264/488] Fix Plugin commands --- plugins/wp-cli/wp-cli.plugin.zsh | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/plugins/wp-cli/wp-cli.plugin.zsh b/plugins/wp-cli/wp-cli.plugin.zsh index 5d9551e24..ac430b7a2 100644 --- a/plugins/wp-cli/wp-cli.plugin.zsh +++ b/plugins/wp-cli/wp-cli.plugin.zsh @@ -52,19 +52,19 @@ alias wpmlo='wp menu location' # Option # Plugin -alias wppa='activate' -alias wppda='deactivate' -alias wppd='delete' -alias wppg='get' -alias wppi='install' -alias wppis='is-installed' -alias wppl='list' -alias wppp='path' -alias wpps='search' -alias wppst='status' -alias wppt='toggle' -alias wppu='uninstall' -alias wppu='update' +alias wppa='wp plugin activate' +alias wppda='wp plugin deactivate' +alias wppd='wp plugin delete' +alias wppg='wp plugin get' +alias wppi='wp plugin install' +alias wppis='wp plugin is-installed' +alias wppl='wp plugin list' +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 wppu='wp plugin update' # Post alias wppoc='wp post create' From 5cb0ed98d1e5f0119e7871e21948a6b931f14a78 Mon Sep 17 00:00:00 2001 From: "Nicholas T." <Nicholas.TD07@gmail.com> Date: Thu, 15 Jan 2015 09:09:41 +1000 Subject: [PATCH 265/488] Fast installation time by shallow copying git repo Use `--depth=1` to clone just the lastest version rather than every version in git. --- tools/install.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/install.sh b/tools/install.sh index a53ac48ab..69213d4a3 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -10,7 +10,7 @@ if [ -d "$ZSH" ]; then fi echo "\033[0;34mCloning Oh My Zsh...\033[0m" -hash git >/dev/null 2>&1 && env git clone https://github.com/robbyrussell/oh-my-zsh.git $ZSH || { +hash git >/dev/null 2>&1 && env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git $ZSH || { echo "git not installed" exit } From b2f8764855e14d113bb2cfd1cd788bd7baaae05a Mon Sep 17 00:00:00 2001 From: Harsh Singh <hisingh1@gmail.com> Date: Thu, 15 Jan 2015 12:55:32 -0600 Subject: [PATCH 266/488] Adds completions to wp-cli plugin --- plugins/wp-cli/wp-cli.plugin.zsh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/plugins/wp-cli/wp-cli.plugin.zsh b/plugins/wp-cli/wp-cli.plugin.zsh index 5d9551e24..71636cff2 100644 --- a/plugins/wp-cli/wp-cli.plugin.zsh +++ b/plugins/wp-cli/wp-cli.plugin.zsh @@ -136,3 +136,25 @@ alias wpwd='wp widget delete' alias wpwl='wp widget list' alias wpwm='wp widget move' alias wpwu='wp widget update' + + +autoload -U +X bashcompinit && bashcompinit +# bash completion for the `wp` command + +_wp_complete() { + local cur=${COMP_WORDS[COMP_CWORD]} + + IFS=$'\n'; # want to preserve spaces at the end + local opts="$(wp cli completions --line="$COMP_LINE" --point="$COMP_POINT")" + + if [[ "$opts" =~ \<file\>\s* ]] + then + COMPREPLY=( $(compgen -f -- $cur) ) + elif [[ $opts = "" ]] + then + COMPREPLY=( $(compgen -f -- $cur) ) + else + COMPREPLY=( ${opts[*]} ) + fi +} +complete -o nospace -F _wp_complete wp From fd3a34844f649b2be21fe4e5504a2cf086d1340b Mon Sep 17 00:00:00 2001 From: Josh Sherman <josh@gravityblvd.com> Date: Tue, 20 Jan 2015 21:24:41 -0500 Subject: [PATCH 267/488] Update git-flow.plugin.zsh --- plugins/git-flow/git-flow.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/git-flow/git-flow.plugin.zsh b/plugins/git-flow/git-flow.plugin.zsh index b9ea06844..4357c0895 100644 --- a/plugins/git-flow/git-flow.plugin.zsh +++ b/plugins/git-flow/git-flow.plugin.zsh @@ -5,7 +5,7 @@ # # To achieve git-flow completion nirvana: # -# 0. Update your zsh's git-completion module to the newest verion. +# 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 # # 1. Install this file. Either: @@ -17,7 +17,7 @@ # # source ~/.git-flow-completion.zsh # -# c. Or, use this file as a oh-my-zsh plugin. +# c. Or, use this file as an oh-my-zsh plugin. # #Alias From 49549d95582832a25957af6daca6621f60c775ac Mon Sep 17 00:00:00 2001 From: Josh Sherman <josh@gravityblvd.com> Date: Tue, 20 Jan 2015 21:25:07 -0500 Subject: [PATCH 268/488] Update git-hubflow.plugin.zsh --- plugins/git-hubflow/git-hubflow.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/git-hubflow/git-hubflow.plugin.zsh b/plugins/git-hubflow/git-hubflow.plugin.zsh index a09f88391..4cf5b9177 100644 --- a/plugins/git-hubflow/git-hubflow.plugin.zsh +++ b/plugins/git-hubflow/git-hubflow.plugin.zsh @@ -5,7 +5,7 @@ # # To achieve git-hubflow completion nirvana: # -# 0. Update your zsh's git-completion module to the newest verion. +# 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 # # 1. Install this file. Either: @@ -17,7 +17,7 @@ # # source ~/.git-hubflow-completion.zsh # -# c. Or, use this file as a oh-my-zsh plugin. +# c. Or, use this file as an oh-my-zsh plugin. # _git-hf () From 4533c7a31c737622782ce3233d2eb536f9cb4f2e Mon Sep 17 00:00:00 2001 From: Markus Faerevaag <m@frv.ag> Date: Mon, 26 Jan 2015 00:13:39 +0100 Subject: [PATCH 269/488] [wd] Update to v0.4.1 --- plugins/wd/README.md | 14 ++++++++++++-- plugins/wd/_wd.sh | 13 +++++++++++-- plugins/wd/wd.sh | 46 ++++++++++++++++++++++++++++++++++++++++---- 3 files changed, 65 insertions(+), 8 deletions(-) diff --git a/plugins/wd/README.md b/plugins/wd/README.md index bcfeab684..ed149eb3e 100644 --- a/plugins/wd/README.md +++ b/plugins/wd/README.md @@ -5,6 +5,8 @@ wd `wd` (*warp directory*) lets you jump to custom directories in zsh, without using `cd`. Why? Because `cd` seems ineffecient when the folder is frequently visited or has a long path. +*NOTE*: If you are not using zsh, check out the `ruby` branch which has `wd` implemented as a gem. + ### Setup @@ -33,7 +35,7 @@ Run either in terminal: * Add `wd` function to `.zshrc` (or `.profile` etc.): wd() { - . ~/paht/to/wd/wd.sh + . ~/path/to/cloned/repo/wd/wd.sh } * Install manpage. From `wd`'s base directory (requires root permissions): @@ -84,7 +86,15 @@ Also, you may have to force a rebuild of `zcompdump` by running: * List all warp points (stored in `~/.warprc`): - $ wd ls + $ wd list + + * List files in given warp point: + + $ wd ls foo + + * Show path of given warp point: + + $ wd path foo * List warp points to current directory, or optionally, path to given warp point: diff --git a/plugins/wd/_wd.sh b/plugins/wd/_wd.sh index 2bb58dd31..b67f4a1e2 100644 --- a/plugins/wd/_wd.sh +++ b/plugins/wd/_wd.sh @@ -20,10 +20,13 @@ function _wd() { 'add:Adds the current working directory to your warp points' 'add!:Overwrites existing warp point' 'rm:Removes the given warp point' - 'ls:Outputs all stored warp points' - 'show:Outputs all warp points that point to the current directory or shows a specific target directory for a point' + 'list:Outputs all stored warp points' + 'ls:Show files from given warp point' + 'path:Show path to given warp point' 'show:Outputs all warp points that point to the current directory or shows a specific target directory for a point' 'help:Show this extremely helpful text' + 'clean:Remove points warping to nonexistent directories' + 'clean!:Remove nonexistent directories without confirmation' '..:Go back to last directory' ) @@ -47,6 +50,12 @@ function _wd() { show) _describe -t points "Warp points" warp_points && ret=0 ;; + ls) + _describe -t points "Warp points" warp_points && ret=0 + ;; + path) + _describe -t points "Warp points" warp_points && ret=0 + ;; esac ;; esac diff --git a/plugins/wd/wd.sh b/plugins/wd/wd.sh index 5ecbdc503..3b9548168 100755 --- a/plugins/wd/wd.sh +++ b/plugins/wd/wd.sh @@ -80,7 +80,9 @@ Commands: rm <point> Removes the given warp point show Print warp points to current directory show <point> Print path to given warp point - ls Print all stored warp points + list Print all stored warp points +ls <point> Show files from given warp point +path <point> Show the path to given warp point clean! Remove points warping to nonexistent directories -v | --version Print version @@ -96,7 +98,7 @@ wd_exit_fail() { local msg=$1 - wd_print_msg $WD_RED $1 + wd_print_msg $WD_RED $msg WD_EXIT_CODE=1 } @@ -108,6 +110,22 @@ wd_exit_warn() WD_EXIT_CODE=1 } +wd_getdir() +{ + local name_arg=$1 + + point=$(wd_show $name_arg) + dir=${point:28+$#name_arg+7} + + if [[ -z $name_arg ]]; then + wd_exit_fail "You must enter a warp point" + break + elif [[ -z $dir ]]; then + wd_exit_fail "Unknown warp point '${name_arg}'" + break + fi +} + # core wd_warp() @@ -201,6 +219,18 @@ wd_list_all() done <<< $(sed "s:${HOME}:~:g" $WD_CONFIG) } +wd_ls() +{ + wd_getdir $1 + ls $dir +} + +wd_path() +{ + wd_getdir $1 + echo $(echo $dir | sed "s:${HOME}:~:g") +} + wd_show() { local name_arg=$1 @@ -316,7 +346,7 @@ do done < $WD_CONFIG # get opts -args=$(getopt -o a:r:c:lhs -l add:,rm:,clean\!,ls,help,show -- $*) +args=$(getopt -o a:r:c:lhs -l add:,rm:,clean\!,list,ls:,path:,help,show -- $*) # check if no arguments were given, and that version is not set if [[ ($? -ne 0 || $#* -eq 0) && -z $wd_print_version ]] @@ -349,10 +379,18 @@ else wd_remove $2 break ;; - -l|--list|ls) + -l|list) wd_list_all break ;; + -ls|ls) + wd_ls $2 + break + ;; + -p|--path|path) + wd_path $2 + break + ;; -h|--help|help) wd_print_usage break From 5f79ab5547f51bd32dcd0a1b21fc26c8720711ba Mon Sep 17 00:00:00 2001 From: Andrew Janke <janke@pobox.com> Date: Tue, 27 Jan 2015 21:00:07 -0600 Subject: [PATCH 270/488] Move chpwd update output from chpwd hook to precmd to avoid contaminating script/function output --- lib/termsupport.zsh | 24 +++++++++--------------- 1 file changed, 9 insertions(+), 15 deletions(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index d9f2b64d4..ce36f229f 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -16,12 +16,19 @@ function title { ZSH_THEME_TERM_TAB_TITLE_IDLE="%15<..<%~%<<" #15 char left truncated PWD ZSH_THEME_TERM_TITLE_IDLE="%n@%m: %~" -#Appears when you have the prompt +# Runs when you have the prompt function omz_termsupport_precmd { title $ZSH_THEME_TERM_TAB_TITLE_IDLE $ZSH_THEME_TERM_TITLE_IDLE + + # Notify Terminal.app of current directory using undocumented OSC sequence + # found in OS X 10.9 and 10.10's /etc/bashrc + if [[ $TERM_PROGRAM == Apple_Terminal ]] && [[ -z $INSIDE_EMACS ]]; then + local PWD_URL="file://$HOSTNAME${PWD// /%20}" + printf '\e]7;%s\a' "$PWD_URL" + fi } -#Appears at the beginning of (and during) of command execution +# Runs at the beginning of (and during) of command execution function omz_termsupport_preexec { emulate -L zsh setopt extended_glob @@ -33,18 +40,5 @@ function omz_termsupport_preexec { title '$CMD' '%100>...>$LINE%<<' } -#Appears each time pwd is changed -function omz_termsupport_chpwd { - #Notify Terminal.app of current directory using undocumented OSC sequence - #found in OS X 10.10's /etc/bashrc - if [[ $TERM_PROGRAM == Apple_Terminal ]] && [[ -z $INSIDE_EMACS ]]; then - local PWD_URL="file://$HOSTNAME${PWD// /%20}" - printf '\e]7;%s\a' "$PWD_URL" - fi -} -#Fire it once so the pwd is set properly upon shell startup -omz_termsupport_chpwd - precmd_functions+=(omz_termsupport_precmd) preexec_functions+=(omz_termsupport_preexec) -chpwd_functions+=(omz_termsupport_chpwd) From c4d3de1ea07b0d53f8b9b011ac5d44e23ac0c747 Mon Sep 17 00:00:00 2001 From: Darius Grigalevicius <darius.grigalevicius@nfq.lt> Date: Wed, 28 Jan 2015 14:02:36 +0200 Subject: [PATCH 271/488] added server:run alias --- plugins/symfony2/symfony2.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/symfony2/symfony2.plugin.zsh b/plugins/symfony2/symfony2.plugin.zsh index 7a19cbdd3..e94280ed0 100644 --- a/plugins/symfony2/symfony2.plugin.zsh +++ b/plugins/symfony2/symfony2.plugin.zsh @@ -20,6 +20,7 @@ compdef _symfony2 sf #Alias alias sf='`_symfony_console`' alias sfcl='sf cache:clear' +alias sfsr='sf server:run -vvv' alias sfcw='sf cache:warmup' alias sfroute='sf router:debug' alias sfcontainer='sf container:debug' From e60458793ab9703bb65adb6c326f43c6bd5fd126 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Wed, 17 Dec 2014 11:11:53 +0100 Subject: [PATCH 272/488] Switch newer-than logic to get the desired behavior In the old version, the function returned true (0) if the cache file was newer than the Cakefile, which was *always* unless the Cakefile had been updated. Therefore we generated the file every time unless the Cakefile was updated, which was precisely when we needed to regenerate the cache file. Now it generates the cache file only when the Cakefile has been updated. --- plugins/cake/cake.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/cake/cake.plugin.zsh b/plugins/cake/cake.plugin.zsh index 44cc47470..2370df949 100644 --- a/plugins/cake/cake.plugin.zsh +++ b/plugins/cake/cake.plugin.zsh @@ -15,7 +15,7 @@ _cake_does_target_list_need_generating () { fi [ ! -f ${_cake_task_cache_file} ] && return 0; - [ ${_cake_task_cache_file} -nt Cakefile ] && return 0; + [ Cakefile -nt ${_cake_task_cache_file} ] && return 0; return 1; } From 8ccfc3d444a36905003397083ac5ece46eda2a3b Mon Sep 17 00:00:00 2001 From: Michael Robinson <mike@pagesofinterest.net> Date: Fri, 9 Jan 2015 08:33:51 +1300 Subject: [PATCH 273/488] Removing 'local' usage to prevent issue when installed with antigen Error encountered when installed with antigen: "chpwd:2: no such file or directory:". Solution described in https://github.com/zsh-users/antigen/issues/75 --- plugins/last-working-dir/last-working-dir.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/last-working-dir/last-working-dir.plugin.zsh b/plugins/last-working-dir/last-working-dir.plugin.zsh index e472578b0..4fa6fcc34 100644 --- a/plugins/last-working-dir/last-working-dir.plugin.zsh +++ b/plugins/last-working-dir/last-working-dir.plugin.zsh @@ -5,7 +5,7 @@ # Flag indicating if we've previously jumped to last directory. typeset -g ZSH_LAST_WORKING_DIRECTORY mkdir -p $ZSH_CACHE_DIR -local cache_file="$ZSH_CACHE_DIR/last-working-dir" +cache_file="$ZSH_CACHE_DIR/last-working-dir" # Updates the last directory once directory is changed. function chpwd() { From f2130fa1a3f440418a6c48f9bace43ce7443117f Mon Sep 17 00:00:00 2001 From: The Linux Kitten <kitten@openbsdbox> Date: Mon, 2 Feb 2015 20:49:24 +0100 Subject: [PATCH 274/488] Test if --color=auto is a valid option for grep --- lib/grep.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/lib/grep.zsh b/lib/grep.zsh index 348ebe623..3fa103d19 100644 --- a/lib/grep.zsh +++ b/lib/grep.zsh @@ -3,8 +3,12 @@ grep-flag-available() { echo | grep $1 "" >/dev/null 2>&1 } +GREP_OPTIONS="" + # color grep results -GREP_OPTIONS="--color=auto" +if grep-flag-available --color=auto; then + GREP_OPTIONS+=" --color=auto" +fi # ignore VCS folders (if the necessary grep flags are available) VCS_FOLDERS="{.bzr,.cvs,.git,.hg,.svn}" From be7028012ecc97bf8976d5de0aed51869720be2a Mon Sep 17 00:00:00 2001 From: Andrew Janke <janke@pobox.com> Date: Wed, 4 Feb 2015 01:00:51 -0500 Subject: [PATCH 275/488] Reword comments on termsupport internal functions. --- lib/termsupport.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index ce36f229f..bd0cf6ffe 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -16,7 +16,7 @@ function title { ZSH_THEME_TERM_TAB_TITLE_IDLE="%15<..<%~%<<" #15 char left truncated PWD ZSH_THEME_TERM_TITLE_IDLE="%n@%m: %~" -# Runs when you have the prompt +# Runs before showing the prompt function omz_termsupport_precmd { title $ZSH_THEME_TERM_TAB_TITLE_IDLE $ZSH_THEME_TERM_TITLE_IDLE @@ -28,7 +28,7 @@ function omz_termsupport_precmd { fi } -# Runs at the beginning of (and during) of command execution +# Runs before executing the command function omz_termsupport_preexec { emulate -L zsh setopt extended_glob From 8cb97d6f22378940e0238967d08f10ba62a630ce Mon Sep 17 00:00:00 2001 From: Tejas Bubane <tejas.bubane@infibeam.net> Date: Wed, 4 Feb 2015 12:24:17 +0530 Subject: [PATCH 276/488] Add alias for git add --all --- plugins/git/git.plugin.zsh | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index bf7cd1ac9..bde219dae 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -75,6 +75,7 @@ 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' @@ -174,6 +175,3 @@ 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:]]"' - - - From 431faa924ea2a4176b8b83a75ba856f097e6a089 Mon Sep 17 00:00:00 2001 From: Bilal Budhani <bilalbudhani@gmail.com> Date: Wed, 4 Feb 2015 15:39:34 +0530 Subject: [PATCH 277/488] Creates Ember-cli plugin and Adds its aliases --- plugins/ember-cli/README.md | 22 ++++++++++++++++++++++ plugins/ember-cli/ember-cli.plugin.zsh | 19 +++++++++++++++++++ 2 files changed, 41 insertions(+) create mode 100644 plugins/ember-cli/README.md create mode 100644 plugins/ember-cli/ember-cli.plugin.zsh diff --git a/plugins/ember-cli/README.md b/plugins/ember-cli/README.md new file mode 100644 index 000000000..d1dedf884 --- /dev/null +++ b/plugins/ember-cli/README.md @@ -0,0 +1,22 @@ +# Ember-cli + +**Maintainer:** [BilalBudhani](http://www.github.com/BilalBudhani) + +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' diff --git a/plugins/ember-cli/ember-cli.plugin.zsh b/plugins/ember-cli/ember-cli.plugin.zsh new file mode 100644 index 000000000..044a2c043 --- /dev/null +++ b/plugins/ember-cli/ember-cli.plugin.zsh @@ -0,0 +1,19 @@ +# Ember ClI +# visit http://www.ember-cli.com/ to view user guid + +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' + +# version +alias ev='ember version' From 7de44dbdb767e52e509010b1468126259e0b8b87 Mon Sep 17 00:00:00 2001 From: Gabor Marton <gabor.marton@prezi.com> Date: Wed, 4 Feb 2015 12:56:58 +0100 Subject: [PATCH 278/488] Added trapwinch to vi-mode plugin. --- plugins/vi-mode/vi-mode.plugin.zsh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh index 3ed32b3fb..f2745b409 100644 --- a/plugins/vi-mode/vi-mode.plugin.zsh +++ b/plugins/vi-mode/vi-mode.plugin.zsh @@ -14,6 +14,14 @@ function zle-keymap-select zle-line-init zle-line-finish { zle -R } +# Ensure that the prompt is redrawn when the terminal size changes. +TRAPWINCH() { + if [[ -o zle ]]; then + zle reset-prompt + zle -R + fi +} + zle -N zle-line-init zle -N zle-line-finish zle -N zle-keymap-select From 2e0da6864bc0d770855524ad54eecd4f0cd72829 Mon Sep 17 00:00:00 2001 From: Mathias Geat <mathias@ailoo.net> Date: Fri, 30 Jan 2015 20:31:05 +0100 Subject: [PATCH 279/488] add chucknorris plugin --- plugins/chucknorris/.gitignore | 1 + plugins/chucknorris/LICENSE | 2 + plugins/chucknorris/chucknorris.plugin.zsh | 6 + plugins/chucknorris/fortunes/chucknorris | 904 +++++++++++++++++++++ 4 files changed, 913 insertions(+) create mode 100644 plugins/chucknorris/.gitignore create mode 100644 plugins/chucknorris/LICENSE create mode 100644 plugins/chucknorris/chucknorris.plugin.zsh create mode 100644 plugins/chucknorris/fortunes/chucknorris diff --git a/plugins/chucknorris/.gitignore b/plugins/chucknorris/.gitignore new file mode 100644 index 000000000..267c504a6 --- /dev/null +++ b/plugins/chucknorris/.gitignore @@ -0,0 +1 @@ +fortunes/chucknorris.dat diff --git a/plugins/chucknorris/LICENSE b/plugins/chucknorris/LICENSE new file mode 100644 index 000000000..5f40edd1e --- /dev/null +++ b/plugins/chucknorris/LICENSE @@ -0,0 +1,2 @@ +License: GPL v2 +Thanks to http://www.k-lug.org/~kessler/projects.html for the fortune file. diff --git a/plugins/chucknorris/chucknorris.plugin.zsh b/plugins/chucknorris/chucknorris.plugin.zsh new file mode 100644 index 000000000..096364633 --- /dev/null +++ b/plugins/chucknorris/chucknorris.plugin.zsh @@ -0,0 +1,6 @@ +if [ ! -f $ZSH/plugins/chucknorris/fortunes/chucknorris.dat ]; then + strfile $ZSH/plugins/chucknorris/fortunes/chucknorris $ZSH/plugins/chucknorris/fortunes/chucknorris.dat +fi + +alias chuck="fortune -a $ZSH/plugins/chucknorris/fortunes" +alias chuck_cow="chuck | cowthink" diff --git a/plugins/chucknorris/fortunes/chucknorris b/plugins/chucknorris/fortunes/chucknorris new file mode 100644 index 000000000..b8edf9ac3 --- /dev/null +++ b/plugins/chucknorris/fortunes/chucknorris @@ -0,0 +1,904 @@ +Chuck Norris' tears cure cancer. Too bad he has never cried. Ever. +% +Chuck Norris does not sleep. He waits. +% +Chuck Norris is currently suing NBC, claiming Law and Order are trademarked names for his left and right legs. +% +The chief export of Chuck Norris is pain. +% +If you can see Chuck Norris, he can see you. If you can't see Chuck Norris, you may be only seconds away from death. +% +Chuck Norris has counted to infinity. Twice. +% +Chuck Norris does not hunt because the word hunting implies the probability of failure. Chuck Norris goes killing. +% +Chuck Norris' blood type is AK+. Ass-Kicking Positive. It is compatible only with heavy construction equipment, tanks, and fighter jets. +% +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. +% +There are no steroids in baseball. Just players Chuck Norris has breathed on. +% +Chuck Norris once challenged Lance Armstrong in a "Who has more testicles?" contest. Chuck Norris won by 5. +% +Chuck Norris was the fourth wise man, who gave baby Jesus the gift of beard, which he carried with him until he died. The other three wise men were enraged by the preference that Jesus showed to Chuck's gift, and arranged to have him written out of the bible. All three died soon after of mysterious roundhouse-kick related injuries. +% +Chuck Norris sheds his skin twice a year. +% +When Chuck Norris calls 1-900 numbers, he doesnt get charged. He holds up the phone and money falls out. +% +Chuck Norris once ate a whole cake before his friends could tell him there was a stripper in it. +% +Some people like to eat frogs' legs. Chuck Norris likes to eat lizard legs. Hence, snakes. +% +There are no races, only countries of people Chuck Norris has beaten to different shades of black and blue. +% +When Chuck Norris was denied an Egg McMuffin at McDonald's because it was 10:35, he roundhouse kicked the store so hard it became a Wendy's. +% +Chuck Norris can't finish a "color by numbers" because his markers are filled with the blood of his victims. Unfortunately, all blood is dark red. +% +A Chuck Norris-delivered Roundhouse Kick is the preferred method of execution in 16 states. +% +When Chuck Norris falls in water, Chuck Norris doesn't get wet. Water gets Chuck Norris. +% +Scientists have estimated that the energy given off during the Big Bang is roughly equal to 1CNRhK (Chuck Norris Roundhouse Kick) +% +Chuck Norris' house has no doors, only walls that he walks through. +% +When Chuck Norris has sex with a man, it won't be because he is gay. It will be because he has run out of women. +% +How much wood would a woodchuck chuck if a woodchuck could Chuck Norris? ...All of it. +% +Chuck Norris doesn't actually write books, the words assemble themselves out of fear. +% +In honor of Chuck Norris, all McDonald's in Texas have an even larger size than the super-size. When ordering, just ask to be "Norrisized". +% +Chuck Norris CAN believe it's not butter. +% +If tapped, a Chuck Norris roundhouse kick could power the country of Australia for 44 minutes. +% +Chuck Norris can divide by zero. +% +The grass is always greener on the other side, unless Chuck Norris has been there. In that case the grass is most likely soaked in blood and tears. +% +A picture is worth a thousand words. A Chuck Norris is worth 1 billion words. +% +Newton's Third Law is wrong: Although it states that for each action, there is an equal and opposite reaction, there is no force equal in reaction to a Chuck Norris roundhouse kick. +% +Chuck Norris invented his own type of karate. It's called Chuck-Will-Kill. +% +When an episode of Walker Texas Ranger was aired in France, the French surrendered to Chuck Norris just to be on the safe side. +% +While urinating, Chuck Norris is easily capable of welding titanium. +% +Chuck Norris once sued the Houghton-Mifflin textbook company when it became apparent that their account of the war of 1812 was plagiarized from his autobiography. +% +When Chuck Norris talks, everybody listens. And dies. +% +When Steven Seagal kills a ninja, he only takes its hide. When Chuck Norris kills a ninja, he uses every part. +% +Wilt Chamberlain claims to have slept with more than 20,000 women in his lifetime. Chuck Norris calls this "a slow Tuesday." +% +Contrary to popular belief, there is indeed enough Chuck Norris to go around. +% +Chuck Norris doesnt shave; he kicks himself in the face. The only thing that can cut Chuck Norris is Chuck Norris. +% +For some, the left testicle is larger than the right one. For Chuck Norris, each testicle is larger than the other one. +% +Chuck Norris always knows the EXACT location of Carmen SanDiego. +% +When taking the SAT, write "Chuck Norris" for every answer. You will score over 8000. +% +Chuck Norris invented black. In fact, he invented the entire spectrum of visible light. Except pink. Tom Cruise invented pink. +% +When you're Chuck Norris, anything + anything is equal to 1. One roundhouse kick to the face. +% +Chuck Norris has the greatest Poker-Face of all time. He won the 1983 World Series of Poker, despite holding only a Joker, a Get out of Jail Free Monopoloy card, a 2 of clubs, 7 of spades and a green #4 card from the game UNO. +% +On his birthday, Chuck Norris randomly selects one lucky child to be thrown into the sun. +% +Nobody doesn't like Sara Lee. Except Chuck Norris. +% +Chuck Norris doesn't throw up if he drinks too much. Chuck Norris throws down! +% +In the beginning there was nothing...then Chuck Norris Roundhouse kicked that nothing in the face and said "Get a job". That is the story of the universe. +% +Chuck Norris has 12 moons. One of those moons is the Earth. +% +Chuck Norris grinds his coffee with his teeth and boils the water with his own rage. +% +Archeologists unearthed an old english dictionary dating back to the year 1236. It defined "victim" as "one who has encountered Chuck Norris" +% +Chuck Norris ordered a Big Mac at Burger King, and got one. +% +Chuck Norris and Mr. T walked into a bar. The bar was instantly destroyed, as that level of awesome cannot be contained in one building. +% +If you Google search "Chuck Norris getting his ass kicked" you will generate zero results. It just doesn't happen. +% +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. +% +You know how they say if you die in your dream then you will die in real life? In actuality, if you dream of death then Chuck Norris will find you and kill you. +% +Chuck Norris has a deep and abiding respect for human life... unless it gets in his way. +% +The Bermuda Triangle used to be the Bermuda Square, until Chuck Norris Roundhouse kicked one of the corners off. +% +There are no weapons of mass destruction in Iraq, Chuck Norris lives in Oklahoma. +% +Chuck Norris doesn't believe in Germany. +% +When Chuck Norris is in a crowded area, he doesn't walk around people. He walks through them. +% +Chuck Norris once ate an entire bottle of sleeping pills. They made him blink. +% +James Cameron wanted Chuck Norris to play the Terminator. However, upon reflection, he realized that would have turned his movie into a documentary, so he went with Arnold Schwarzenegger. +% +Chuck Norris can touch MC Hammer. +% +Thousands of years ago Chuck Norris came across a bear. It was so terrified that it fled north into the arctic. It was also so terrified that all of its decendents now have white hair. +% +Chuck Norris played Russian Roulette with a fully loaded gun and won. +% +It takes 14 puppeteers to make Chuck Norris smile, but only 2 to make him destroy an orphanage. +% +Chuck Norris is responsible for China's over-population. He hosted a Karate tournament in Beijing and all women within 1,000 miles became pregnant instantly. +% +Some people wear Superman pajamas. Superman wears Chuck Norris pajamas. +% +Chuck Norris once worked as a weatherman for the San Diego evening news. Every night he would make the same forecast: Partly cloudy with a 75% chance of Pain. +% +Simply by pulling on both ends, Chuck Norris can stretch diamonds back into coal. +% +When Chuck Norris does a pushup, he isn't lifting himself up, he's pushing the Earth down. +% +Chuck Norris invented the bolt-action rifle, liquor, sexual intercourse, and football-- in that order. +% +A high tide means Chuck Norris is flying over your coast. The tide is caused by God pissing his pants. +% +Chuck Norris keeps his friends close and his enemies closer. Close enough to drop them with one round house kick to the face. +% +There is in fact an "I" in Norris, but there is no "team"? not even close. +% +Scotty in Star Trek often says "Ye cannae change the laws of physics." This is untrue. Chuck Norris can change the laws of physics. With his fists. +% +An anagram for Walker Texas Ranger is KARATE WRANGLER SEX. I don't know what that is, but it sounds AWESOME. +% +Chuck Norris doesn't stub his toes. He accidentally destroys chairs, bedframes, and sidewalks. +% +Using his trademark roundhouse kick, Chuck Norris once made a fieldgoal in RJ Stadium in Tampa Bay from the 50 yard line of Qualcomm stadium in San Diego. +% +Chuck Norris roundhouse kicks don't really kill people. They wipe out their entire existence from the space-time continuum. +% +Chuck Norris does not own a stove, oven, or microwave , because revenge is a dish best served cold. +% +Tom Clancy has to pay royalties to Chuck Norris because "The Sum of All Fears" is the name of Chuck Norris' autobiography. +% +Chuck Norris can slam a revolving door. +% +Chuck Norris is expected to win gold in every swimming competition at the 2008 Beijing Olympics, even though Chuck Norris does not swim. This is because when Chuck Norris enters the water, the water gets out of his way and Chuck Norris simply walks across the pool floor. +% +Chuck Norris built a better mousetrap, but the world was too frightened to beat a path to his door. +% +The original draft of The Lord of the Rings featured Chuck Norris instead of Frodo Baggins. It was only 5 pages long, as Chuck roundhouse-kicked Sauron's ass halfway through the first chapter. +% +Hellen Keller's favorite color is Chuck Norris. +% +Chuck Norris eats beef jerky and craps gunpowder. Then, he uses that gunpowder to make a bullet, which he uses to kill a cow and make more beef jerky. Some people refer to this as the "Circle of Life." +% +If, by some incredible space-time paradox, Chuck Norris would ever fight himself, he'd win. Period. +% +Chuck Norris is currently suing myspace for taking the name of what he calls everything around you. +% +The crossing lights in Chuck Norris's home town say "Die slowly" and "die quickly". They each have a picture of Chuck Norris punching or kicking a pedestrian. +% +Science Fact: Roundhouse kicks are comprised primarily of an element called Chucktanium. +% +The Sherman tank was originaly called the Norris tank until Chuck Norris decided it wasn't tough enough to be associated with him. The Army, for fear of Chuck Norris, renamed the tank and promised to develop a weapon more fitting of his name. To date, no weapon created has been badass enough to be named after Chuck Norris. +% +Chuck Norris proved that we are alone in the universe. We weren't before his first space expedition. +% +Superman once watched an episode of Walker, Texas Ranger. He then cried himself to sleep. +% +Chuck Norris doesn't step on toes. Chuck Norris steps on necks. +% +The movie "Delta Force" was extremely hard to make because Chuck had to downplay his abilities. The first few cuts were completely unbelievable. +% +Movie trivia: The movie "Invasion U.S.A." is, in fact, a documentary. +% +Chuck Norris does not "style" his hair. It lays perfectly in place out of sheer terror. +% +There is no such thing as global warming. Chuck Norris was cold, so he turned the sun up. +% +A study showed the leading causes of death in the United States are: +1:Heart disease +2:Chuck Norris +3:Cancer +% +It's widely believed that Jesus was Chuck Norris' stunt double for crucifixion due to the fact that it is impossible for nails to pierce Chuck Norris' skin. +% +Chuck Norris did in fact, build Rome in a day. +% +Along with his black belt, Chuck Norris often chooses to wear brown shoes. No one has DARED call him on it. Ever. +% +Anytime someone is elected president in the United States, they must ask permission from Chuck Norris to live in the White House. The reason for this is because Chuck Norris had won every Federal, State, and Local election since 1777. He just allows others to run the country in his place. +% +Once you go Norris, you are physically unable to go back. +% +Ninjas want to grow up to be just like Chuck Norris. But usually they grow up just to be killed by Chuck Norris. +% +Chuck Norris once sued Burger King after they refused to put razor wire in his Whopper Jr, insisting that that actually is "his" way. +% +The last thing you hear before Chuck Norris gives you a roundhouse kick? No one knows because dead men tell no tales. +% +Chuck Norris doesn't play god. Playing is for children. +% +As a teen, Chuck Norris had sex with every nun in a convent tucked away in the hills of Tuscany. Nine months later the nuns gave birth to the 1972 Miami Dolphins, the only undefeated and untied team in professional football history. +% +Chuck Norris is the only person in the world that can actually email a roundhouse kick. +% +Chuck Norris won super bowls VII and VIII singlehandedly before unexpectedly retiring to pursue a career in ass-kicking. +% +Wo hu cang long. The translation from Mandarin Chinese reads: "Crouching Chuck, Hidden Norris" +% +Chuck Norris can set ants on fire with a magnifying glass. At night. +% +Some kids play Kick the can. Chuck Norris played Kick the keg. +% +'Icy-Hot' is too weak for Chuck Norris. After a workout, Chuck Norris rubs his muscles down with liquid-hot MAGMA. +% +Chuck Norris cannot love, he can only not kill. +% +When Chuck Norris was a baby, he didn't suck his mother's breast. His mother served him whiskey, straight out of the bottle. +% +According to Einstein's theory of relativity, Chuck Norris can actually roundhouse kick you yesterday. +% +Chuck Norris once pulled out a single hair from his beard and skewered three men through the heart with it. +% +In an act of great philanthropy, Chuck made a generous donation to the American Cancer Society. He donated 6,000 dead bodies for scientific research. +% +Chuck Norris' favourite cut of meat is the roundhouse. +% +When J. Robert Oppenheimer said "I am become death, the destroyer Of worlds", He was not referring to the atomic bomb. He was referring to the Chuck Norris halloween costume he was wearing. +% +Chuck Norris recently had the idea to sell his urine as a canned beverage. We know this beverage as Red Bull. +% +In a recent survey it was discovered the 94% of American women lost their virginity to Chuck Norris. The other 6% were incredibly fat or ugly. +% +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." +Too late, asshole. +% +Chuck Norris's show is called Walker: Texas Ranger, because Chuck Norris doesn't run. +% +MacGyver can build an airplane out of gum and paper clips, but Chuck Norris can roundhouse-kick his head through a wall and take it. +% +Behind every successful man, there is a woman. Behind every dead man, there is Chuck Norris. +% +What's known as the UFC, or Ultimate Fighting Championship, doesn't use its full name, which happens to be "Ultimate Fighting Championship, Non-Chuck-Norris-Division". +% +Chuck Norris brushes his teeth with a mixture of iron shavings, industrial paint remover, and wood-grain alcohol. +% +The easiest way to determine Chuck Norris' age is to cut him in half and count the rings. +% +There is endless debate about the existence of the human soul. Well it does exist, and Chuck Norris finds it delicious. +% +Most boots are made for walkin'. Chuck Norris' boots ain't that merciful. +% +The US did not boycott the 1980 Summer Olympics in Moscow due to political reasons: Chuck Norris killed the entire US team with a single round-house kick during TaeKwonDo practice. +% +Chuck Norris wears a live rattlesnake as a condom. +% +When the movie Pulp Fiction was filmed they had to borrow Chuck Norris's wallet... It's the one that says "Bad Mother Fucker" on it +% +The Bible was originally titled "Chuck Norris and Friends" +% +Chuck Norris began selling the Total Gym as an ill-fated attempt to make his day-to-day opponents less laughably pathetic. +% +Do you know why Baskin Robbins only has 31 flavors? Because Chuck Norris doesn't like Fudge Ripple. +% +When Chuck Norris says "More cowbell", he fucking MEANS it. +% +On the set of Walker Texas Ranger Chuck Norris brought a dying lamb back to life by nuzzling it with his beard. As the onlookers gathered, the lamb sprang to life. Chuck Norris then roundhouse kicked it, killing it instantly. This was just to prove that the good Chuck giveth, and the good Chuck, he taketh away. +% +Chuck Norris was what Willis was talkin' about. +% +Google won't search for Chuck Norris because it knows you don't find Chuck Norris, he finds you. +% +Chuck Norris can lead a horse to water AND make it drink. +% +Nagasaki never had a bomb dropped on it. Chuck Norris jumped out of a plane and punched the ground. +% +It is scientifically impossible for Chuck Norris to have had a mortal father. The most popular theory is that he went back in time and fathered himself. +% +Chuck Norris destroyed the periodic table, because Chuck Norris only recognizes the element of surprise. +% +It is believed dinosaurs are extinct due to a giant meteor. That's true if you want to call Chuck Norris a giant meteor. +% +Chuck Norris shot the sheriff, but he round house kicked the deputy. +% +That's not Chuck Norris doing push-ups -- that's Chuck Norris moving the Earth away from the path of a deadly asteroid. +% +Chuck Norris can judge a book by its cover. +% +Nothing can escape the gravity of a black hole, except for Chuck Norris. Chuck Norris eats black holes. They taste like chicken. +% +Chuck Norris does not play the lottery. It doesn't have nearly enough balls. +% +Q: How many Chuck Norris' does it take to change a light bulb? +A: None, Chuck Norris prefers to kill in the dark. +% +As President Roosevelt said: "We have nothing to fear but fear itself. And Chuck Norris." +% +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.� +% +Crime does not pay - unless you are an undertaker following Walker, Texas Ranger, on a routine patrol. +% +Chuck Norris invented the internet? just so he had a place to store his porn. +% +Chuck Norris does not own a house. He walks into random houses and people move. +% +It is better to give than to receive. This is especially true of a Chuck Norris roundhouse kick. +% +Chuck Norris is the only person to ever win a staring contest against Ray Charles and Stevie Wonder at the same time. +% +Industrial logging isn't the cause of deforestation. Chuck Norris needs toothpicks. +% +Chuck Norris smells what the Rock is cooking... because the Rock is Chuck Norris' personal chef. +% +When Chuck Norris plays Oregon Trail, his family does not die from cholera or dysentery, but rather, roundhouse kicks to the face. He also requires no wagon, since he carries the oxen, axels, and buffalo meat on his back. He always makes it to Oregon before you. +% +Chuck Norris is the reason why Waldo is hiding. +% +"Brokeback Mountain" is not just a movie. It's also what Chuck Norris calls the pile of dead ninjas in his front yard. +% +When God said, "let there be light", Chuck Norris said, "say 'please'." +% +Chuck Norris does not eat. Food understands that the only safe haven from Chuck Norris' fists is inside his own body. +% +One day Chuck Norris walked down the street with a massive erection. There were no survivors. +% +Chuck Norris built a time machine and went back in time to stop the JFK assassination. As Oswald shot, Chuck met all three bullets with his beard, deflecting them. JFK's head exploded out of sheer amazement. +% +Chuck Norris doesn't read books. He stares them down until he gets the information he wants. +% +Chuck Norris uses a night light. Not because Chuck Norris is afraid of the dark, but the dark is afraid of Chuck Norris. +% +Chuck Norris is not capable of hitting a target on the broad side of a barn. Every time he tries, the whole damn barn falls down. +% +Before each filming of Walker: Texas Ranger, Chuck Norris is injected with fourteen times the lethal dose of elephant tranquilzer. This is, of course, to limit his strength and mobility, in an attempt to lower the fatality rate of the actors he fights. +% +When Bruce Banner gets mad, he turns into the Hulk. When the Hulk gets mad, he turns into Chuck Norris. +% +Chuck Norris kills anyone that asks, "You want fries with that" because by now everyone should know that Chuck doesn't ever want fries with anything. Ever. +% +Chuck Norris once kicked a horse in the chin. Its decendants are known today as Giraffes. +% +Sticks and stones may break your bones, but a Chuck Norris glare will liquefy your kidneys. +% +Human cloning is outlawed because if Chuck Norris were cloned, then it would be possible for a Chuck Norris roundhouse kick to meet another chuck Norris roundhouse kick. Physicists theorize that this contact would end the universe. +% +Chuck Norris once went skydiving, but promised never to do it again. One Grand Canyon is enough. +% +Chuck Norris's version of a "chocolate milkshake" is a raw porterhouse wrapped around ten Hershey bars, and doused in diesel fuel. +% +If Chuck Norris round-house kicks you, you will die. If Chuck Norris' misses you with the round-house kick, the wind behind the kick will tear out your pancreas. +% +In a fight between Batman and Darth Vader, the winner would be Chuck Norris. +% +Chuck Norris puts his pants on one leg at a time, just like the rest of us. The only difference is, then he fucking kills people. +% +Everybody loves Raymond. Except Chuck Norris. +% +Contrary to popular belief, the Titanic didn't hit an iceberg. The ship was off course and accidentally ran into Chuck Norris while he was doing the backstroke across the Atlantic. +% +Chuck Norris got his drivers license at the age of 16. Seconds. +% +The original title for Alien vs. Predator was Alien and Predator vs Chuck Norris. The film was cancelled shortly after going into preproduction. No one would pay nine dollars to see a movie fourteen seconds long. +% +Chuck Norris' sperm is so badass, he had sex with Nicole Kidman, and 7 months later she prematurely gave birth to a Ford Excursion. +% +Chuck Norris can win at solitaire with only 18 cards. +% +Chuck Norris once shat blood - the blood of 11,940 natives he had killed and eaten. +% +Maslow's theory of higher needs does not apply to Chuck Norris. He only has two needs: killing people and finding people to kill. +% +The truth will set you free. Unless Chuck Norris has you, in which case, forget it buddy! +% +For most people, home is where the heart is. For Chuck Norris, home is where he stores his collection of human skulls. +% +Kryptonite has been found to contain trace elements of Chuck Norris roundhouse kicks to the face. This is why it is so deadly to Superman. +% +Saddam Hussein was not found hiding in a "hole." Saddam was roundhouse-kicked in the head by Chuck Norris in Kansas, which sent him through the earth, stopping just short of the surface of Iraq. +% +Coroners refer to dead people as "ABC's". Already Been Chucked. +% +Chuck Norris doesn't look both ways before he crosses the street... he just roundhouses any cars that get too close. +% +Chuck Norris does not have to answer the phone. His beard picks up the incoming electrical impulses and translates them into audible sound. +% +How many roundhouse kicks does it take to get to the center of a tootsie pop? Just one. From Chuck Norris. +% +Chuck Norris doesnt wear a watch, HE decides what time it is. +% +The phrase 'break a leg' was originally coined by Chuck Norris's co-stars in Walker, Texas Ranger as a good luck charm, indicating that a broken leg might be the worst extent of their injuries. This never proved to be the case. +% +When chuck Norris does division, there are no remainders. +% +If you rearrange the letters in "Chuck Norris", they also spell "Crush Rock In". The words "with his fists" are understood. +% +Never look a gift Chuck Norris in the mouth, because he will bite your damn eyes off. +% +Give a man a fish, and you will feed him for a day. Give a man anything that is better than a fish, and Chuck Norris will beat his ass and take it. +% +Chuck Norris used to play baseball. When Babe Ruth was hailed as the better player, Chuck Norris killed him with a baseball bat to the throat. Lou Gehrig got off easy. +% +The original title for Star Wars was "Skywalker: Texas Ranger". Starring Chuck Norris. +% +Guantuanamo Bay, Cuba, is the military code-word for "Chuck Norris' basement". +% +The phrase 'balls to the wall' was originally conceived to describe Chuck Norris entering any building smaller than an aircraft hangar. +% +Chuck Norris' roundhouse kick is so powerful, it can be seen from outer space by the naked eye. +% +Ozzy Osbourne bites the heads off of bats. Chuck Norris bites the heads off of Siberian Tigers. +% +He who lives by the sword, dies by the sword. He who lives by Chuck Norris, dies by the roundhouse kick. +% +The best-laid plans of mice and men often go awry. Even the worst-laid plans of Chuck Norris come off without a hitch. +% +The phrase 'dead ringer' refers to someone who sits behind Chuck Norris in a movie theater and forgets to turn their cell phone off. +% +Chuck Norris' Roundhouse kick is so powerful, that on the set of Sidekicks he single-footedly destroyed Jonathan Brandis' Career. +% +Staring at Chuck Norris for extended periods of time without proper eye protection will cause blindess, and possibly foot sized brusies on the face. +% +Chuck Norris can taste lies. +% +Chuck Norris does not kick ass and take names. In fact, Chuck Norris kicks ass and assigns the corpse a number. It is currently recorded to be in the billions. +% +One time, Chuck Norris accidentally stubbed his toe. It destroyed the entire state of Ohio. +% +Little Miss Muffet sat on her tuffet, until Chuck Norris roundhouse kicked her into a glacier. +% +In 1990, Chuck Norris founded the non-profit organization "Kick Drugs Out of America". If the organization's name were "Roundhouse Kick Drugs out of America", there wouldn't be any drugs in the Western Hemisphere. Anywhere. +% +Chuck Norris can blow bubbles with beef jerky. +% +They had to edit the first ending of 'Lone Wolf McQuade' after Chuck Norris kicked David Carradine's ass, then proceeded to barbecue and eat him. +% +Chuck Norris does, in fact, live in a round house. +% +Chuck Norris was once on Jeopardy. This show is notable in that it was the first occasion in Jeopardy history that Alex Trebek had appeared without a mustache. And a head. +% +When Chuck Norris works out on the Total Gym, the Total Gym feels like it's been raped. +% +4 out of 5 doctors fail to recommend Chuck Norris as a solution to most problems. Also, 80% of doctors die unexplained, needlessly brutal deaths. +% +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. +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. +% +The square root of Chuck Norris is pain. Do not try to square Chuck Norris, the result is death. +% +Chuck Norris' testicles do not produce sperm. They produce tiny white ninjas that recognize only one mission: seek and destroy. +% +To be or not to be? That is the question. The answer? Chuck Norris. +% +Chuck Norris has never been in a fight, ever. Do you call one roundhouse kick to the face a fight? +% +There are two types of people in the world... people that suck, and Chuck Norris. +% +Chuck Norris never wet his bed as a child. The bed wet itself out of fear. +% +If you were somehow able to land a punch on Chuck Norris your entire arm would shatter upon impact. This is only in theory, since, come on, who in their right mind would try this? +% +70% of a human's weight is water. 70% of Chuck Norris' weight is his dick. +% +Jean-Claude Van Damme once kicked Chuck Norris' ass. He was then awakened from his dream by a roundhouse kick to the face. +% +The pie scene in "American Pie" is based on a dare Chuck Norris took when he was younger. However, in Chuck Norris' case, the "pie" was the molten crater of an active volcano. +% +Chuck Norris uses 8'x10' sheets of plywood as toilet paper. +% +Noah was the only man notified before Chuck Norris relieved himself in the Atlantic Ocean. +% +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. +% +Chuck Norris eats steak for every single meal. Most times he forgets to kill the cow. +% +The First Law of Thermodynamics states that energy can neither be created nor destroyed... unless it meets Chuck Norris. +% +Chuck Norris doesn't go on the internet, he has every internet site stored in his memory. He refreshes webpages by blinking. +% +Fact: Chuck Norris doesn't consider it sex if the woman survives. +% +It is said that looking into Chuck Norris' eyes will reveal your future. Unfortunately, everybody's future is always the same: death by a roundhouse-kick to the face. +% +Chuck Norris knows everything there is to know - Except for the definition of mercy. +% +Scientifically speaking, it is impossible to charge Chuck Norris with "obstruction of justice." This is because even Chuck Norris cannot be in two places at the same time. +% +Chuck Norris never has to wax his skis because they're always slick with blood. +% +When you say "no one's perfect", Chuck Norris takes this as a personal insult. +% +Chuck Norris can win a game of Trivial Pursuit with one roll of the dice, and without answering a single question... just a nod of the head, and a stroke of the beard. +% +182,000 Americans die from Chuck Norris-related accidents every year. +% +Paper beats rock, rock beats scissors, and scissors beats paper, but Chuck Norris beats all 3 at the same time. +% +Jesus can walk on water, but Chuck Norris can walk on Jesus. +% +All roads lead to Chuck Norris. And by the transitive property, a roundhouse kick to the face. +% +If you're driving down the road and you think Chuck Norris just cut you off, you better thank your lucky stars it wasn't the other way around. +% +July 4th is Independence day. And the day Chuck Norris was born. Coincidence? i think not. +% +Chuck Norris never goes to the dentist because his teeth are unbreakable. His enemies never go to the dentist because they have no teeth. +% +In the medical community, death is referred to as "Chuck Norris Disease" +% +Chuck Norris was once in a knife fight, and the knife lost. +% +If you work in an office with Chuck Norris, don't ask him for his three-hole-punch. +% +In the Words of Julius Caesar, "Veni, Vidi, Vici, Chuck Norris". Translation: I came, I saw, and I was roundhouse-kicked inthe face by Chuck Norris. +% +The First rule of Chuck Norris is: you do not talk about Chuck Norris. +% +Chuck Norris is widely predicted to be first black president. If you're thinking to yourself, "But Chuck Norris isn't black", then you are dead wrong. And stop being a racist. +% +When Chuck Norris plays Monopoly, it affects the actual world economy. +% +Chuck Norris can be unlocked on the hardest level of Tekken. But only Chuck Norris is skilled enough to unlock himself. Then he roundhouse kicks the Playstation back to Japan. +% +Chuck Norris drinks napalm to quell his heartburn. +% +Every time someone uses the word "intense", Chuck Norris always replies "you know what else is intense?" followed by a roundhouse kick to the face. +% +As an infant, Chuck Norris' parents gave him a toy hammer. He gave the world Stonehenge. +% +Chuck Norris once ordered a steak in a restaurant. The steak did what it was told. +% +Most people fear the Reaper. Chuck Norris considers him "a promising Rookie". +% +There are only two things that can cut diamonds: other diamonds, and Chuck Norris. +% +President Roosevelt once rode his horse 100 miles. Chuck Norris carried his the same distance in half the time. +% +Chuck Norris once ate four 30lb bowling balls without chewing. +% +What many people dont know is chuck norris is the founder of planned parenthood. Not even unborn children can escape his wrath. +% +Chuck Norris was banned from competitive bullriding after a 1992 exhibition in San Antonio, when he rode the bull 1,346 miles from Texas to Milwaukee Wisconsin to pick up his dry cleaning. +% +Chuck Norris qualified with a top speed of 324 mph at the Daytona 500, without a car. +% +Chuck Norris likes his coffee half and half: half coffee grounds, half wood-grain alcohol. +% +Chuck Norris uses tabasco sauce instead of visine. +% +The chemical formula for the highly toxic cyanide ion is CN-. These are also Chuck Norris' initials. This is not a coincidence. +% +Chuck Norris' credit cards have no limit. Last weekend, he maxed them out. +% +Think of a hot woman. Chuck Norris did her. +% +A man once claimed Chuck Norris kicked his ass twice, but it was promptly dismissed as false - no one could survive it the first time. +% +Chuck Norris sleeps with a pillow under his gun. +% +Chuck Norris owns a chain of fast-food restaurants throughout the southwest. They serve nothing but barbecue-flavored ice cream and Hot Pockets. +% +Chuck Norris doesn't chew gum. Chuck Norris chews tin foil. +% +Aliens DO indeed exist. They just know better than to visit a planet that Chuck Norris is on. +% +When in a bar, you can order a drink called a "Chuck Norris". It is also known as a "Bloody Mary", if your name happens to be Mary. +% +Every time Chuck Norris smiles, someone dies. Unless he smiles while he's roundhouse kicking someone in the face. Then two people die. +% +Some people ask for a Kleenex when they sneeze, Chuck Norris asks for a body bag. +% +There's an order to the universe: space, time, Chuck Norris.... Just kidding, Chuck Norris is first. +% +A man once asked Chuck Norris if his real name is "Charles". Chuck Norris did not respond, he simply stared at him until he exploded. +% +Chuck Norris starts everyday with a protein shake made from Carnation Instant Breakfast, one dozen eggs, pure Colombian cocaine, and rattlesnake venom. He injects it directly into his neck with a syringe. +% +In a tagteam match, Chuck Norris was teamed with Hulk Hogan against King Kong Bundy and Andre The Giant. He pinned all 3 at the same time. +% +Chuck Norris doesn't see dead people. He makes people dead. +% +Chuck Norris is the only person who can simultaneously hold and fire FIVE Uzis: One in each hand, one in each foot -- and the 5th one he roundhouse-kicks into the air, so that it sprays bullets. +% +For undercover police work, Chuck Norris pins his badge underneath his shirt, directly into his chest. +% +In the X-Men movies, none of the X-Men super-powers are done with special effects. Chuck Norris is the stuntman for every character. +% +We live in an expanding universe. All of it is trying to get away from Chuck Norris. +% +Chuck Norris went looking for a bar but couldn't find one. He walked to a vacant lot and sat there. Sure enough within an hour an a half someone constructed a bar around him. He then ordered a shot, drank it, and then burned the place to the ground. Chuck Norris yelled over the roar of the flames, "always leave things the way you found em!" +% +It is said that every time you masturbate, God kills a kitten. Every time God masturbates, Chuck Norris kills a lion. +% +The word 'Kill' was invented by Chuck Norris. Other words were 'Die', 'Beer', and 'What'. +% +Chuck Norris is a vegetarian. Meaning, he does not eat animals until first he puts them into vegetative state with his fists. +% +The 11th commandment is "Thou shalt not piss off Chuck Norris" This commandment is rarely enforced, as it is impossible to accomplish. +% +Chuck Norris is his own line at the DMV. +% +Two wrongs don't make a right. Unless you're Chuck Norris. Then two wrongs make a roundhouse kick to the face. +% +Who let the dogs out? Chuck Norris let the dogs out... and then roundhouse kicked them through an Oldsmobile. +% +Chuck Norris can do a roundhouse kick faster than the speed of light. This means that if you turn on a light switch, you will be dead before the lightbulb turns on. +% +When Chuck Norris goes to out to eat, he orders a whole chicken, but he only eats its soul. +% +Chuck Norris sold his soul to the devil for his rugged good looks and unparalleled martial arts ability. Shortly after the transaction was finalized, Chuck roundhouse-kicked the devil in the face and took his soul back. The devil, who appreciates irony, couldn't stay mad and admitted he should have seen it coming. They now play poker every second Wednesday of the month. +% +Chuck Norris has never won an Academy Award for acting... because he's not acting. +% +If Chuck Norris wants your opinion, he'll beat it into you. +% +Not everyone that Chuck Norris is mad at gets killed. Some get away. They are called astronauts. +% +Chuck Norris has to register every part of his body as a separate lethal weapon. His spleen is considered a concealed weapon in over 50 states. +% +A movie scene depicting Chuck Norris losing a fight with Bruce Lee was the product of history's most expensive visual effect. When adjusted for inflation, the effect cost more than the Gross National Product of Paraguay. +% +Godzilla is a Japanese rendition of Chuck Norris' first visit to Tokyo. +% +They once made a Chuck Norris toilet paper, but there was a problem-- It wouldn't take shit from anybody. +% +Chuck Norris once rode a nine foot grizzly bear through an automatic car wash, instead of taking a shower. +% +"Sweating bullets" is literally what happens when Chuck Norris gets too hot. +% +Chuck Norris' sperm can be seen with the naked eye. Each one is the size of a quarter. +% +After taking a steroids test doctors informed Chuck Norris that he had tested positive. He laughed upon receiving this information, and said "of course my urine tested positive, what do you think they make steroids from?" +% +Chuck Norris doesn't daydream. He's too busy giving other people nightmares. +% +When Arnold says the line "I'll be back" in the first Terminator movie it is implied that is he going to ask Chuck Norris for help. +% +There are no such things as tornados. Chuck Norris just hates trailer parks. +% +Chuck Norris' Penis is a third degree blackbelt, and an honorable 32nd-degree mason. +% +Chuck Norris does not follow fashion trends, they follow him. But then he turns around and kicks their ass. Nobody follows Chuck Norris. +% +The phrase 'break a leg' was originally coined by Chuck Norris's co-stars in Walker, Texas Ranger as a good luck charm indicating that a broken leg might be the worst extent of their injuries. This never proved to be the case. +% +Chuck Norris' roundhouse kick is so powerful, it can be seen from outer space by the naked eye. +% +Diamonds are not, despite popular belief, carbon. They are, in fact, Chuck Norris fecal matter. This was proven a recently, when scientific analysis revealed what appeared to be Jean-Claude Van Damme bone fragments inside the Hope Diamond. +% +Chuck Norris once participated in the running of the bulls. He walked. +% +The Drummer for Def Leppard's only got one arm. Chuck Norris needed a back scratcher. +% +Chuck Norris was the orginal sculptor of Mount Rushmore. He completed the entire project using only a bottle opener and a drywall trowel. +% +Chuck Norris once rode a bull, and nine months later it had a calf. +% +Chuck Norris once lost the remote, but maintained control of the TV by yelling at it in between bites of his "Filet of Child" sandwich. +% +For Spring Break '05, Chuck Norris drove to Madagascar, riding a chariot pulled by two electric eels. +% +The Manhattan Project was not intended to create nuclear weapons, it was meant to recreate the destructive power in a Chuck Norris Roundhouse Kick. They didn't even come close. +% +Chuck Norris has banned rainbows from the state of North Dakota. +% +Divide Chuck Norris by zero and you will in fact get one........one bad-ass motherfucker that is. +% +TNT was originally developed by Chuck Norris to cure indigestion. +% +After returning from World War 2 unscathed, Bob Dole was congratulated by Chuck Norris with a handshake. The rest is history. +% +Chuck Norris runs on batteries. Specifically, Die Hards. +% +"Let the Bodies Hit the Floor" was originally written as Chuck Norris' theme song. +% +Chuck Norris will never have a heart attack. His heart isn't nearly foolish enough to attack him. +% +Only Chuck Norris can prevent forest fires. +% +When Chuck Norris makes a burrito, its main ingredient is real toes. +% +Chuck Norris is not Irish. His hair is soaked in the blood of his victims. +% +In the movie "The Matrix", Chuck Norris is the Matrix. If you pay close attention in the green "falling code" scenes, you can make out the faint texture of his beard. +% +Chuck Norris' dick is so big, it has it's own dick, and that dick is still bigger than yours. +% +They say curiosity killed the cat. This is false. Chuck Norris killed the cat. Every single one of them. +% +There is no such thing as a lesbian, just a woman who has never met Chuck Norris. +% +Chuck Norris crossed the road. No one has ever dared question his motives. +% +When Chuck Norris was born, he immediately had sex with the first nurse he saw. He was her first. She was his third. That afternoon. +% +One time, at band camp, Chuck Norris ate a percussionist. +% +Chuck Norris doesn't say "who's your daddy", because he knows the answer. +% +Chuck Norris originally wrote the first dictionary. The definition for each word is as follows - A swift roundhouse kick to the face. +% +Love does not hurt. Chuck Norris does. +% +The term "Cleveland Steamer" got its name from Chuck Norris, when he took a dump while visiting the Rock and Roll Hall of fame and buried northern Ohio under a glacier of fecal matter. +% +Chuck Norris once round-house kicked a salesman. Over the phone. +% +The pen is mighter than the sword, but only if the pen is held by Chuck Norris. +% +Chuck Norris doesn't kill two birds with one stone. Chuck Norris kills all birds, with two stones. The ones in his pants. +% +Chuck Norris knows the last digit of pi. +% +Those aren't credits that roll after Walker Texas Ranger. It is actually a list of fatalities that occurred during the making of the episode. +% +The air around Chuck Norris is always a balmy 78 degrees. +% +When Chuck Norris wants an egg, he cracks open a chicken. +% +Chuck Norris plays racquetball with a waffle iron and a bowling ball. +% +According to the Bible, God created the universe in six days. Before that, Chuck Norris created God by snapping his fingers. +% +Chuck Norris doesn't believe in ravioli. He stuffs a live turtle with beef and smothers it in pig's blood. +% +Count from one to ten. That's how long it would take Chuck Norris to kill you...Fourty seven times. +% +The 1972 Miami Dolphins lost one game, it was an exhibition game vs. Chuck Norris and three seven year old girls. Chuck Norris won with a roundhouse-kick to the face in overtime. +% +Chuck Norris is not Politically Correct. He is just Correct. Always. +% +Mr. T pities the fool. Chuck Norris rips the fool's fucking head off. +% +Chuck Norris had to stop washing his clothes in the ocean. The tsunamis were killing people. +% +Chuck Norris has volunteered to remain on earth after the Rapture; he will spend his time fighting the Anti-Christ. +% +They were going to release a Chuck Norris edition of Clue, but the answer always turns out to be "Chuck Norris. In The Library. With a Roundhouse Kick." +% +Chuck Norris is the only known mammal in history to have an opposable thumb. On his penis. +% +A man once taunted Chuck Norris with a bag of Lay's potato chips, saying "Betcha can't eat just one!" Chuck Norris proceeded to eat the chips, the bag, and the man in one deft move. +% +Chuck Norris' favorite cereal is Kellogg's Nails 'N' Gravel. +% +In the first Jurassic Park movie, the Tyrannosaurus Rex wasn't chasing the jeep. Chuck Norris was chasing the Tyrannosaurus AND the jeep. +% +Chuck Norris has never been accused of murder for the simple fact that his roundhouse kicks are recognized world-wide as "acts of God." +% +"Brokeback Mountain" is not just a movie. It's also what Chuck Norris calls the pile of dead ninjas in his front yard. +% +Chuck Norris does not wear a condom. Because there is no such thing as protection from Chuck Norris. +% +Chuck Norris once had sex with a cigarette machine in the Osaka airport. +% +Rules of fighting: 1) Don't bring a knife to a gun fight. 2) Don't bring a gun to a Chuck Norris fight. +% +Chuck Norris is the only man who has, literally, beaten the odds. With his fists. +% +In ancient China there is a legend that one day a child will be born from a dragon, grow to be a man, and vanquish evil from the land. That man is not Chuck Norris, because Chuck Norris killed that man. +% +Chuck Norris wipes his ass with chain mail and sandpaper. +% +When you play Monopoly with Chuck Norris, you do not pass go, and you do not collect two hundred dollars. You will be lucky if you make it out alive. +% +Chuck Norris describes human beings as "a sociable holder for blood and guts". +% +Chuck Norris once got into a fight with a one-armed Ninja. Seeing that he had an unfair advantage, Chuck Norris ripped both of his arms off and one of his legs. He then roundhouse-kicked the ninja in the head, killing him instantly, and proceeded to sow his limbs back on using only a rusty tent spike and bailing wire. +% +Chuck Norris likes his ice like he likes his skulls: crushed. +% +Chuck Norris can kick through all 6 degrees of separation, hitting anyone, anywhere, in the face, at any time. +% +Most tough men eat nails for breakfast. chuck Norris does all of his grocery shopping at Home Depot. +% +Chuck Norris did not "lose" his virginity, he stalked it and then destroyed it with extreme prejudice. +% +Everything King Midas touches turnes to gold. Everything Chuck Norris touches turns up dead. +% +Chuck Norris' pulse is measured on the richter scale. +% +Most people know that Descarte said, "I think, therefore I am." What most people don't know is that that quote continues, "...afraid of Chuck Norris." +% +Chuck Norris once roundhouse-kicked a ten dollar bill into 200 nickels. +% +For every movie about Vietnam starring Chuck Norris, the historical duration of the war decreases. Just 3 more "Missing in Action" sequels, and that war will have never actually existed. +% +Chuck Norris' penis has a Hemi. +% +Chuck Norris enjoys a good practical joke. His favorite is where he removes your lower intestine and pretends to make a balloon animal out of it. Then he cracks your skull open with a Volvo for not complimenting him on his balloon animal. +% +Chuck Norris CAN in fact 'raise the roof'. And he can do it with one hand. +% +Kenny G is allowed to live because Chuck Norris doesn't kill women. +% +Life is not, in fact, like a box of chocolates. It is more like a box of Chuck Norris, roundhouse kicking you in the face. And if you receive a box of Chuck Norris, you ALWAYS know what you are going to get. +% +For Chuck Norris, every street is "one way". HIS WAY. +% +There are now five cup sizes at Starbucks: Short, Tall, Grande, Venti, and Chuck Norris. +% +During the Vietnam War, Chuck Norris allowed himself to be captured. For torture, they made him eat his own entrails. He asked for seconds. +% +Chuck Norris once created a flamethrower by urinating into a lighter. +% +Instead of having a cigarette after sex, Chuck Norris heads outside and brands his cattle. +% +Chuck Norris actually built the stairway to heaven. +% +Whoever said "only the good die young" was probably in Chuck Norris's kindergarten class. +% +Chuck Norris once skewered a man with the Eiffel tower. +% +The best part of waking up, is not Folgers in your cup, but knowing that Chuck Norris didn't kill you in your sleep. +% +Chuck Norris doesn't own a can opener, he just chews through the can. +% +Occam's Razor says that the simplest answer tends to be the correct one. Norris' Razor involves a flick of the wrist and a Columbian Necktie. +% +Chuck Norris needs a monkeywrench and a blowtorch to masturbate. +% +Proponents of higher-order theories of consciousness argue that consciousness is explained by the relation between two levels of mental states in which a higher-order mental state takes another mental state. If you mention this to Chuck Norris, expect an explosive roundhouse kick to the face for spouting too much fancy-talk. +% +Chuck Norris invented all 32 letters of the alphabet. +% +Remember The Ultimate Warrior? He quit wrestling because Chuck Norris wanted his nickname back. +% +If a tree falls in the forest, does anybody hear? Yes. Chuck Norris hears it. Chuck Norris can hear everything. Chuck Norris can hear the shrieking terror in your soul. +% +Chuck Norris actually owns IBM. It was an extremely hostile takeover. +% +He, who laughs last, laughs best. He who laughs at Chuck Norris ? dies. +% +Chuck Norris is like a dog, not only because he can smell fear, but because he can piss on whatever the fuck he wants. +% +Chuck Norris can jump-start a car using jumper cables attached to his nipples. +% +Chuck Norris neither melts in your mouth nor in your hand. He shreds your trachea before ravaging your soul with a combination of chocolate, whickey, roundhouse kicks and death. Oh, and pain. Lots of pain. +% +Chuck Norris doesn't have blood. He is filled with magma. +% From fc606d91a0cc8f58c69af39544ddefcb2bdccc55 Mon Sep 17 00:00:00 2001 From: Deepu Mohan Puthrote <github@deepumohan.com> Date: Sat, 7 Feb 2015 16:57:53 +0000 Subject: [PATCH 280/488] Added alias for downloading maven dependencies' sources and javadocs --- plugins/mvn/mvn.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/mvn/mvn.plugin.zsh b/plugins/mvn/mvn.plugin.zsh index 0c4f77162..865b15235 100644 --- a/plugins/mvn/mvn.plugin.zsh +++ b/plugins/mvn/mvn.plugin.zsh @@ -60,6 +60,8 @@ alias mvntc='mvn tomcat:run' alias mvnjetty='mvn jetty:run' alias mvndt='mvn dependency:tree' alias mvns='mvn site' +alias mvnsrc='mvn dependency:sources' +alias mvndocs='mvn dependency:resolve -Dclassifier=javadoc' function listMavenCompletions { reply=( From 6bccb1a7b0448610d10518e3ac9f47315e94e7b9 Mon Sep 17 00:00:00 2001 From: Jakob Jordan <j.jordan@fz-juelich.de> Date: Mon, 9 Feb 2015 18:18:15 +0100 Subject: [PATCH 281/488] removed superfluous vcs_info_msg in trapd00r theme in the trapd00r theme vcs info is already displayed on the first line if in a version controlled directory. the second vcs info was displayed at the end of the second line without providing additional information. this was removed. --- themes/trapd00r.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/trapd00r.zsh-theme b/themes/trapd00r.zsh-theme index cb1c43c56..ca1676fb5 100644 --- a/themes/trapd00r.zsh-theme +++ b/themes/trapd00r.zsh-theme @@ -86,7 +86,7 @@ prompt_jnrowe_precmd () { else dir_status="%{$c1%}%n%{$c4%}@%{$c2%}%m%{$c0%}:%{$c3%}%l%{$c6%}->%{$(zsh_path)%} %{$c0%}(%{$c5%}%?%{$c0%})" PROMPT='${vcs_info_msg_0_} -%{$fg_bold[green]%}%p%{$reset_color%}${dir_status} ${vcs_info_msg_0_}%{$reset_color%} +%{$fg_bold[green]%}%p%{$reset_color%}${dir_status}%{$reset_color%} > ' fi } From 7f636ba5901b1abe9bb01d94b9e290bed982a873 Mon Sep 17 00:00:00 2001 From: Chris Peterson <cpeterson@financialforce.com> Date: Mon, 17 Nov 2014 20:38:22 -0800 Subject: [PATCH 282/488] Backwards logic in newer check. Regen .ant_targets only if it's newer than build.xml? Yeah, that seems wrong. --- plugins/ant/ant.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ant/ant.plugin.zsh b/plugins/ant/ant.plugin.zsh index 45f2b06eb..38d13f2a8 100644 --- a/plugins/ant/ant.plugin.zsh +++ b/plugins/ant/ant.plugin.zsh @@ -1,6 +1,6 @@ _ant_does_target_list_need_generating () { [ ! -f .ant_targets ] && return 0; - [ .ant_targets -nt build.xml ] && return 0; + [ build.xml -nt .ant_targets ] && return 0; return 1; } From 013b2bffcf11d0bc3ff29c96a8e6846166639c2c Mon Sep 17 00:00:00 2001 From: Chris Peterson <cpeterson@financialforce.com> Date: Mon, 17 Nov 2014 20:43:19 -0800 Subject: [PATCH 283/488] Change ant target enumeration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Make use of ant's project help feature instead of trying to parse XML with regex (see: http://stackoverflow.com/a/1732454/740787). This is a behavioral change that does a few things: • adds support for ant imports, which were previously not recognized as possibly containing targets • supresses targets with no description, as these are conventionally for internal use only --- plugins/ant/ant.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ant/ant.plugin.zsh b/plugins/ant/ant.plugin.zsh index 38d13f2a8..a945967d5 100644 --- a/plugins/ant/ant.plugin.zsh +++ b/plugins/ant/ant.plugin.zsh @@ -7,7 +7,7 @@ _ant_does_target_list_need_generating () { _ant () { if [ -f build.xml ]; then if _ant_does_target_list_need_generating; then - sed -n '/<target/s/<target.*name="\([^"]*\).*$/\1/p' build.xml > .ant_targets + ant -p | awk -F " " 'NR > 5 { print lastTarget }{lastTarget = $1}' > .ant_targets fi compadd `cat .ant_targets` fi From 349493a0b81ae98117ea1a115a92ba509476298f Mon Sep 17 00:00:00 2001 From: Chris Peterson <cpeterson@financialforce.com> Date: Mon, 9 Feb 2015 12:43:51 -0800 Subject: [PATCH 284/488] Fix for ant targets with leading dash As suggested in https://github.com/robbyrussell/oh-my-zsh/pull/3329#issuecomment-72062236 --- plugins/ant/ant.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ant/ant.plugin.zsh b/plugins/ant/ant.plugin.zsh index a945967d5..0b738c94f 100644 --- a/plugins/ant/ant.plugin.zsh +++ b/plugins/ant/ant.plugin.zsh @@ -9,7 +9,7 @@ _ant () { if _ant_does_target_list_need_generating; then ant -p | awk -F " " 'NR > 5 { print lastTarget }{lastTarget = $1}' > .ant_targets fi - compadd `cat .ant_targets` + compadd -- `cat .ant_targets` fi } From 5fe22fcbc6364aaacce373d71fa7d6b6f2d11a33 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Tue, 16 Dec 2014 00:43:01 +0100 Subject: [PATCH 285/488] Clean up and fix +1/-0 syntax to work as expected This change follows this proposed behaviour: Ctrl+Shift+Left: move to last visited directory Ctrl+Shift+Right: move to next visited directory an alternative behaviour would be: Ctrl+Shift+Left: move directory to the left in `dirs` output Ctrl+Shift+Right: move directory to the right in `dirs` output It also introduces `setopt nopushdminus` as a way to standardise pushd syntax. It's value wasn't clear before, which has been the cause of so many pull requests regarding this plugin not working in some environments. --- plugins/dircycle/dircycle.plugin.zsh | 29 ++++++++++++++++++++++------ 1 file changed, 23 insertions(+), 6 deletions(-) diff --git a/plugins/dircycle/dircycle.plugin.zsh b/plugins/dircycle/dircycle.plugin.zsh index c6b6ba785..2064af46a 100644 --- a/plugins/dircycle/dircycle.plugin.zsh +++ b/plugins/dircycle/dircycle.plugin.zsh @@ -1,10 +1,27 @@ -## -# dircycle plugin: enables cycling through the directory -# stack using Ctrl+Shift+Left/Right +# enables cycling through the directory stack using +# Ctrl+Shift+Left/Right +# +# left/right direction follows the order in which directories +# were visited, like left/right arrows do in a browser -eval "insert-cycledleft () { zle push-line; LBUFFER='pushd -q +1'; zle accept-line }" +# NO_PUSHD_MINUS syntax: +# pushd +N: start counting from left of `dirs' output +# pushd -N: start counting from right of `dirs' output +setopt nopushdminus + +insert-cycledleft () { + zle push-line + LBUFFER='pushd -q +1' + zle accept-line +} zle -N insert-cycledleft -bindkey "\e[1;6D" insert-cycledleft -eval "insert-cycledright () { zle push-line; LBUFFER='pushd -q +0'; zle accept-line }" + +insert-cycledright () { + zle push-line + LBUFFER='pushd -q -0' + zle accept-line +} zle -N insert-cycledright + +bindkey "\e[1;6D" insert-cycledleft bindkey "\e[1;6C" insert-cycledright From e93fd939adb69a498ba1296b1ce0c99786e26084 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Tue, 16 Dec 2014 01:29:06 +0100 Subject: [PATCH 286/488] Run pushd command directly and trigger prompt redraw --- plugins/dircycle/dircycle.plugin.zsh | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) diff --git a/plugins/dircycle/dircycle.plugin.zsh b/plugins/dircycle/dircycle.plugin.zsh index 2064af46a..1c4a0175a 100644 --- a/plugins/dircycle/dircycle.plugin.zsh +++ b/plugins/dircycle/dircycle.plugin.zsh @@ -10,16 +10,14 @@ setopt nopushdminus insert-cycledleft () { - zle push-line - LBUFFER='pushd -q +1' - zle accept-line + builtin pushd -q +1 &>/dev/null || true + zle reset-prompt } zle -N insert-cycledleft insert-cycledright () { - zle push-line - LBUFFER='pushd -q -0' - zle accept-line + builtin pushd -q -0 &>/dev/null || true + zle reset-prompt } zle -N insert-cycledright From 999bab187c0a59301f4055fb6239a5352d3c96ab Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Sat, 20 Dec 2014 20:35:52 +0100 Subject: [PATCH 287/488] Emulate zsh in zlewidgets instead of static setopt command This way the user can keep their preferred pushd syntax while enabling us to use a standard syntax in our defined functions. To explain further, without a clear value on the PUSHD_MINUS option, we could be changing the +1/-0 values all we want, that some user would find that it didn't work for him. We have two options, then: - Setting a particular value, which was my first approach. - Using `emulate -L zsh` to ensure all options defined in the function's body won't be passed along to the main zsh instance. For more info see: http://zsh.sourceforge.net/Doc/Release/Shell-Builtin-Commands.html#index-emulate --- plugins/dircycle/dircycle.plugin.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/dircycle/dircycle.plugin.zsh b/plugins/dircycle/dircycle.plugin.zsh index 1c4a0175a..12b20ab04 100644 --- a/plugins/dircycle/dircycle.plugin.zsh +++ b/plugins/dircycle/dircycle.plugin.zsh @@ -7,15 +7,20 @@ # NO_PUSHD_MINUS syntax: # pushd +N: start counting from left of `dirs' output # pushd -N: start counting from right of `dirs' output -setopt nopushdminus insert-cycledleft () { + emulate -L zsh + setopt nopushdminus + builtin pushd -q +1 &>/dev/null || true zle reset-prompt } zle -N insert-cycledleft insert-cycledright () { + emulate -L zsh + setopt nopushdminus + builtin pushd -q -0 &>/dev/null || true zle reset-prompt } From 282240bf37d6fd9979da2c3a41006824dbb4e268 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Wed, 24 Dec 2014 01:33:28 +0100 Subject: [PATCH 288/488] Account for iTerm2 sent keys in dircycle plugin --- plugins/dircycle/dircycle.plugin.zsh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/plugins/dircycle/dircycle.plugin.zsh b/plugins/dircycle/dircycle.plugin.zsh index 12b20ab04..1e31105b1 100644 --- a/plugins/dircycle/dircycle.plugin.zsh +++ b/plugins/dircycle/dircycle.plugin.zsh @@ -26,5 +26,12 @@ insert-cycledright () { } zle -N insert-cycledright -bindkey "\e[1;6D" insert-cycledleft -bindkey "\e[1;6C" 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 From 25b1cd687b28cb8d05229130ee5a0e2494276894 Mon Sep 17 00:00:00 2001 From: LFDM <1986gh@gmail.com> Date: Fri, 10 Jan 2014 23:32:20 +0100 Subject: [PATCH 289/488] Brings all directory stuff to directories.zsh - Cleans out aliases.zsh. - Removes unneeded cd function. --- lib/aliases.zsh | 13 ------------- lib/directories.zsh | 38 +++++++++++++++----------------------- 2 files changed, 15 insertions(+), 36 deletions(-) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index aae865046..c67f854a7 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -1,11 +1,3 @@ -# Push and pop directories on directory stack -alias pu='pushd' -alias po='popd' - -# Basic directory operations -alias ...='cd ../..' -alias -- -='cd -' - # Super user alias _='sudo' alias please='sudo' @@ -25,11 +17,6 @@ then else alias history='fc -l 1' fi -# List direcory contents -alias lsa='ls -lah' -alias l='ls -lah' -alias ll='ls -lh' -alias la='ls -lAh' alias afind='ack-grep -il' diff --git a/lib/directories.zsh b/lib/directories.zsh index 02743e0c7..1693d5dd1 100644 --- a/lib/directories.zsh +++ b/lib/directories.zsh @@ -3,12 +3,10 @@ setopt auto_pushd setopt pushd_ignore_dups setopt pushdminus -alias ..='cd ..' -alias cd..='cd ..' -alias cd...='cd ../..' -alias cd....='cd ../../..' -alias cd.....='cd ../../../..' -alias cd/='cd /' +alias -g ...='../..' +alias -g ....='../../..' +alias -g .....='../../../..' +alias -g ......='../../../../..' alias 1='cd -' alias 2='cd -2' @@ -20,23 +18,17 @@ alias 7='cd -7' alias 8='cd -8' alias 9='cd -9' -cd () { - if [[ "x$*" == "x..." ]]; then - cd ../.. - elif [[ "x$*" == "x...." ]]; then - cd ../../.. - elif [[ "x$*" == "x....." ]]; then - cd ../../../.. - elif [[ "x$*" == "x......" ]]; then - cd ../../../../.. - elif [ -d ~/.autoenv ]; then - source ~/.autoenv/activate.sh - autoenv_cd "$@" - else - builtin cd "$@" - fi -} - alias md='mkdir -p' alias rd=rmdir alias d='dirs -v | head -10' + +# List direcory contents +alias lsa='ls -lah' +alias l='ls -la' +alias ll='ls -l' +alias la='ls -lA' +alias sl=ls # often screw this up + +# Push and pop directories on directory stack +alias pu='pushd' +alias po='popd' From ace98846eac9726f7161617291e1fd2affc3f4eb Mon Sep 17 00:00:00 2001 From: LFDM <1986gh@gmail.com> Date: Fri, 10 Jan 2014 23:40:22 +0100 Subject: [PATCH 290/488] Pushes autoenv code to its plugin. Sources the activate.sh file or informs the user, that its not available. Overriding the cd function, as it was formerly done, is not needed anymore, activate.sh does this by itself. --- plugins/autoenv/autoenv.plugin.zsh | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/plugins/autoenv/autoenv.plugin.zsh b/plugins/autoenv/autoenv.plugin.zsh index ca5666979..a8271849e 100644 --- a/plugins/autoenv/autoenv.plugin.zsh +++ b/plugins/autoenv/autoenv.plugin.zsh @@ -1,6 +1,17 @@ +# 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 +fi + # 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. # It only performs an action if the requested virtualenv is not the current one. + use_env() { typeset venv venv="$1" From d33b0aae917c62012bf203538ba86d6236869834 Mon Sep 17 00:00:00 2001 From: LFDM <1986gh@gmail.com> Date: Fri, 10 Jan 2014 23:50:19 +0100 Subject: [PATCH 291/488] Refactors history alias and moves it. More compact case statement instead of the ugly if elif... else statement. Moves it to history.zsh --- lib/aliases.zsh | 14 -------------- lib/history.zsh | 9 +++++++++ 2 files changed, 9 insertions(+), 14 deletions(-) diff --git a/lib/aliases.zsh b/lib/aliases.zsh index c67f854a7..da29fde58 100644 --- a/lib/aliases.zsh +++ b/lib/aliases.zsh @@ -4,19 +4,5 @@ alias please='sudo' #alias g='grep -in' -# Show history -if [ "$HIST_STAMPS" = "mm/dd/yyyy" ] -then - alias history='fc -fl 1' -elif [ "$HIST_STAMPS" = "dd.mm.yyyy" ] -then - alias history='fc -El 1' -elif [ "$HIST_STAMPS" = "yyyy-mm-dd" ] -then - alias history='fc -il 1' -else - alias history='fc -l 1' -fi - alias afind='ack-grep -il' diff --git a/lib/history.zsh b/lib/history.zsh index e78a98e9e..5de71c2d3 100644 --- a/lib/history.zsh +++ b/lib/history.zsh @@ -6,6 +6,15 @@ fi HISTSIZE=10000 SAVEHIST=10000 +# Show history +case $HIST_STAMPS in + "mm/dd/yyyy") alias history='fc -fl 1' ;; + "dd.mm.yyyy") alias history='fc -El 1' ;; + "yyyy-mm-dd") alias history='fc -il 1' ;; + *) alias history='fc -l 1' ;; +esac + +setopt append_history setopt extended_history setopt hist_expire_dups_first setopt hist_ignore_dups # ignore duplication command history list From 101149b1ae6fb5ce0b982289fca901b2feab5439 Mon Sep 17 00:00:00 2001 From: LFDM <1986gh@gmail.com> Date: Fri, 10 Jan 2014 23:53:14 +0100 Subject: [PATCH 292/488] Moves remaining aliases to misc and deletes file. There were only three aliases left in aliases.zsh File deleted! --- lib/aliases.zsh | 8 -------- lib/misc.zsh | 7 +++++++ 2 files changed, 7 insertions(+), 8 deletions(-) delete mode 100644 lib/aliases.zsh diff --git a/lib/aliases.zsh b/lib/aliases.zsh deleted file mode 100644 index da29fde58..000000000 --- a/lib/aliases.zsh +++ /dev/null @@ -1,8 +0,0 @@ -# Super user -alias _='sudo' -alias please='sudo' - -#alias g='grep -in' - -alias afind='ack-grep -il' - diff --git a/lib/misc.zsh b/lib/misc.zsh index a8678b8ec..892d78ef3 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -13,3 +13,10 @@ export PAGER="less" export LESS="-R" export LC_CTYPE=$LANG + +## super user alias +alias _='sudo' +alias please='sudo' + +## more intelligent acking for ubuntu users +alias afind='ack-grep -il' From 83c4e0620689d2410056bddcdfbf8e300673e982 Mon Sep 17 00:00:00 2001 From: LFDM <1986gh@gmail.com> Date: Fri, 10 Jan 2014 23:55:10 +0100 Subject: [PATCH 293/488] Moves a bindkey call from misc to key-bindings. --- lib/key-bindings.zsh | 3 +++ lib/misc.zsh | 3 --- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/key-bindings.zsh b/lib/key-bindings.zsh index 9063c6a18..eb2b58058 100644 --- a/lib/key-bindings.zsh +++ b/lib/key-bindings.zsh @@ -64,6 +64,9 @@ autoload -U edit-command-line zle -N edit-command-line bindkey '\C-x\C-e' edit-command-line +# file rename magick +bindkey "^[m" copy-prev-shell-word + # consider emacs keybindings: #bindkey -e ## emacs key bindings diff --git a/lib/misc.zsh b/lib/misc.zsh index 892d78ef3..ea8a05fcb 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -2,9 +2,6 @@ autoload -U url-quote-magic zle -N self-insert url-quote-magic -## file rename magick -bindkey "^[m" copy-prev-shell-word - ## jobs setopt long_list_jobs From 724143c3297249961977a957d8fa1bc92cd7be2c Mon Sep 17 00:00:00 2001 From: LFDM <1986gh@gmail.com> Date: Sat, 11 Jan 2014 00:04:53 +0100 Subject: [PATCH 294/488] Deletes dot aliases from common-aliases. They are implemented in lib anyway. --- plugins/common-aliases/common-aliases.plugin.zsh | 6 ------ 1 file changed, 6 deletions(-) diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh index 90d59910c..e3830adcf 100644 --- a/plugins/common-aliases/common-aliases.plugin.zsh +++ b/plugins/common-aliases/common-aliases.plugin.zsh @@ -20,12 +20,6 @@ alias sgrep='grep -R -n -H -C 5 --exclude-dir={.git,.svn,CVS} ' alias t='tail -f' -# because typing 'cd' is A LOT of work!! -alias ..='cd ../' -alias ...='cd ../../' -alias ....='cd ../../../' -alias .....='cd ../../../../' - # Command line head / tail shortcuts alias -g H='| head' alias -g T='| tail' From 4b4292a496c139039807f082425cc5507f762c0d Mon Sep 17 00:00:00 2001 From: LFDM <1986gh@gmail.com> Date: Sat, 15 Mar 2014 00:00:14 +0100 Subject: [PATCH 295/488] Fix a typo --- lib/directories.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/directories.zsh b/lib/directories.zsh index 1693d5dd1..b7a53ecfe 100644 --- a/lib/directories.zsh +++ b/lib/directories.zsh @@ -22,7 +22,7 @@ alias md='mkdir -p' alias rd=rmdir alias d='dirs -v | head -10' -# List direcory contents +# List directory contents alias lsa='ls -lah' alias l='ls -la' alias ll='ls -l' From 51946eb3ce8021aebe940f879225828d89c12317 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Mon, 9 Feb 2015 20:29:10 +0100 Subject: [PATCH 296/488] Implement deletion of sl alias as per #3055 --- lib/directories.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/directories.zsh b/lib/directories.zsh index b7a53ecfe..1a9698544 100644 --- a/lib/directories.zsh +++ b/lib/directories.zsh @@ -27,7 +27,6 @@ alias lsa='ls -lah' alias l='ls -la' alias ll='ls -l' alias la='ls -lA' -alias sl=ls # often screw this up # Push and pop directories on directory stack alias pu='pushd' From 2193135ebc4ce0778ff6949b448e4526dbd34284 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Mon, 9 Feb 2015 20:43:48 +0100 Subject: [PATCH 297/488] Clean up appearance lib file and redundant `colors` calls in other files --- lib/theme-and-appearance.zsh | 8 +++----- plugins/git-prompt/git-prompt.plugin.zsh | 3 --- plugins/jump/jump.plugin.zsh | 1 - themes/adben.zsh-theme | 15 ++++++--------- themes/apple.zsh-theme | 1 - themes/gnzh.zsh-theme | 3 +-- themes/half-life.zsh-theme | 2 -- themes/jonathan.zsh-theme | 5 +---- themes/kolo.zsh-theme | 2 -- themes/mikeh.zsh-theme | 2 -- themes/simonoff.zsh-theme | 5 +---- themes/steeef.zsh-theme | 2 -- themes/zhann.zsh-theme | 2 -- 13 files changed, 12 insertions(+), 39 deletions(-) diff --git a/lib/theme-and-appearance.zsh b/lib/theme-and-appearance.zsh index 0353f9db4..926303ca4 100644 --- a/lib/theme-and-appearance.zsh +++ b/lib/theme-and-appearance.zsh @@ -1,14 +1,13 @@ # ls colors -autoload colors; colors; +autoload -U colors && colors export LSCOLORS="Gxfxcxdxbxegedabagacad" -#export LS_COLORS # Enable ls colors if [ "$DISABLE_LS_COLORS" != "true" ] then # Find the option for using colors in ls, depending on the version: Linux or BSD if [[ "$(uname -s)" == "NetBSD" ]]; then - # On NetBSD, test if "gls" (GNU ls) is installed (this one supports colors); + # On NetBSD, test if "gls" (GNU ls) is installed (this one supports colors); # otherwise, leave ls as is, because NetBSD's ls doesn't support -G gls --color -d . &>/dev/null 2>&1 && alias ls='gls --color=tty' elif [[ "$(uname -s)" == "OpenBSD" ]]; then @@ -23,7 +22,7 @@ fi #setopt no_beep setopt auto_cd setopt multios -setopt cdablevarS +setopt cdablevars if [[ x$WINDOW != x ]] then @@ -43,4 +42,3 @@ ZSH_THEME_GIT_PROMPT_CLEAN="" # Text to display if the branch is c # Setup the prompt with pretty colors setopt prompt_subst - diff --git a/plugins/git-prompt/git-prompt.plugin.zsh b/plugins/git-prompt/git-prompt.plugin.zsh index 01b8a88d9..d868a5fe1 100644 --- a/plugins/git-prompt/git-prompt.plugin.zsh +++ b/plugins/git-prompt/git-prompt.plugin.zsh @@ -2,9 +2,6 @@ # http://github.com/olivierverdier/zsh-git-prompt # export __GIT_PROMPT_DIR=$ZSH/plugins/git-prompt -# Initialize colors. -autoload -U colors -colors # Allow for functions in the prompt. setopt PROMPT_SUBST diff --git a/plugins/jump/jump.plugin.zsh b/plugins/jump/jump.plugin.zsh index b16814fe4..d082c11e5 100644 --- a/plugins/jump/jump.plugin.zsh +++ b/plugins/jump/jump.plugin.zsh @@ -27,7 +27,6 @@ unmark() { rm -i "$MARKPATH/$1" } -autoload colors marks() { for link in $MARKPATH/*(@); do local markname="$fg[cyan]${link:t}$reset_color" diff --git a/themes/adben.zsh-theme b/themes/adben.zsh-theme index 6869c8a20..212b823a5 100644 --- a/themes/adben.zsh-theme +++ b/themes/adben.zsh-theme @@ -69,17 +69,17 @@ function precmd { #Choose from all databases, regardless of whether they are considered "offensive" fortune -a } - #obtains the tip + #obtains the tip ps1_command_tip () { wget -qO - http://www.commandlinefu.com/commands/random/plaintext | sed 1d | sed '/^$/d' - } + } prompt_header () { if [[ "true" == "$ENABLE_COMMAND_TIP" ]]; then ps1_command_tip else ps1_fortune - fi - } + fi + } PROMPT_HEAD="${RED_START}${PR_YELLOW}$(prompt_header)${PR_RESET}" # set a simple variable to show when in screen if [[ -n "${WINDOW}" ]]; then @@ -99,11 +99,8 @@ prompt_context () { set_prompt () { # required for the prompt setopt prompt_subst - autoload colors zsh/terminfo - if [[ "$terminfo[colors]" -gt 8 ]]; then - colors - fi - + autoload zsh/terminfo + # ######### PROMPT ######### PROMPT='${PROMPT_HEAD} ${RED_START}$(prompt_context) diff --git a/themes/apple.zsh-theme b/themes/apple.zsh-theme index 275341dc6..95e6249fa 100644 --- a/themes/apple.zsh-theme +++ b/themes/apple.zsh-theme @@ -7,7 +7,6 @@ get_git_dirty() { } autoload -Uz vcs_info -autoload -U colors && colors zstyle ':vcs_info:*' check-for-changes true zstyle ':vcs_info:*' unstagedstr '%F{red}*' # display this when there are unstaged changes zstyle ':vcs_info:*' stagedstr '%F{yellow}+' # display this when there are staged changes diff --git a/themes/gnzh.zsh-theme b/themes/gnzh.zsh-theme index 0519fbefb..ab154c1e5 100644 --- a/themes/gnzh.zsh-theme +++ b/themes/gnzh.zsh-theme @@ -2,8 +2,7 @@ # Based on bira theme # load some modules -autoload -U colors zsh/terminfo # Used in the colour alias below -colors +autoload -U zsh/terminfo # Used in the colour alias below setopt prompt_subst # make some aliases for the colours: (could use normal escape sequences too) diff --git a/themes/half-life.zsh-theme b/themes/half-life.zsh-theme index 942affa94..a3c505706 100644 --- a/themes/half-life.zsh-theme +++ b/themes/half-life.zsh-theme @@ -13,8 +13,6 @@ function virtualenv_info { PR_GIT_UPDATE=1 setopt prompt_subst -autoload colors -colors autoload -U add-zsh-hook autoload -Uz vcs_info diff --git a/themes/jonathan.zsh-theme b/themes/jonathan.zsh-theme index bca92970c..2f0e77431 100644 --- a/themes/jonathan.zsh-theme +++ b/themes/jonathan.zsh-theme @@ -44,10 +44,7 @@ setprompt () { ### # See if we can use colors. - autoload colors zsh/terminfo - if [[ "$terminfo[colors]" -ge 8 ]]; then - colors - fi + autoload zsh/terminfo for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE GREY; do eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}' eval PR_LIGHT_$color='%{$fg[${(L)color}]%}' diff --git a/themes/kolo.zsh-theme b/themes/kolo.zsh-theme index e743289c3..51b0af724 100644 --- a/themes/kolo.zsh-theme +++ b/themes/kolo.zsh-theme @@ -1,5 +1,3 @@ -autoload -U colors && colors - autoload -Uz vcs_info zstyle ':vcs_info:*' stagedstr '%F{green}●' diff --git a/themes/mikeh.zsh-theme b/themes/mikeh.zsh-theme index 943f04d38..a95383ba5 100644 --- a/themes/mikeh.zsh-theme +++ b/themes/mikeh.zsh-theme @@ -1,6 +1,4 @@ setopt prompt_subst -autoload colors -colors autoload -U add-zsh-hook autoload -Uz vcs_info diff --git a/themes/simonoff.zsh-theme b/themes/simonoff.zsh-theme index fb4d32e24..63ce4261b 100644 --- a/themes/simonoff.zsh-theme +++ b/themes/simonoff.zsh-theme @@ -63,10 +63,7 @@ setprompt () { ### # See if we can use colors. - autoload colors zsh/terminfo - if [[ "$terminfo[colors]" -ge 8 ]]; then - colors - fi + autoload zsh/terminfo for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do eval PR_$color='%{$terminfo[bold]$fg[${(L)color}]%}' eval PR_LIGHT_$color='%{$fg[${(L)color}]%}' diff --git a/themes/steeef.zsh-theme b/themes/steeef.zsh-theme index e38188d35..13728ca9a 100644 --- a/themes/steeef.zsh-theme +++ b/themes/steeef.zsh-theme @@ -15,8 +15,6 @@ function virtualenv_info { PR_GIT_UPDATE=1 setopt prompt_subst -autoload colors -colors autoload -U add-zsh-hook autoload -Uz vcs_info diff --git a/themes/zhann.zsh-theme b/themes/zhann.zsh-theme index 5c0854730..27597ec6c 100644 --- a/themes/zhann.zsh-theme +++ b/themes/zhann.zsh-theme @@ -1,5 +1,3 @@ -autoload -U colors && colors - autoload -Uz vcs_info zstyle ':vcs_info:*' stagedstr '%F{green}●' From 80d856e1655cc2b2e9d6899bae884631283a8063 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Fri, 26 Dec 2014 22:33:36 +0100 Subject: [PATCH 298/488] Clean up web-search plugin logic to allow easier changes --- plugins/web-search/web-search.plugin.zsh | 55 ++++++++++++------------ 1 file changed, 28 insertions(+), 27 deletions(-) diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index 28559deb9..1e661250a 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -1,42 +1,43 @@ # web_search from terminal function web_search() { - # get the open command - local open_cmd - if [[ "$OSTYPE" = darwin* ]]; then - open_cmd='open' - else - open_cmd='xdg-open' - fi + emulate -L zsh + + # define search engine URLS + typeset -A urls + urls=( + google "https://www.google.com/search?q=" + bing "https://www.bing.com/search?q=" + yahoo "https://www.yahoo.com/search?q=" + duckduckgo "https://www.duckduckgo.com/?q=" + ) + + # define the open command + case "$OSTYPE" in + darwin*) open_cmd="open" ;; + linux*) open_cmd="xdg-open" ;; + *) echo "Platform $OSTYPE not supported" + return 1 + ;; + esac # check whether the search engine is supported - if [[ ! $1 =~ '(google|bing|yahoo|duckduckgo)' ]]; - then + if [[ -z "$urls[$1]" ]]; then echo "Search engine $1 not supported." return 1 fi - local url="http://www.$1.com" - - # no keyword provided, simply open the search engine homepage - if [[ $# -le 1 ]]; then - $open_cmd "$url" - return - fi - if [[ $1 == 'duckduckgo' ]]; then - #slightly different search syntax for DDG - url="${url}/?q=" + # search or go to main page depending on number of arguments passed + if [[ $# -gt 1 ]]; then + # build search url: + # join arguments passed with '+', then append to search engine URL + url="${urls[$1]}${(j:+:)@[2,-1]}" else - url="${url}/search?q=" + # build main page url: + # split by '/', then rejoin protocol (1) and domain (2) parts with '//' + url="${(j://:)${(s:/:)urls[$1]}[1,2]}" fi - shift # shift out $1 - while [[ $# -gt 0 ]]; do - url="${url}$1+" - shift - done - - url="${url%?}" # remove the last '+' nohup $open_cmd "$url" >/dev/null 2&>1 } From 80ba54a94fe7d7628d159823d5c63e12811c68b0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Sat, 27 Dec 2014 02:27:24 +0100 Subject: [PATCH 299/488] Add Yandex support to web-search plugin --- plugins/web-search/web-search.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index 1e661250a..5e3c00d3c 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -10,6 +10,7 @@ function web_search() { bing "https://www.bing.com/search?q=" yahoo "https://www.yahoo.com/search?q=" duckduckgo "https://www.duckduckgo.com/?q=" + yandex "http://yandex.ru/yandsearch?text=" ) # define the open command @@ -46,6 +47,8 @@ alias bing='web_search bing' alias google='web_search google' alias yahoo='web_search yahoo' alias ddg='web_search duckduckgo' +alias yandex='web_search yandex' + #add your own !bang searches here alias wiki='web_search duckduckgo \!w' alias news='web_search duckduckgo \!n' From adaea31ca013054094a45b009ab22382c4d94666 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Sat, 27 Dec 2014 02:30:16 +0100 Subject: [PATCH 300/488] Silence nohup output in web-search plugin --- plugins/web-search/web-search.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index 5e3c00d3c..19f9cad33 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -39,7 +39,7 @@ function web_search() { url="${(j://:)${(s:/:)urls[$1]}[1,2]}" fi - nohup $open_cmd "$url" >/dev/null 2&>1 + nohup $open_cmd "$url" &>/dev/null } From c45885093fd8fa3375286ef1dcba9bc296e08a80 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Sat, 27 Dec 2014 02:56:30 +0100 Subject: [PATCH 301/488] Add support for cygwin open in web-search plugin --- plugins/web-search/web-search.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index 19f9cad33..52d03b2d0 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -16,6 +16,7 @@ function web_search() { # 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 From e8daf8150e923bfd30769e9a55c15daec523996b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Sat, 27 Dec 2014 03:15:56 +0100 Subject: [PATCH 302/488] Fix yahoo search URL in web-search plugin --- plugins/web-search/web-search.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index 52d03b2d0..b0a4a2926 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -8,7 +8,7 @@ function web_search() { urls=( google "https://www.google.com/search?q=" bing "https://www.bing.com/search?q=" - yahoo "https://www.yahoo.com/search?q=" + yahoo "https://search.yahoo.com/search?p=" duckduckgo "https://www.duckduckgo.com/?q=" yandex "http://yandex.ru/yandsearch?text=" ) From 02d75684f3ddd2dcd181c9265545d5639d09bd5a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Sun, 4 Jan 2015 01:40:25 +0100 Subject: [PATCH 303/488] Force using https in Yandex search engine --- plugins/web-search/web-search.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index b0a4a2926..572427b0b 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -10,7 +10,7 @@ function web_search() { bing "https://www.bing.com/search?q=" yahoo "https://search.yahoo.com/search?p=" duckduckgo "https://www.duckduckgo.com/?q=" - yandex "http://yandex.ru/yandsearch?text=" + yandex "https://yandex.ru/yandsearch?text=" ) # define the open command From 0cc3afe27788e35d5f72236f41a7e4514c11491d Mon Sep 17 00:00:00 2001 From: Julien Pepy <komuta@gmail.com> Date: Fri, 5 Dec 2014 09:57:59 +0100 Subject: [PATCH 304/488] Fix get command list for recent composer versions --- plugins/composer/composer.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh index 86f2ca4df..f75119c4a 100644 --- a/plugins/composer/composer.plugin.zsh +++ b/plugins/composer/composer.plugin.zsh @@ -7,7 +7,7 @@ # Composer basic command completion _composer_get_command_list () { - composer --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }' + composer --no-ansi | sed "1,/Available commands/d" | awk '/^\s*[a-z]+/ { print $1 }' } _composer_get_required_list () { From 5f4e8e57da117b5fc2325ea411aafc66053b8570 Mon Sep 17 00:00:00 2001 From: Andrey Janzen <andrey@janzen.su> Date: Fri, 26 Jul 2013 00:37:11 +0700 Subject: [PATCH 305/488] Allow completion for 'composer.phar', not only 'composer' Use $_comp_command1 for command list generation instead of 'composer': `$_comp_command1` contains the command written in the command line. This allows us to have a different composer name --- plugins/composer/composer.plugin.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh index f75119c4a..324bc64a0 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 () { - composer --no-ansi | sed "1,/Available commands/d" | awk '/^\s*[a-z]+/ { print $1 }' + $_comp_command1 --no-ansi | sed "1,/Available commands/d" | awk '/^\s*[a-z]+/ { print $1 }' } _composer_get_required_list () { - composer show -s --no-ansi | sed '1,/requires/d' | awk 'NF > 0 && !/^requires \(dev\)/{ print $1 }' + $_comp_command1 show -s --no-ansi | sed '1,/requires/d' | awk 'NF > 0 && !/^requires \(dev\)/{ print $1 }' } _composer () { @@ -35,6 +35,7 @@ _composer () { } compdef _composer composer +compdef _composer composer.phar # Aliases alias c='composer' From ef220f0928269f3cdb613db3d3f9ba7775317109 Mon Sep 17 00:00:00 2001 From: Maxime Fabre <ehtnam6@gmail.com> Date: Sat, 17 Aug 2013 17:11:21 +0200 Subject: [PATCH 306/488] Add aliases for composer global --- plugins/composer/composer.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh index 324bc64a0..97207242a 100644 --- a/plugins/composer/composer.plugin.zsh +++ b/plugins/composer/composer.plugin.zsh @@ -41,9 +41,12 @@ compdef _composer composer.phar alias c='composer' alias csu='composer self-update' alias cu='composer update' +alias cr='composer require' alias ci='composer install' alias ccp='composer create-project' alias cdu='composer dump-autoload' +alias cgu='composer global update' +alias cgr='composer global require' # install composer in the current directory alias cget='curl -s https://getcomposer.org/installer | php' From 6fb866183d84e53fa009853691e5c0bdd101820b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Sun, 4 Jan 2015 22:24:55 +0100 Subject: [PATCH 307/488] Remove composer.json file requirement This is because we can't be sure which arguments require a json file and which don't, so the `else' statement will always be difficult to check for correctness. --- plugins/composer/composer.plugin.zsh | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh index 97207242a..7f70e3d72 100644 --- a/plugins/composer/composer.plugin.zsh +++ b/plugins/composer/composer.plugin.zsh @@ -20,18 +20,15 @@ _composer () { _arguments \ '1: :->command'\ '*: :->args' - if [ -f composer.json ]; then - case $state in - command) - compadd `_composer_get_command_list` - ;; - *) - compadd `_composer_get_required_list` - ;; - esac - else - compadd create-project init search selfupdate show - fi + + case $state in + command) + compadd $(_composer_get_command_list) + ;; + *) + compadd $(_composer_get_required_list) + ;; + esac } compdef _composer composer From c3940cf44a58393906e896decc93542c3ab17f4a Mon Sep 17 00:00:00 2001 From: Martin Schrodi <martin.schrodi@retarus.de> Date: Fri, 14 Mar 2014 11:52:40 +0100 Subject: [PATCH 308/488] Fixed breakage in new git repo without commits --- themes/rkj-repos.zsh-theme | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/themes/rkj-repos.zsh-theme b/themes/rkj-repos.zsh-theme index eed084f15..0a9f83d36 100644 --- a/themes/rkj-repos.zsh-theme +++ b/themes/rkj-repos.zsh-theme @@ -19,7 +19,8 @@ ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%}✈" function mygit() { ref1=$(git symbolic-ref HEAD 2> /dev/null) || return - ref2=$(git rev-parse HEAD | head -c 6) || return + gitdir=$(git rev-parse --git-dir 2> /dev/null) || return + heads=($gitdir/refs/heads/*(N)) ; [[ -z $heads ]] && ref2="" || ref2=$(git rev-parse HEAD | head -c 6) ref="$ref1 %{$fg[grey]%}$ref2" #ref=$(git symbolic-ref HEAD 2> /dev/null) $(git rev-parse HEAD | head -c 6) || return echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$( git_prompt_status )%{$reset_color%}$ZSH_THEME_GIT_PROMPT_SUFFIX " From f04246aa4820031c025ed25baf0df23d786d38fd Mon Sep 17 00:00:00 2001 From: Martin Schrodi <pfault@f4n.de> Date: Sat, 19 Apr 2014 03:04:58 +0200 Subject: [PATCH 309/488] rkj-repos: code cleanup and updated with functions from lib/git.zsh (thx mcornella) --- themes/rkj-repos.zsh-theme | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/themes/rkj-repos.zsh-theme b/themes/rkj-repos.zsh-theme index 0a9f83d36..8585e66be 100644 --- a/themes/rkj-repos.zsh-theme +++ b/themes/rkj-repos.zsh-theme @@ -16,14 +16,15 @@ ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%}✗" ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%}➦" ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%}✂" ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%}✈" +ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$fg[grey]%}" +ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$reset_color%}" function mygit() { - ref1=$(git symbolic-ref HEAD 2> /dev/null) || return - gitdir=$(git rev-parse --git-dir 2> /dev/null) || return - heads=($gitdir/refs/heads/*(N)) ; [[ -z $heads ]] && ref2="" || ref2=$(git rev-parse HEAD | head -c 6) - ref="$ref1 %{$fg[grey]%}$ref2" - #ref=$(git symbolic-ref HEAD 2> /dev/null) $(git rev-parse HEAD | head -c 6) || return - echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$( git_prompt_status )%{$reset_color%}$ZSH_THEME_GIT_PROMPT_SUFFIX " + if [[ "$(git config --get oh-my-zsh.hide-status)" != "1" ]]; then + ref=$(command git symbolic-ref HEAD 2> /dev/null) || \ + ref=$(command git rev-parse --short HEAD 2> /dev/null) || return + echo "$ZSH_THEME_GIT_PROMPT_PREFIX${ref#refs/heads/}$(git_prompt_short_sha)$( git_prompt_status )%{$reset_color%}$ZSH_THEME_GIT_PROMPT_SUFFIX " + fi } function retcode() {} From 4fc6dccb4286828c7cd53d3612ec69b0c0d9aaf2 Mon Sep 17 00:00:00 2001 From: Andrew Janke <janke@pobox.com> Date: Sat, 20 Dec 2014 02:24:26 -0500 Subject: [PATCH 310/488] term: Move DISABLE_AUTO_TITLE check to hooks Move the DISABLE_AUTO_TITLE check from title() to the preX hook functions that call it, to allow the title() function to be used directly by user or other callers. --- lib/termsupport.zsh | 24 ++++++++++++++++++++---- 1 file changed, 20 insertions(+), 4 deletions(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index bd0cf6ffe..2fa61c431 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -1,8 +1,16 @@ -#usage: title short_tab_title looooooooooooooooooooooggggggg_windows_title -#http://www.faqs.org/docs/Linux-mini/Xterm-Title.html#ss3.1 -#Fully support screen, iterm, and probably most modern xterm and rxvt +# Set terminal window and tab/icon title +# +# usage: title short_tab_title [long_window_title] +# +# See: http://www.faqs.org/docs/Linux-mini/Xterm-Title.html#ss3.1 +# Fully supports screen, iterm, and probably most modern xterm and rxvt +# (In screen, only short_tab_title is used) +# Limited support for Apple Terminal (Terminal can't set window and tab separately) function title { - if [[ "$DISABLE_AUTO_TITLE" == "true" ]] || [[ "$EMACS" == *term* ]]; then + if [[ $2 == "" ]]; then + 2="$1" + fi + if [[ "$EMACS" == *term* ]]; then return fi if [[ "$TERM" == screen* ]]; then @@ -18,6 +26,10 @@ ZSH_THEME_TERM_TITLE_IDLE="%n@%m: %~" # Runs before showing the prompt function omz_termsupport_precmd { + if [[ $DISABLE_AUTO_TITLE == true ]]; then + return + fi + title $ZSH_THEME_TERM_TAB_TITLE_IDLE $ZSH_THEME_TERM_TITLE_IDLE # Notify Terminal.app of current directory using undocumented OSC sequence @@ -30,6 +42,10 @@ function omz_termsupport_precmd { # Runs before executing the command function omz_termsupport_preexec { + if [[ $DISABLE_AUTO_TITLE == true ]]; then + return + fi + emulate -L zsh setopt extended_glob From b7e5dd35efb0750634eb16b7040337ce80f67684 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Tue, 10 Feb 2015 19:43:25 +0100 Subject: [PATCH 311/488] Quick-fix code style --- lib/termsupport.zsh | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 2fa61c431..f21b0b041 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -7,12 +7,12 @@ # (In screen, only short_tab_title is used) # Limited support for Apple Terminal (Terminal can't set window and tab separately) function title { - if [[ $2 == "" ]]; then - 2="$1" - fi - if [[ "$EMACS" == *term* ]]; then - return - fi + [[ "$EMACS" == *term* ]] && return + + # if $2 is unset use $1 as default + # if it is set and empty, leave it as is + : ${2=$1} + if [[ "$TERM" == screen* ]]; then print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars elif [[ "$TERM" == xterm* ]] || [[ $TERM == rxvt* ]] || [[ $TERM == ansi ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then From 2e41d06b7655067272cee1e54d2d66693136a90f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Tue, 10 Feb 2015 19:53:40 +0100 Subject: [PATCH 312/488] Use quoted $TERM value everywhere --- lib/termsupport.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index f21b0b041..58c6203a0 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -15,7 +15,7 @@ function title { if [[ "$TERM" == screen* ]]; then print -Pn "\ek$1:q\e\\" #set screen hardstatus, usually truncated at 20 chars - elif [[ "$TERM" == xterm* ]] || [[ $TERM == rxvt* ]] || [[ $TERM == ansi ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then + elif [[ "$TERM" == xterm* ]] || [[ "$TERM" == rxvt* ]] || [[ "$TERM" == ansi ]] || [[ "$TERM_PROGRAM" == "iTerm.app" ]]; then print -Pn "\e]2;$2:q\a" #set window name print -Pn "\e]1;$1:q\a" #set icon (=tab) name fi From 4161aa4f9de45233bdee7073933498422a50d213 Mon Sep 17 00:00:00 2001 From: Brandon Sandrowicz <brandon@sandrowicz.org> Date: Tue, 20 May 2014 09:41:36 -0400 Subject: [PATCH 313/488] Fixing virtualenvwrapper plugin for Ubuntu (and Debian) Ubuntu and Debian store the system-installed virtualenvwrapper in /etc/bash_completion.d/virtualenvwrapper, so that it gets automatically sourced at startup in Bash. By not putting it somewhere in $PATH, they end up excluding others (e.g. Zsh) that might want to use that file. Oops! The virtualenvwrapper plugin should account for this so that Ubuntu (or Debian) users don't end up with this message: zsh virtualenvwrapper plugin: Cannot find virtualenvwrapper.sh. Please install with `pip install virtualenvwrapper`. even when they have a virtualenvwrapper installed to a known location. --- .../virtualenvwrapper/virtualenvwrapper.plugin.zsh | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index 217ab0722..9a0616b72 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -1,12 +1,19 @@ virtualenvwrapper='virtualenvwrapper.sh' + if (( $+commands[$virtualenvwrapper] )); then - source ${${virtualenvwrapper}:c} +elif [[ -f "/etc/bash_completion.d/virtualenvwrapper" ]]; then + virtualenvwrapper="/etc/bash_completion.d/virtualenvwrapper" + source "/etc/bash_completion.d/virtualenvwrapper" +else + print "zsh virtualenvwrapper plugin: Cannot find ${virtualenvwrapper}. Please install with \`pip install virtualenvwrapper\`." + return +fi +if type workon 2>&1 >/dev/null; then if [[ "$WORKON_HOME" == "" ]]; then echo "\$WORKON_HOME is not defined so ZSH plugin virtualenvwrapper will not work" else - if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then # Automatically activate Git projects's virtual environments based on the # directory name of the project. Virtual environment name can be overridden @@ -61,5 +68,5 @@ if (( $+commands[$virtualenvwrapper] )); then fi fi else - print "zsh virtualenvwrapper plugin: Cannot find ${virtualenvwrapper}. Please install with \`pip install virtualenvwrapper\`." + print "zsh virtualenvwrapper plugin: shell function 'workon' not defined. Please check ${virtualenvwrapper}." >&2 fi From b62911660d3743d3dfb0116f5b05aabd67a24a06 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Tue, 10 Feb 2015 12:20:24 +0100 Subject: [PATCH 314/488] Organize error checking in virtualenwrapper plugin --- .../virtualenvwrapper.plugin.zsh | 123 +++++++++--------- 1 file changed, 63 insertions(+), 60 deletions(-) diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index 9a0616b72..0ad336917 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -6,67 +6,70 @@ elif [[ -f "/etc/bash_completion.d/virtualenvwrapper" ]]; then virtualenvwrapper="/etc/bash_completion.d/virtualenvwrapper" source "/etc/bash_completion.d/virtualenvwrapper" else - print "zsh virtualenvwrapper plugin: Cannot find ${virtualenvwrapper}. Please install with \`pip install virtualenvwrapper\`." + print "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"\ + "Please check ${virtualenvwrapper}" >&2 return fi -if type workon 2>&1 >/dev/null; then - if [[ "$WORKON_HOME" == "" ]]; then - echo "\$WORKON_HOME is not defined so ZSH plugin virtualenvwrapper will not work" - else - if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then - # Automatically activate Git projects's virtual environments 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 - function workon_cwd { - if [ ! $WORKON_CWD ]; then - WORKON_CWD=1 - # Check if this is a Git repo - PROJECT_ROOT=`git rev-parse --show-toplevel 2> /dev/null` - if (( $? != 0 )); then - PROJECT_ROOT="." - fi - # Check for virtualenv name override - if [[ -f "$PROJECT_ROOT/.venv" ]]; then - 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"` - else - ENV_NAME="" - fi - if [[ "$ENV_NAME" != "" ]]; then - # Activate the environment only if it is not already active - if [[ "$VIRTUAL_ENV" != "$WORKON_HOME/$ENV_NAME" ]]; then - if [[ -e "$WORKON_HOME/$ENV_NAME/bin/activate" ]]; then - workon "$ENV_NAME" && export CD_VIRTUAL_ENV="$ENV_NAME" - elif [[ -e "$ENV_NAME/bin/activate" ]]; then - source $ENV_NAME/bin/activate && export CD_VIRTUAL_ENV="$ENV_NAME" - fi - fi - elif [[ -n $CD_VIRTUAL_ENV && -n $VIRTUAL_ENV ]]; then - # We've just left the repo, deactivate the environment - # Note: this only happens if the virtualenv was activated automatically - deactivate && unset CD_VIRTUAL_ENV - fi - unset PROJECT_ROOT - unset WORKON_CWD - fi - } - - # Append workon_cwd to the chpwd_functions array, so it will be called on cd - # http://zsh.sourceforge.net/Doc/Release/Functions.html - # TODO: replace with 'add-zsh-hook chpwd workon_cwd' when oh-my-zsh min version is raised above 4.3.4 - if (( ${+chpwd_functions} )); then - if (( $chpwd_functions[(I)workon_cwd] == 0 )); then - set -A chpwd_functions $chpwd_functions workon_cwd - fi - else - set -A chpwd_functions workon_cwd - fi - fi - fi -else - print "zsh virtualenvwrapper plugin: shell function 'workon' not defined. Please check ${virtualenvwrapper}." >&2 +if [[ "$WORKON_HOME" == "" ]]; then + print "\$WORKON_HOME is not defined so ZSH 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 + # 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 + function workon_cwd { + if [ ! $WORKON_CWD ]; then + WORKON_CWD=1 + # Check if this is a Git repo + PROJECT_ROOT=`git rev-parse --show-toplevel 2> /dev/null` + if (( $? != 0 )); then + PROJECT_ROOT="." + fi + # Check for virtualenv name override + if [[ -f "$PROJECT_ROOT/.venv" ]]; then + 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"` + else + ENV_NAME="" + fi + if [[ "$ENV_NAME" != "" ]]; then + # Activate the environment only if it is not already active + if [[ "$VIRTUAL_ENV" != "$WORKON_HOME/$ENV_NAME" ]]; then + if [[ -e "$WORKON_HOME/$ENV_NAME/bin/activate" ]]; then + workon "$ENV_NAME" && export CD_VIRTUAL_ENV="$ENV_NAME" + elif [[ -e "$ENV_NAME/bin/activate" ]]; then + source $ENV_NAME/bin/activate && export CD_VIRTUAL_ENV="$ENV_NAME" + fi + fi + elif [[ -n $CD_VIRTUAL_ENV && -n $VIRTUAL_ENV ]]; then + # We've just left the repo, deactivate the environment + # Note: this only happens if the virtualenv was activated automatically + deactivate && unset CD_VIRTUAL_ENV + fi + unset PROJECT_ROOT + unset WORKON_CWD + fi + } + + # Append workon_cwd to the chpwd_functions array, so it will be called on cd + # http://zsh.sourceforge.net/Doc/Release/Functions.html + # TODO: replace with 'add-zsh-hook chpwd workon_cwd' when oh-my-zsh min version is raised above 4.3.4 + if (( ${+chpwd_functions} )); then + if (( $chpwd_functions[(I)workon_cwd] == 0 )); then + set -A chpwd_functions $chpwd_functions workon_cwd + fi + else + set -A chpwd_functions workon_cwd + fi fi From 732c7b8070a75ac5ad5384b4d22d19f499e8424f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Tue, 10 Feb 2015 12:24:05 +0100 Subject: [PATCH 315/488] Simplify adding workon_cwd to chpwd hook --- plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index 0ad336917..5faa1a823 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -64,12 +64,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then # Append workon_cwd to the chpwd_functions array, so it will be called on cd # http://zsh.sourceforge.net/Doc/Release/Functions.html - # TODO: replace with 'add-zsh-hook chpwd workon_cwd' when oh-my-zsh min version is raised above 4.3.4 - if (( ${+chpwd_functions} )); then - if (( $chpwd_functions[(I)workon_cwd] == 0 )); then - set -A chpwd_functions $chpwd_functions workon_cwd - fi - else - set -A chpwd_functions workon_cwd + if ! (( $chpwd_functions[(I)workon_cwd] )); then + chpwd_functions+=(workon_cwd) fi fi From 448e966129bb5c08c7b2da4636491f0f890cf0ab Mon Sep 17 00:00:00 2001 From: frozen_dude <frozendude@gmail.com> Date: Mon, 29 Jul 2013 20:04:23 +0200 Subject: [PATCH 316/488] Fix for bad LC_CTYPE entry LANG is a colon-separated list of prefered locales; LC_CTYPE is single entry, therefore we need to remove all but one entry. Also, there is no need setting it if it is already set (LC_ALL also sets LC_CTYPE, so we check it too). --- lib/misc.zsh | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/lib/misc.zsh b/lib/misc.zsh index ea8a05fcb..6987c099c 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -9,11 +9,21 @@ setopt long_list_jobs export PAGER="less" export LESS="-R" -export LC_CTYPE=$LANG - ## super user alias alias _='sudo' alias please='sudo' ## more intelligent acking for ubuntu users alias afind='ack-grep -il' + +## how to interpret text characters +if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then # only define if undefined + export LC_CTYPE=${LANG%%:*} # pick the first entry from LANG + [[ -z "$LC_CTYPE" ]] && \ + export LC_CTYPE=`locale -a | grep en_US.utf8 | head -1` + [[ -z "$LC_CTYPE" ]] && \ + export LC_CTYPE=`locale -a | grep en_US | head -1` + [[ -z "$LC_CTYPE" ]] && \ + export LC_CTYPE=C # default to internal encoding. +fi + From 0edf416bea1a180e82a8f5f96444d74fabb5867f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Mon, 9 Feb 2015 18:57:23 +0100 Subject: [PATCH 317/488] Temporarily delete over-engineered solution --- lib/misc.zsh | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/lib/misc.zsh b/lib/misc.zsh index 6987c099c..0b7cb2696 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -16,14 +16,7 @@ alias please='sudo' ## more intelligent acking for ubuntu users alias afind='ack-grep -il' -## how to interpret text characters -if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then # only define if undefined - export LC_CTYPE=${LANG%%:*} # pick the first entry from LANG - [[ -z "$LC_CTYPE" ]] && \ - export LC_CTYPE=`locale -a | grep en_US.utf8 | head -1` - [[ -z "$LC_CTYPE" ]] && \ - export LC_CTYPE=`locale -a | grep en_US | head -1` - [[ -z "$LC_CTYPE" ]] && \ - export LC_CTYPE=C # default to internal encoding. +# only define LC_CTYPE if undefined +if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then + export LC_CTYPE=${LANG%%:*} # pick the first entry from LANG fi - From 3ba10ad0a2ed85c26e096126a7899a401cf8f9e7 Mon Sep 17 00:00:00 2001 From: Ashley Valent <avalent@atlassian.com> Date: Wed, 11 Feb 2015 11:19:42 +1100 Subject: [PATCH 318/488] Added cab autocompletion to the cabal plugin. cab is a wrapper for ghc-pkg and cabal that provides some nice features like listing outdated packages. See https://hackage.haskell.org/package/cab for more details on the cab program. --- plugins/cabal/cabal.plugin.zsh | 40 ++++++++++++++++++++++++++++++++++ 1 file changed, 40 insertions(+) diff --git a/plugins/cabal/cabal.plugin.zsh b/plugins/cabal/cabal.plugin.zsh index 9f76add7a..cf7d2cf5e 100644 --- a/plugins/cabal/cabal.plugin.zsh +++ b/plugins/cabal/cabal.plugin.zsh @@ -45,3 +45,43 @@ function _cabal_commands() { } compdef _cabal_commands cabal + +function _cab_commands() { + local ret=1 state + _arguments ':subcommand:->subcommand' && ret=0 + + case $state in + subcommand) + subcommands=( + "sync:Fetch the latest package index" + "install:Install packages" + "uninstall:Uninstall packages" + "installed:List installed packages" + "configure:Configure a cabal package" + "build:Build a cabal package" + "clean:Clean up a build directory" + "outdated:Display outdated packages" + "info:Display information of a package" + "sdist:Make tar.gz for source distribution" + "upload:Uploading tar.gz to HackageDB" + "get:Untar a package in the current directory" + "deps:Show dependencies of this package" + "revdeps:Show reverse dependencies of this package" + "check:Check consistency of packages" + "genpaths:Generate Paths_<pkg>.hs" + "search:Search available packages by package name" + "add:Add a source directory" + "test:Run tests" + "bench:Run benchmarks" + "doc:Generate manuals" + "ghci:Run GHCi (with a sandbox)" + "init:Initialize a sandbox" + "help:Display the help message of the command" + ) + _describe -t subcommands 'cab subcommands' subcommands && ret=0 + esac + + return ret +} + +command -v cab >/dev/null 2>&1 && { compdef _cab_commands cab } From f1d12c598b936a54fa1fb5b9a2b8abc4b58bbc85 Mon Sep 17 00:00:00 2001 From: Neal <neal@ineal.me> Date: Fri, 5 Jul 2013 08:48:46 -0500 Subject: [PATCH 319/488] Add .ipsw to the extract plugin. --- plugins/extract/_extract | 2 +- plugins/extract/extract.plugin.zsh | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) 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..690126ba6 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) 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 : $? )) From 6967393fe6dacc45f5339e0cfacbabe41f8882fb Mon Sep 17 00:00:00 2001 From: James Womack <jwomack@netflix.com> Date: Thu, 12 Feb 2015 23:19:43 -0800 Subject: [PATCH 320/488] Add convenience aliases for installation of npm modules --- plugins/npm/npm.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/npm/npm.plugin.zsh b/plugins/npm/npm.plugin.zsh index c3eb91d31..d19079b3f 100644 --- a/plugins/npm/npm.plugin.zsh +++ b/plugins/npm/npm.plugin.zsh @@ -1 +1,7 @@ eval "$(npm completion 2>/dev/null)" + +# Install and save to dependencies +alias npms="npm i -S " + +# Install and save to dev-dependencies +alias npmd="npm i -D " From 68955f17ad5fe1cc4461868b2b2d059976d43dfb Mon Sep 17 00:00:00 2001 From: ctroncoso <schmickcl@gmail.com> Date: Fri, 13 Feb 2015 09:49:54 -0300 Subject: [PATCH 321/488] docker containers based on defined names docker container autocomplete listing uses containers ID instead of names. Most users identify their containers by name. ID is only needed and used on a dynamic environment more suited in scripts. --- plugins/docker/_docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/docker/_docker b/plugins/docker/_docker index 880b6faa6..14bad1e7e 100644 --- a/plugins/docker/_docker +++ b/plugins/docker/_docker @@ -11,7 +11,7 @@ # Output a selectable list of all running docker containers __docker_containers() { declare -a cont_cmd - cont_cmd=($(docker ps | awk 'NR>1{print $1":[CON("$1")"$2"("$3")]"}')) + cont_cmd=($(docker ps | awk 'NR>1{print $NF":[CON("$1")"$2"("$3")]"}')) _describe 'containers' cont_cmd } From 3704fbb71eb4d886aff11cdaff79a1a23a895cd6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Wed, 11 Feb 2015 19:58:33 +0100 Subject: [PATCH 322/488] Extract CWD notifier back out of auto-title hooks --- lib/termsupport.zsh | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 58c6203a0..e1c2e2f93 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -31,13 +31,6 @@ function omz_termsupport_precmd { fi title $ZSH_THEME_TERM_TAB_TITLE_IDLE $ZSH_THEME_TERM_TITLE_IDLE - - # Notify Terminal.app of current directory using undocumented OSC sequence - # found in OS X 10.9 and 10.10's /etc/bashrc - if [[ $TERM_PROGRAM == Apple_Terminal ]] && [[ -z $INSIDE_EMACS ]]; then - local PWD_URL="file://$HOSTNAME${PWD// /%20}" - printf '\e]7;%s\a' "$PWD_URL" - fi } # Runs before executing the command @@ -58,3 +51,16 @@ function omz_termsupport_preexec { precmd_functions+=(omz_termsupport_precmd) preexec_functions+=(omz_termsupport_preexec) + + +# Runs before showing the prompt, to update the current directory in Terminal.app +function omz_termsupport_cwd { + # Notify Terminal.app of current directory using undocumented OSC sequence + # found in OS X 10.9 and 10.10's /etc/bashrc + if [[ $TERM_PROGRAM == Apple_Terminal ]] && [[ -z $INSIDE_EMACS ]]; then + local PWD_URL="file://$HOSTNAME${PWD// /%20}" + printf '\e]7;%s\a' "$PWD_URL" + fi +} + +precmd_functions+=(omz_termsupport_cwd) From 4b20bfe0ee4c5ae85a926b7c496b34cf9091f5f5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Wed, 11 Feb 2015 20:30:01 +0100 Subject: [PATCH 323/488] Fix first-tab completion in task command This is done by calling `_task` at the end of the _task completion file, as is standard in completion files. --- plugins/taskwarrior/_task | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/taskwarrior/_task b/plugins/taskwarrior/_task index 0bda738bb..5cc253152 100644 --- a/plugins/taskwarrior/_task +++ b/plugins/taskwarrior/_task @@ -246,3 +246,5 @@ _task_default() { return ret } + +_task From 7c00bcdb829fad5e7306358259761037d297fb15 Mon Sep 17 00:00:00 2001 From: Matthias Doering <matthias.doering@mldsc.de> Date: Sat, 14 Feb 2015 10:34:22 -0800 Subject: [PATCH 324/488] Modify theme to optimize the usability, when you use solarized dark as shell color scheme. --- themes/rkj-repos.zsh-theme | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/themes/rkj-repos.zsh-theme b/themes/rkj-repos.zsh-theme index 8585e66be..a3f1f3dfa 100644 --- a/themes/rkj-repos.zsh-theme +++ b/themes/rkj-repos.zsh-theme @@ -15,8 +15,8 @@ ZSH_THEME_GIT_PROMPT_MODIFIED="%{$fg[yellow]%}✱" ZSH_THEME_GIT_PROMPT_DELETED="%{$fg[red]%}✗" ZSH_THEME_GIT_PROMPT_RENAMED="%{$fg[blue]%}➦" ZSH_THEME_GIT_PROMPT_UNMERGED="%{$fg[magenta]%}✂" -ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[grey]%}✈" -ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$fg[grey]%}" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[blue]%}✈" +ZSH_THEME_GIT_PROMPT_SHA_BEFORE=" %{$fg[blue]%}" ZSH_THEME_GIT_PROMPT_SHA_AFTER="%{$reset_color%}" function mygit() { From ec9525b94e938c476c07e68bb479eb848bb5dbc9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Miguel=20Vaello=20Mart=C3=ADnez?= <miguel.vaellomartinez@gmail.com> Date: Sun, 15 Feb 2015 15:39:50 +0100 Subject: [PATCH 325/488] Add initial JHBuild plugin support This is a bunch of alias for the JHBuild tool. A well known tool in the GNOME dev project. --- plugins/jhbuild/README.md | 4 ++++ plugins/jhbuild/jhbuild.plugin.zsh | 28 ++++++++++++++++++++++++++++ 2 files changed, 32 insertions(+) create mode 100644 plugins/jhbuild/README.md create mode 100644 plugins/jhbuild/jhbuild.plugin.zsh diff --git a/plugins/jhbuild/README.md b/plugins/jhbuild/README.md new file mode 100644 index 000000000..910526966 --- /dev/null +++ b/plugins/jhbuild/README.md @@ -0,0 +1,4 @@ +## JHBuild +**Maintainer:** [Miguel Vaello](https://github.com/miguxbe) + +This plugin adds some jhbuild aliases and increase the completion function provided by zsh. diff --git a/plugins/jhbuild/jhbuild.plugin.zsh b/plugins/jhbuild/jhbuild.plugin.zsh new file mode 100644 index 000000000..fed1bc9fc --- /dev/null +++ b/plugins/jhbuild/jhbuild.plugin.zsh @@ -0,0 +1,28 @@ +# Aliases +# +alias jh='jhbuild' +# Build +alias jhb='jhbuild build' +alias jhbo='jhbuild buildone' +# Checks +alias jhckb='jhbuild checkbranches' +alias jhckm='jhbuild checkmodulesets' +# Info & list +alias jhi='jhbuild info' +alias jhl='jhbuild list' +# Clean +alias jhc='jhbuild clean' +alias jhco='jhbuild cleanone' +# Run +alias jhr='jhbuild run' +# Depends +alias jhrd='jhbuild rdepends' +alias jhsd='jhbuild sysdeps' +# Update +alias jhu='jhbuild update' +alias jhuo='jhbuild updateone' +# Uninstall +alias jhun='jhbuild uninstall' + + + From b39dbec7e9d49083be5d9034604f98f1a4d264fd Mon Sep 17 00:00:00 2001 From: Alexandros Giouzenis <alexandrosg@gmail.com> Date: Tue, 3 Feb 2015 18:58:09 +0200 Subject: [PATCH 326/488] Fix tmuxinator completion for symlinked dirs Tmuxinator start command can be ommited Fix #2812 --- plugins/tmuxinator/_tmuxinator | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/plugins/tmuxinator/_tmuxinator b/plugins/tmuxinator/_tmuxinator index e4f8b6ce0..551267ed2 100644 --- a/plugins/tmuxinator/_tmuxinator +++ b/plugins/tmuxinator/_tmuxinator @@ -8,6 +8,8 @@ _arguments -C \ '1: :->cmds' \ '2:: :->args' && ret=0 +_configs=(${$(echo ~/.tmuxinator/*.yml):r:t}) + case $state in cmds) _values "tmuxinator command" \ @@ -21,13 +23,13 @@ case $state in "list[list all existing projects]" \ "doctor[look for problems in your configuration]" \ "help[shows this help document]" \ - "version[shows tmuxinator version number]" + "version[shows tmuxinator version number]" \ + $_configs ret=0 ;; args) case $line[1] in start|open|copy|delete|debug) - _configs=(`find ~/.tmuxinator -name \*.yml | cut -d/ -f5 | sed s:.yml::g`) [[ -n "$_configs" ]] && _values 'configs' $_configs ret=0 ;; From 8cf04ed3d7d5552bc2242a5987d46f6faf0fe2dc Mon Sep 17 00:00:00 2001 From: Alex Talker <alextalker@openmailbox.org> Date: Thu, 15 Jan 2015 04:13:40 +0300 Subject: [PATCH 327/488] Fix echo nothing if $SHORT_HOST doesn't exist. --- themes/candy-kingdom.zsh-theme | 2 +- themes/fino-time.zsh-theme | 2 +- themes/fino.zsh-theme | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/candy-kingdom.zsh-theme b/themes/candy-kingdom.zsh-theme index 889128758..adba1ad39 100644 --- a/themes/candy-kingdom.zsh-theme +++ b/themes/candy-kingdom.zsh-theme @@ -13,7 +13,7 @@ patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset } function box_name { - [ -f ~/.box-name ] && cat ~/.box-name || echo $SHORT_HOST || echo $HOST + [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-HOST} } PROMPT=' diff --git a/themes/fino-time.zsh-theme b/themes/fino-time.zsh-theme index 67b6b6e08..6e7e654ff 100644 --- a/themes/fino-time.zsh-theme +++ b/themes/fino-time.zsh-theme @@ -21,7 +21,7 @@ function prompt_char { } function box_name { - [ -f ~/.box-name ] && cat ~/.box-name || echo $SHORT_HOST || echo $HOST + [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-HOST} } diff --git a/themes/fino.zsh-theme b/themes/fino.zsh-theme index 50d41e899..e4477589e 100644 --- a/themes/fino.zsh-theme +++ b/themes/fino.zsh-theme @@ -17,7 +17,7 @@ function prompt_char { } function box_name { - [ -f ~/.box-name ] && cat ~/.box-name || echo $SHORT_HOST || echo $HOST + [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-HOST} } local ruby_env='' From 2790a5e565ecf1a695c25c7ef0d5aa23f8bb5239 Mon Sep 17 00:00:00 2001 From: Zhiming Wang <zmwangx@gmail.com> Date: Sun, 15 Feb 2015 11:37:28 -0800 Subject: [PATCH 328/488] Bring back -h option to ls variants The -h options in l, ll, and la were lost in 25b1cd6. There's no reason to remove them. --- lib/directories.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/directories.zsh b/lib/directories.zsh index 1a9698544..3bffa9fd9 100644 --- a/lib/directories.zsh +++ b/lib/directories.zsh @@ -24,9 +24,9 @@ alias d='dirs -v | head -10' # List directory contents alias lsa='ls -lah' -alias l='ls -la' -alias ll='ls -l' -alias la='ls -lA' +alias l='ls -lah' +alias ll='ls -lh' +alias la='ls -lAh' # Push and pop directories on directory stack alias pu='pushd' From 7c73a3aea4861a281bc931a064f13a7c7da3b6be Mon Sep 17 00:00:00 2001 From: pi0 <pyapar@gmail.com> Date: Mon, 16 Feb 2015 11:58:54 +0330 Subject: [PATCH 329/488] Laravel 5 support --- plugins/laravel4/laravel4.plugin.zsh | 2 +- plugins/laravel5/laravel5.plugin.zsh | 20 ++++++++++++++++++++ 2 files changed, 21 insertions(+), 1 deletion(-) create mode 100644 plugins/laravel5/laravel5.plugin.zsh diff --git a/plugins/laravel4/laravel4.plugin.zsh b/plugins/laravel4/laravel4.plugin.zsh index 4b1022b66..0edc84970 100644 --- a/plugins/laravel4/laravel4.plugin.zsh +++ b/plugins/laravel4/laravel4.plugin.zsh @@ -1,6 +1,6 @@ # Laravel4 basic command completion _laravel4_get_command_list () { - php artisan --no-ansi | sed "1,/Available commands/d" | awk '/^ [a-z]+/ { print $1 }' + php artisan --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z]+/ { print $1 }' } _laravel4 () { diff --git a/plugins/laravel5/laravel5.plugin.zsh b/plugins/laravel5/laravel5.plugin.zsh new file mode 100644 index 000000000..2afa99317 --- /dev/null +++ b/plugins/laravel5/laravel5.plugin.zsh @@ -0,0 +1,20 @@ +# Laravel5 basic command completion +_laravel5_get_command_list () { + php artisan --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z]+/ { print $1 }' +} + +_laravel5 () { + if [ -f artisan ]; then + compadd `_laravel5_get_command_list` + fi +} + +compdef _laravel5 artisan +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' From cd36deda23a1f6f53ba910077b22c200fb820299 Mon Sep 17 00:00:00 2001 From: Karsten Kosmala <kosmala@cosmocode.de> Date: Mon, 16 Feb 2015 12:04:37 +0100 Subject: [PATCH 330/488] added stats command to docker plugin --- plugins/docker/_docker | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/plugins/docker/_docker b/plugins/docker/_docker index 880b6faa6..df8319ea7 100644 --- a/plugins/docker/_docker +++ b/plugins/docker/_docker @@ -219,6 +219,10 @@ __start() { __docker_containers } +__stats() { + __docker_containers +} + __stop() { _arguments \ '(-t,--time=)'{-t,--time=}'[Number of seconds to wait for the container to stop before killing it.]' @@ -280,6 +284,7 @@ _1st_arguments=( "save":"Save an image to a tar archive" "search":"Search for an image in the docker index" "start":"Start a stopped container" + "stats":"Display a live stream of one or more containers' resource usage statistics" "stop":"Stop a running container" "tag":"Tag an image into a repository" "top":"Lookup the running processes of a container" @@ -351,6 +356,8 @@ case "$words[1]" in __save ;; search) __search ;; + stats) + __stats ;; start) __start ;; stop) From 6ccf67a077e07bc57cdca6980dcdf346cbd2138e Mon Sep 17 00:00:00 2001 From: Andrew Janke <janke@pobox.com> Date: Mon, 16 Feb 2015 10:24:22 -0500 Subject: [PATCH 331/488] Do not put explicit dot in $cdpath, since it causes problems on Cygwin due to an underlying zsh bug. --- lib/completion.zsh | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index ea6139fde..4b1bb0a62 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -34,7 +34,6 @@ fi # disable named-directories autocompletion zstyle ':completion:*:cd:*' tag-order local-directories directory-stack path-directories -cdpath=(.) # Use caching so that commands like apt and dpkg complete are useable zstyle ':completion::complete:*' use-cache 1 From 46e6e2e23a175ee7e571878a18b4fae03c269b69 Mon Sep 17 00:00:00 2001 From: Roderick Randolph <roderickrandolph@users.noreply.github.com> Date: Mon, 16 Feb 2015 12:22:18 -0500 Subject: [PATCH 332/488] Fixes incorrect prompt arrow color Fixes a bug where color of status arrow in prompt is red even when the exit code was zero (or success). This fix correclty returns green arrow on success and red for non-success exit code. --- themes/awesomepanda.zsh-theme | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/themes/awesomepanda.zsh-theme b/themes/awesomepanda.zsh-theme index 411b89837..1c5d06b2d 100644 --- a/themes/awesomepanda.zsh-theme +++ b/themes/awesomepanda.zsh-theme @@ -1,18 +1,16 @@ # the svn plugin has to be activated for this to work. - -PROMPT='%{$fg_bold[red]%}➜ %{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}$(svn_prompt_info)%{$reset_color%}' +local ret_status="%(?:%{$fg_bold[green]%}➜ :%{$fg_bold[red]%}➜ %s)" +PROMPT='${ret_status}%{$fg_bold[green]%}%p %{$fg[cyan]%}%c %{$fg_bold[blue]%}$(git_prompt_info)%{$fg_bold[blue]%}$(svn_prompt_info)%{$reset_color%}' ZSH_THEME_GIT_PROMPT_PREFIX="git:(%{$fg[red]%}" ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[blue]%})%{$fg[yellow]%} ✗ %{$reset_color%}" ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[blue]%}) " - - ZSH_PROMPT_BASE_COLOR="%{$fg_bold[blue]%}" ZSH_THEME_REPO_NAME_COLOR="%{$fg_bold[red]%}" ZSH_THEME_SVN_PROMPT_PREFIX="svn:(" ZSH_THEME_SVN_PROMPT_SUFFIX=")" ZSH_THEME_SVN_PROMPT_DIRTY="%{$fg[red]%} ✘ %{$reset_color%}" -ZSH_THEME_SVN_PROMPT_CLEAN=" " \ No newline at end of file +ZSH_THEME_SVN_PROMPT_CLEAN=" " From 8b5950b812b56a652ce1101f8d4adc569e516160 Mon Sep 17 00:00:00 2001 From: Oleg Voronkovich <oleg-voronkovich@yandex.ru> Date: Sun, 15 Feb 2015 19:12:51 +0300 Subject: [PATCH 333/488] Fix: "\s" is a gawk-specific regexp operator. --- plugins/composer/composer.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/composer/composer.plugin.zsh b/plugins/composer/composer.plugin.zsh index 7f70e3d72..86f5be3d0 100644 --- a/plugins/composer/composer.plugin.zsh +++ b/plugins/composer/composer.plugin.zsh @@ -7,7 +7,7 @@ # Composer basic command completion _composer_get_command_list () { - $_comp_command1 --no-ansi | sed "1,/Available commands/d" | awk '/^\s*[a-z]+/ { print $1 }' + $_comp_command1 --no-ansi | sed "1,/Available commands/d" | awk '/^[ \t]*[a-z]+/ { print $1 }' } _composer_get_required_list () { From 6b29aab37a4984b5f31c4dae3dda1f54860eca51 Mon Sep 17 00:00:00 2001 From: nextgenthemes <nextgenthemes@users.noreply.github.com> Date: Tue, 17 Feb 2015 07:27:38 +0100 Subject: [PATCH 334/488] Create readme.md --- plugins/ubuntu/readme.md | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 plugins/ubuntu/readme.md diff --git a/plugins/ubuntu/readme.md b/plugins/ubuntu/readme.md new file mode 100644 index 000000000..5954ead0e --- /dev/null +++ b/plugins/ubuntu/readme.md @@ -0,0 +1,23 @@ +This plugin was created because the aliases in the debian plugin are inconsistent and hard to remember. Also this apt-priority detaction that switched between apt-get and aptitude was dropped to keep it simpler. This plugin uses apt-get for everything but a few things that are only possible with aptitude I guess. Ubuntu does not have aptitude installed by default. + +The aliases for this plugin are easy to remember because they are consistent (the debian plugin is not). + +acs = **a**pt-**c**ache **s**earch +acp = **a**pt-**c**ache **p**olicy + +ag = sudo **a**pt-**g**et +agi = sudo **a**pt-**g**et **i**nstall +agd = sudo **a**pt-**g**et **d**select-upgrade +By now you already can guess almost all aliases + +There are two exeptions since ... +agu = sudo **a**pt-**g**et **u**pdate - we have ... +agug = sudo **a**pt-**g**et **u**pgrade - as the exeptional 4 letter alias for a single command. + +afs = **a**pt-**f**ile **s**earch --regexp - this has the regexp switch on without being represented in the alias, I guess this makes sense since the debian plugin has it, I never used that command. + +Then there are the 2 other 4 letter aliases for combined commands, that are straight forward and easy to remember. +aguu = sudo **a**pt-**g**et **u**pdate && sudo apt-get **u**pgrade - better then adg or not? +agud = sudo **a**pt-**g**et **u**pdate && sudo apt-get **d**ist-upgrade + +For a full list aliases and the functions just watch the plugins code https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/debian/debian.plugin.zsh, look at the comments if you want to switch from the debian plugin. Ubuntu, Mint and & co users will like the new aar function to install packages from ppas with a single command. From f50b3fe7107d4bb6a9439a4032ac6922b9c0c20b Mon Sep 17 00:00:00 2001 From: nextgenthemes <nextgenthemes@users.noreply.github.com> Date: Tue, 17 Feb 2015 07:33:45 +0100 Subject: [PATCH 335/488] Create ubuntu plugin, based on debian plugin. * Easy to remember aliases * Simplified * Added aar() function for `sudo apt-add-repository xxxx && apt-get upgrade && apt-get install xxxx` --- plugins/ubuntu/ubuntu.plugin.zsh | 141 +++++++++++++++++++++++++++++++ 1 file changed, 141 insertions(+) create mode 100644 plugins/ubuntu/ubuntu.plugin.zsh diff --git a/plugins/ubuntu/ubuntu.plugin.zsh b/plugins/ubuntu/ubuntu.plugin.zsh new file mode 100644 index 000000000..0211d3374 --- /dev/null +++ b/plugins/ubuntu/ubuntu.plugin.zsh @@ -0,0 +1,141 @@ +# Authors: +# https://github.com/AlexBio +# https://github.com/dbb +# https://github.com/Mappleconfusers +# Nicolas Jonas nextgenthemes.com +# +# Debian, Ubuntu and friends related zsh aliases and functions for zsh + +alias acs='apt-cache search' +compdef _acs acs='apt-cache search' + +alias afs='apt-file search --regexp' +compdef _afs afs='apt-file search --regexp' + +# These are apt-get only +alias ags='apt-get source' # asrc +compdef _ags ags='apt-get source' + +alias acp='apt-cache policy' # app +compdef _acp acp='apt-cache policy' + +# superuser operations ###################################################### +alias afu='sudo apt-file update' +compdef _afu afu='sudo apt-file update' + +alias ppap='sudo ppa-purge' +compdef _ppap ppap='sudo ppa-purge' + +alias ag='sudo apt-get' # age - but without sudo +alias aga='sudo apt-get autoclean' # aac +alias agb='sudo apt-get build-dep' # abd +alias agc='sudo apt-get clean' # adc +alias agd='sudo apt-get dselect-upgrade' # ads +alias agi='sudo apt-get install' # ai +alias agp='sudo apt-get purge' # ap +alias agr='sudo apt-get remove' # ar +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 + +compdef _ag ag='sudo apt-get' +compdef _aga aga='sudo apt-get autoclean' +compdef _agb agb='sudo apt-get build-dep' +compdef _agc agc='sudo apt-get clean' +compdef _agd agd='sudo apt-get dselect-upgrade' +compdef _agi agi='sudo apt-get install' +compdef _agp agp='sudo apt-get purge' +compdef _agr agr='sudo apt-get remove' +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' + +# Remove ALL kernel images and headers EXCEPT the one in use +alias kclean='sudo aptitude remove -P ?and(~i~nlinux-(ima|hea) \ + ?not(~n`uname -r`))' + +# Misc. ##################################################################### +# print all installed packages +alias allpkgs='aptitude search -F "%p" --disable-columns ~i' + +# Create a basic .deb package +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 +# 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 + PACKAGE=$2 + else + read "PACKAGE?Type in the package name to install/upgrade with this ppa [${1##*/}]: " + fi + + if [ -z "$PACKAGE" ]; then + PACKAGE=${1##*/} + fi + + sudo apt-add-repository $1 && sudo apt-get update + sudo apt-get install $PACKAGE +} + +# Prints apt history +# Usage: +# apt-history install +# apt-history upgrade +# apt-history remove +# apt-history rollback +# apt-history list +# Based On: http://linuxcommando.blogspot.com/2008/08/how-to-show-apt-log-history.html +apt-history () { + case "$1" in + install) + zgrep --no-filename 'install ' $(ls -rt /var/log/dpkg*) + ;; + upgrade|remove) + zgrep --no-filename $1 $(ls -rt /var/log/dpkg*) + ;; + rollback) + zgrep --no-filename upgrade $(ls -rt /var/log/dpkg*) | \ + grep "$2" -A10000000 | \ + grep "$3" -B10000000 | \ + awk '{print $4"="$5}' + ;; + list) + zcat $(ls -rt /var/log/dpkg*) + ;; + *) + echo "Parameters:" + echo " install - Lists all packages that have been installed." + echo " upgrade - Lists all packages that have been upgraded." + echo " remove - Lists all packages that have been removed." + echo " rollback - Lists rollback information." + echo " list - Lists all contains of dpkg logs." + ;; + esac +} + +# Kernel-package building shortcut +kerndeb () { + # temporarily unset MAKEFLAGS ( '-j3' will fail ) + MAKEFLAGS=$( print - $MAKEFLAGS | perl -pe 's/-j\s*[\d]+//g' ) + print '$MAKEFLAGS set to '"'$MAKEFLAGS'" + appendage='-custom' # this shows up in $ (uname -r ) + revision=$(date +"%Y%m%d") # this shows up in the .deb file name + + make-kpkg clean + + time fakeroot make-kpkg --append-to-version "$appendage" --revision \ + "$revision" kernel_image kernel_headers +} + +# List packages by size +function apt-list-packages { + dpkg-query -W --showformat='${Installed-Size} ${Package} ${Status}\n' | \ + grep -v deinstall | \ + sort -n | \ + awk '{print $1" "$2}' +} From 3120b9ad458353915f03c1e5df1683b6e0122db2 Mon Sep 17 00:00:00 2001 From: nextgenthemes <nextgenthemes@users.noreply.github.com> Date: Tue, 17 Feb 2015 07:36:23 +0100 Subject: [PATCH 336/488] Update readme.md --- plugins/ubuntu/readme.md | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/plugins/ubuntu/readme.md b/plugins/ubuntu/readme.md index 5954ead0e..c05352f3b 100644 --- a/plugins/ubuntu/readme.md +++ b/plugins/ubuntu/readme.md @@ -1,6 +1,4 @@ -This plugin was created because the aliases in the debian plugin are inconsistent and hard to remember. Also this apt-priority detaction that switched between apt-get and aptitude was dropped to keep it simpler. This plugin uses apt-get for everything but a few things that are only possible with aptitude I guess. Ubuntu does not have aptitude installed by default. - -The aliases for this plugin are easy to remember because they are consistent (the debian plugin is not). +This plugin was created because the aliases in the debian plugin are inconsistent and hard to remember. Also this apt-priority detection that switched between apt-get and aptitude was dropped to keep it simpler. This plugin uses apt-get for everything but a few things that are only possible with aptitude I guess. Ubuntu does not have aptitude installed by default. acs = **a**pt-**c**ache **s**earch acp = **a**pt-**c**ache **p**olicy From 660eeb19c7850fd6c5470b40538426d2dbeccfe6 Mon Sep 17 00:00:00 2001 From: nextgenthemes <nextgenthemes@users.noreply.github.com> Date: Tue, 17 Feb 2015 07:48:01 +0100 Subject: [PATCH 337/488] Update readme.md --- plugins/ubuntu/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ubuntu/readme.md b/plugins/ubuntu/readme.md index c05352f3b..e7e610604 100644 --- a/plugins/ubuntu/readme.md +++ b/plugins/ubuntu/readme.md @@ -10,7 +10,7 @@ By now you already can guess almost all aliases There are two exeptions since ... agu = sudo **a**pt-**g**et **u**pdate - we have ... -agug = sudo **a**pt-**g**et **u**pgrade - as the exeptional 4 letter alias for a single command. +agug = sudo **a**pt-**g**et **u**p**g**rade - as the exeptional 4 letter alias for a single command. afs = **a**pt-**f**ile **s**earch --regexp - this has the regexp switch on without being represented in the alias, I guess this makes sense since the debian plugin has it, I never used that command. From d8b99321383b8d7982506709a07aaa92f5f2d9fc Mon Sep 17 00:00:00 2001 From: nextgenthemes <nextgenthemes@users.noreply.github.com> Date: Tue, 17 Feb 2015 07:49:55 +0100 Subject: [PATCH 338/488] Update readme.md --- plugins/ubuntu/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ubuntu/readme.md b/plugins/ubuntu/readme.md index e7e610604..6366cadca 100644 --- a/plugins/ubuntu/readme.md +++ b/plugins/ubuntu/readme.md @@ -18,4 +18,4 @@ Then there are the 2 other 4 letter aliases for combined commands, that are stra aguu = sudo **a**pt-**g**et **u**pdate && sudo apt-get **u**pgrade - better then adg or not? agud = sudo **a**pt-**g**et **u**pdate && sudo apt-get **d**ist-upgrade -For a full list aliases and the functions just watch the plugins code https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/debian/debian.plugin.zsh, look at the comments if you want to switch from the debian plugin. Ubuntu, Mint and & co users will like the new aar function to install packages from ppas with a single command. +For a full list aliases and the functions just watch the plugins code https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/ubuntu/ubuntu.plugin.zsh, look at the comments if you want to switch from the debian plugin. Ubuntu, Mint and & co users will like the new aar function to install packages from ppas with a single command. From 099246dd9e74f7a2488fe7c51fe8c40502295def Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" <alx741@riseup.net> Date: Wed, 18 Feb 2015 14:25:15 -0500 Subject: [PATCH 339/488] PLUGINS: vi-mode: allow ctrl-p, ctrl-n for history navigation Allow ctrl-p, ctrl-n for history navigation while in insert mode. --- plugins/vi-mode/vi-mode.plugin.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh index f2745b409..45ec22a09 100644 --- a/plugins/vi-mode/vi-mode.plugin.zsh +++ b/plugins/vi-mode/vi-mode.plugin.zsh @@ -34,6 +34,10 @@ bindkey -v autoload -Uz edit-command-line bindkey -M vicmd 'v' edit-command-line +# allow ctrl-p, ctrl-n for navigate history (standard behaviour) +bindkey '^P' up-history +bindkey '^N' down-history + # if mode indicator wasn't setup by theme, define default if [[ "$MODE_INDICATOR" == "" ]]; then MODE_INDICATOR="%{$fg_bold[red]%}<%{$fg[red]%}<<%{$reset_color%}" From 33900dfd328ea21954cc7772af21e5d44ea71f3f Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" <alx741@riseup.net> Date: Wed, 18 Feb 2015 14:29:44 -0500 Subject: [PATCH 340/488] PLUGINS: vi-mode: allow ctrl-h, ctrl-?, ctrl-w for char and word deletion Allow ctrl-h, ctrl-?, ctrl-w after changes in normal mode. --- plugins/vi-mode/vi-mode.plugin.zsh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh index 45ec22a09..1de8bf91a 100644 --- a/plugins/vi-mode/vi-mode.plugin.zsh +++ b/plugins/vi-mode/vi-mode.plugin.zsh @@ -38,6 +38,11 @@ bindkey -M vicmd 'v' edit-command-line bindkey '^P' up-history bindkey '^N' down-history +# allow ctrl-h, ctrl-w, ctrl-? for char and word deletion (standard behaviour) +bindkey '^?' backward-delete-char +bindkey '^h' backward-delete-char +bindkey '^w' backward-kill-word + # if mode indicator wasn't setup by theme, define default if [[ "$MODE_INDICATOR" == "" ]]; then MODE_INDICATOR="%{$fg_bold[red]%}<%{$fg[red]%}<<%{$reset_color%}" From 152a751342d678a90dd8597e512c1d07f72e9477 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Thu, 19 Feb 2015 15:48:29 +0100 Subject: [PATCH 341/488] Revert usage of install.ohmyz.sh URL, until HTTPS support. This reverts commit b6cbba9dfee5985232b473e94595c2fb1ab83715. --- README.textile | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.textile b/README.textile index 09cff2135..d09e6b4bd 100644 --- a/README.textile +++ b/README.textile @@ -18,11 +18,11 @@ You can install this via the command-line with either @curl@ or @wget@. h4. via @curl@: -@curl -L http://install.ohmyz.sh | sh@ +@curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh@ h4. via @wget@: -@wget --no-check-certificate http://install.ohmyz.sh -O - | sh@ +@wget --no-check-certificate https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh@ h4. *Optionally*, change the install directory: From e10470f6a320f37a07a229c65c5c7a9646477992 Mon Sep 17 00:00:00 2001 From: wajdi <w.hawari@gmail.com> Date: Thu, 19 Feb 2015 10:34:51 -0500 Subject: [PATCH 342/488] Adding ssh-config to vagrant plugin autocomplete. Was missing --- plugins/vagrant/_vagrant | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant index 0c82acd42..76f80b0d7 100644 --- a/plugins/vagrant/_vagrant +++ b/plugins/vagrant/_vagrant @@ -113,7 +113,7 @@ case $state in (box) __vagrant-box ;; - (up|provision|package|destroy|reload|ssh|halt|resume|status) + (up|provision|package|destroy|reload|ssh|ssh-config|halt|resume|status) _arguments ':feature:__vm_list' esac ;; From 8ce1245770a0d9a8f738362bbf749e918b48d7e9 Mon Sep 17 00:00:00 2001 From: Craig Paterson <darksavant@gmail.com> Date: Thu, 19 Feb 2015 17:55:32 +0200 Subject: [PATCH 343/488] added the 'mix local.hex' command to plugin completions --- plugins/mix/_mix | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/mix/_mix b/plugins/mix/_mix index 602f5ffa0..b7c982e0a 100644 --- a/plugins/mix/_mix +++ b/plugins/mix/_mix @@ -21,6 +21,7 @@ _1st_arguments=( 'local.install:Install a task or an archive locally' 'local.rebar:Install rebar locally' 'local.uninstall:Uninstall local tasks or archives' + 'local.hex:Install Hex locally' 'new:Creates a new Elixir project' 'run:Run the given file or expression' "test:Run a project's tests" From 393676387a99683f2a5ccf44557d874ffd272d63 Mon Sep 17 00:00:00 2001 From: nextgenthemes <nextgenthemes@users.noreply.github.com> Date: Thu, 19 Feb 2015 19:37:54 +0100 Subject: [PATCH 344/488] Markdown bolds to capital letters --- plugins/ubuntu/readme.md | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) diff --git a/plugins/ubuntu/readme.md b/plugins/ubuntu/readme.md index 6366cadca..17c805a44 100644 --- a/plugins/ubuntu/readme.md +++ b/plugins/ubuntu/readme.md @@ -1,21 +1,21 @@ This plugin was created because the aliases in the debian plugin are inconsistent and hard to remember. Also this apt-priority detection that switched between apt-get and aptitude was dropped to keep it simpler. This plugin uses apt-get for everything but a few things that are only possible with aptitude I guess. Ubuntu does not have aptitude installed by default. -acs = **a**pt-**c**ache **s**earch -acp = **a**pt-**c**ache **p**olicy +acs = Apt-Cache Search +acp = Apt-Cache Policy -ag = sudo **a**pt-**g**et -agi = sudo **a**pt-**g**et **i**nstall -agd = sudo **a**pt-**g**et **d**select-upgrade +ag = sudo Apt-Get +agi = sudo Apt-Get Install +agd = sudo Apt-Get Dselect-upgrade By now you already can guess almost all aliases There are two exeptions since ... -agu = sudo **a**pt-**g**et **u**pdate - we have ... -agug = sudo **a**pt-**g**et **u**p**g**rade - as the exeptional 4 letter alias for a single command. +agu = sudo Apt-Get Update - we have ... +agug = sudo Apt-Get UpGrade - as the exeptional 4 letter alias for a single command. -afs = **a**pt-**f**ile **s**earch --regexp - this has the regexp switch on without being represented in the alias, I guess this makes sense since the debian plugin has it, I never used that command. +afs = Apt-F*ile Search --regexp - this has the regexp switch on without being represented in the alias, I guess this makes sense since the debian plugin has it, I never used that command. Then there are the 2 other 4 letter aliases for combined commands, that are straight forward and easy to remember. -aguu = sudo **a**pt-**g**et **u**pdate && sudo apt-get **u**pgrade - better then adg or not? -agud = sudo **a**pt-**g**et **u**pdate && sudo apt-get **d**ist-upgrade +aguu = sudo Apt-Get Update && sudo apt-get Upgrade - better then adg or not? +agud = sudo Apt-Get Update && sudo apt-get Dist-upgrade For a full list aliases and the functions just watch the plugins code https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/ubuntu/ubuntu.plugin.zsh, look at the comments if you want to switch from the debian plugin. Ubuntu, Mint and & co users will like the new aar function to install packages from ppas with a single command. From aff01d920e36231c59f3d8c43ffdc8564019b818 Mon Sep 17 00:00:00 2001 From: nextgenthemes <nextgenthemes@users.noreply.github.com> Date: Thu, 19 Feb 2015 19:43:31 +0100 Subject: [PATCH 345/488] Update readme.md --- plugins/ubuntu/readme.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/ubuntu/readme.md b/plugins/ubuntu/readme.md index 17c805a44..c9ef61f4e 100644 --- a/plugins/ubuntu/readme.md +++ b/plugins/ubuntu/readme.md @@ -12,7 +12,7 @@ There are two exeptions since ... agu = sudo Apt-Get Update - we have ... agug = sudo Apt-Get UpGrade - as the exeptional 4 letter alias for a single command. -afs = Apt-F*ile Search --regexp - this has the regexp switch on without being represented in the alias, I guess this makes sense since the debian plugin has it, I never used that command. +afs = Apt-File Search --regexp - this has the regexp switch on without being represented in the alias, I guess this makes sense since the debian plugin has it, I never used that command. Then there are the 2 other 4 letter aliases for combined commands, that are straight forward and easy to remember. aguu = sudo Apt-Get Update && sudo apt-get Upgrade - better then adg or not? From bc8abe5ea26aa031395c754e3e9710dcc62dd0f0 Mon Sep 17 00:00:00 2001 From: Brian Derr <brian@derrclan.com> Date: Thu, 19 Feb 2015 13:30:50 -0800 Subject: [PATCH 346/488] Verify zle is active before trying to reset-prompt. --- plugins/vi-mode/vi-mode.plugin.zsh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh index f2745b409..ac9233290 100644 --- a/plugins/vi-mode/vi-mode.plugin.zsh +++ b/plugins/vi-mode/vi-mode.plugin.zsh @@ -17,8 +17,12 @@ function zle-keymap-select zle-line-init zle-line-finish { # Ensure that the prompt is redrawn when the terminal size changes. TRAPWINCH() { if [[ -o zle ]]; then - zle reset-prompt - zle -R + # Verify that zle is active before trying to reset-prompt. + zle + if [[ $? -eq 0 ]]; then + zle reset-prompt + zle -R + fi fi } From 0a99ca0df0f53e546c9c6ac5240e38f3a2dd2c3b Mon Sep 17 00:00:00 2001 From: Murilo Opsfelder Araujo <mopsfelder@gmail.com> Date: Fri, 20 Feb 2015 15:17:00 -0200 Subject: [PATCH 347/488] plugins: mercurial: Update the order prompt vars are displayed MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If a user sets ZSH_THEME_HG_PROMPT_* as the following, he ends up with %{$reset_color%} resetting the bold style of last character ")" because _SUFFIX was expanded before calling hg_dirty(): ZSH_THEME_HG_PROMPT_PREFIX="%{$fg_bold[blue]%}hg:(%{$fg[white]%}" ZSH_THEME_HG_PROMPT_SUFFIX="%{$reset_color%}" ZSH_THEME_HG_PROMPT_DIRTY="%{$fg[blue]%}) %{$fg[yellow]%}✗%{$reset_color%}" ZSH_THEME_HG_PROMPT_CLEAN="%{$fg[blue]%})" With this patch, the variable ZSH_THEME_HG_PROMPT_SUFFIX is lastly displayed, following the same order as in git_prompt_info(), i.e. <prefix><dirty><suffix>. --- plugins/mercurial/mercurial.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/mercurial/mercurial.plugin.zsh b/plugins/mercurial/mercurial.plugin.zsh index ed4d23713..86200ccf6 100644 --- a/plugins/mercurial/mercurial.plugin.zsh +++ b/plugins/mercurial/mercurial.plugin.zsh @@ -35,7 +35,7 @@ function hg_prompt_info { if [ $(in_hg) ]; then _DISPLAY=$(hg_get_branch_name) echo "$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_HG_PROMPT_PREFIX\ -$ZSH_THEME_REPO_NAME_COLOR$_DISPLAY$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_HG_PROMPT_SUFFIX$ZSH_PROMPT_BASE_COLOR$(hg_dirty)$ZSH_PROMPT_BASE_COLOR" +$ZSH_THEME_REPO_NAME_COLOR$_DISPLAY$ZSH_PROMPT_BASE_COLOR$ZSH_PROMPT_BASE_COLOR$(hg_dirty)$ZSH_THEME_HG_PROMPT_SUFFIX$ZSH_PROMPT_BASE_COLOR" unset _DISPLAY fi } From 8f1741d56c21f1daf50c1e1f76a5eea37106e239 Mon Sep 17 00:00:00 2001 From: Robby Russell <robby@planetargon.com> Date: Sat, 21 Feb 2015 16:07:27 -0800 Subject: [PATCH 348/488] Moving README to markdown... and taking first steps at reorganizing it. Also updated the LICENSE to reflect 2015. --- MIT-LICENSE.txt | 2 +- README.markdown | 175 ++++++++++++++++++++++++++++++++++++++++++++++++ README.textile | 111 ------------------------------ 3 files changed, 176 insertions(+), 112 deletions(-) create mode 100644 README.markdown delete mode 100644 README.textile diff --git a/MIT-LICENSE.txt b/MIT-LICENSE.txt index 6eb8aab34..dfbd90035 100644 --- a/MIT-LICENSE.txt +++ b/MIT-LICENSE.txt @@ -1,6 +1,6 @@ The MIT License -Copyright (c) 2009-2014 Robby Russell and contributors (see https://github.com/robbyrussell/oh-my-zsh/contributors) +Copyright (c) 2009-2015 Robby Russell and contributors (see https://github.com/robbyrussell/oh-my-zsh/contributors) Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.markdown b/README.markdown new file mode 100644 index 000000000..1a8e6f8d0 --- /dev/null +++ b/README.markdown @@ -0,0 +1,175 @@ + + + +Oh My Zsh is an open source, community-driven framework for managing your [zsh](http://www.zsh.org/) configuration. That sounds boring. Let's try this again. + +Oh My Zsh is a way of life. Once installed, your terminal prompt will become the talk of the town. Everytime you begin interacting with your command prompt, you'll begin to take advantage of the hundreds of bundled plugins and pretty themes. Strangers will come up to you in cafés and ask you, _"that is amazing. are you some sort of genius?"_ Finally, you'll begin to get the sort of attention that you always felt that you deserved. ...or maybe you'll just use the time that you saved to start flossing more often. + +To learn more, visit http://ohmyz.sh and/or follow [ohmyzsh](https://twitter.com/ohmyzsh) on twitter. + +## Getting Started + + +### Pre-requisites + +__Disclaimer:__ _Oh My Zsh works best on Mac OS X and Linux._ + +* Unix-based operating system (Mac OS X or Linux) +* [Zsh](http://www.zsh.org) should be installed (v4.3.9 or more recent) + * This is commonly pre-installed. (`zsh --version` to confirm) +* `curl` or `wget` should be installed + +### Basic Installation + +Oh My Zsh is installed by running one of the following commands in your terminal. You can install this via the command-line with either @curl@ or @wget@. + +#### via curl + +`curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh` + +#### via wget + +`wget --no-check-certificate https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh` + +## Using Oh My Zsh + +### Plugins + +Oh My Zsh comes with a shit load of plugins to take advantage of. You can take a look in the [plugins](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins) directory and/or the [wiki](https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins) to see what's currently available. + +#### Enabling Plugins + +If you spot a plugin (or several) that you would like to use with Oh My Zsh, you will need to edit the `~/.zshrc` file. Once you open it with your favorite editor, you'll see a spot to list all the plugins that you'd like Oh My Zsh to load in initialization. + +For example, this line might begin to look like... + +`plugins=(git bundler osx rake ruby)` + +#### Using Plugins + +Most plugins (should! we're working on this) include a __README__, which documents how to use them. + +### Themes + +We'll admit it. Early in the Oh My Zsh world... we may have gotten a far too theme happy. We have over one hundred themes now bundled. Most of them have [screenshots](https://wiki.github.com/robbyrussell/oh-my-zsh/themes) on the wiki. Check them out! + +#### Selecting a Theme + +_Robby's theme is the default one. It's not the fanciest one. It's not the simplest one. It's just right (for him)._ + +Once you find a theme that you want to use, you will need to edit the `~/.zshrc` file. You'll see an environment variable (all caps) in there that looks like: + +`ZSH_THEME="robbyrussell"` + +To use a different theme, simple change the value to match the name of your desired theme. For example: + +`ZSH_THEME="agnoster"` (this is one of the fancy ones) + +Open up a new terminal window and your prompt should look something like... + +## Advanced Topics + +If you're the type that likes to get their hands dirty... these sections might resonate. + +### Advanced Installation + +For those who want to install this manually and/or set custom paths. + +#### Custom Directory + +The default location is `~/.oh-my-zsh` (hidden in your home directory) + +If you'd like to change the install directory with the `ZSH` environment variable, either by running `export ZSH=/your/path` before installing, or by setting it before the end of the install pipeline like this: + +`curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | ZSH=~/.dotfiles/zsh sh` + +#### Manual Installation + +##### 1. Clone the repository: + +`git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh` + +##### 2. *Optionally*, backup your existing @~/.zshrc@ file: + +`cp ~/.zshrc ~/.zshrc.orig` + +##### 3. Create a new zsh configuration file + +You can create a new zsh config file by copying the template that we included for you. + +`cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc` + +##### 4. Change your default shell + +`chsh -s /bin/zsh` + +##### 5. Initialize your new zsh configuration + +Once you open up a new terminal window, it should load zsh with Oh My Zsh's configuration. + +### Installation Problems + +If you have any hiccups installing, here are a few common fixes. + +* You _might_ need to modify your `PATH` in `~/.zshrc` if you're not able to find some commands after switching to `oh-my-zsh`. +* If you installed manually or changed the install location, check the `ZSH` environment variable in `~/.zshrc`. + +### Custom Plugins and Themes + +If you want to override any of the default behaviors, just add a new file (ending in `.zsh`) in the `custom/` directory. + +If you have many functions that go well together, you can put them as a `abcyzeae.plugin.zsh` file in the `custom/plugins/` directory and then enable this plugin. + +If you would like to override the functionality of a plugin distributed with Oh My Zsh, create a plugin of the same name in the `custom/plugins/` directory and it will be loaded instead of the one in `plugins/`. + +## Getting Updates + +By default, you will be prompted to check for upgrades every few weeks. If you would like `oh-my-zsh` to automatically upgrade itself without prompting you, set the following in your `~/.zshrc`: + +`DISABLE_UPDATE_PROMPT=true` + +To disable automatic upgrades, set the following in your `~/.zshrc`: + +`DISABLE_AUTO_UPDATE=true` + +### Manual Updates + +If you'd like to upgrade at any point in time (maybe someone just released a new plugin and you don't want to wait a week?)... you just need to run: + +`upgrade_oh_my_zsh` + +Magic! + +## Uninstalling Oh My Zsh + +Oh My Zsh isn't for everyone. We'll miss you, but we want to make this an easy breakup. + +If you want to uninstall `oh-my-zsh`, just run `uninstall_oh_my_zsh` from the command-line. It will remove itself and revert your previous `bash` or `zsh` configuration. + +## Contributing + +I'm far from being a [Zsh](http://www.zsh.org/) expert and suspect there are many ways to improve – if you have ideas on how to make the configuration easier to maintain (and faster), don't hesitate to fork and send pull requests! + +We also need people to test out pull-requests. So take a look through [the open issues](https://github.com/robbyrussell/oh-my-zsh/issues) and help where you can. + +### Do NOT Send Us Themes + +We have (more than) enough themes for the time being. Please fork the project and add one in there – you can let people know how to grab it from there. + +## Contributors + +Oh My Zsh has a vibrant community of happy users and delightful contributors. Without all the time and help from our contributors, it wouldn't be so awesome. + +Thank you so much! + +## Follow Us + +We have an [ohmyzsh](https://twitter.com/ohmyzsh) account. You should follow it. + +## Merchandise + +We have [stickers](http://shop.planetargon.com/products/ohmyzsh-stickers-set-of-3-stickers) and [shirts](http://shop.planetargon.com/products/ohmyzsh-t-shirts) for you to show off your love of Oh My Zsh. Again, this will help you become the talk of the town! + +## LICENSE + +Oh My Zsh is released under the [MIT license](https://github.com/robbyrussell/oh-my-zsh/blob/master/MIT-LICENSE.txt). diff --git a/README.textile b/README.textile deleted file mode 100644 index d09e6b4bd..000000000 --- a/README.textile +++ /dev/null @@ -1,111 +0,0 @@ -!https://s3.amazonaws.com/ohmyzsh/oh-my-zsh-logo.png! - -@oh-my-zsh@ is an open source, community-driven framework for managing your "Zsh":http://www.zsh.org/ configuration. - -It comes bundled with a ton of helpful functions, helpers, plugins, themes, and a few things that make you shout… - -bq. "OH MY ZSHELL!" - -h2. Setup - -@oh-my-zsh@ should work with any recent release of "Zsh":http://www.zsh.org/. The minimum recommended version is *4.3.9*. - -If not already installed, you can install "Zsh":http://www.zsh.org/ using the command-line. - -h3. The automatic installer… do you trust me? - -You can install this via the command-line with either @curl@ or @wget@. - -h4. via @curl@: - -@curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh@ - -h4. via @wget@: - -@wget --no-check-certificate https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh@ - -h4. *Optionally*, change the install directory: - -The default location is @~/.oh-my-zsh@ (hidden in your home directory). - -You can change the install directory with the @ZSH@ environment variable, either by running @export ZSH=/your/path@ before installing, or by setting it before the end of the install pipeline like this: - -@curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | ZSH=~/.dotfiles/zsh sh@ - -h3. The manual way - -1. Clone the repository: - -@git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh@ - -2. *Optionally*, backup your existing @~/.zshrc@ file: - -@cp ~/.zshrc ~/.zshrc.orig@ - -3. Create a new "Zsh":http://www.zsh.org/ config file by copying the "Zsh":http://www.zsh.org/ template we've provided: - -@cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc@ - -4. Set "Zsh":http://www.zsh.org/ as your default shell: - -@chsh -s /bin/zsh@ - -5. Start or restart "Zsh":http://www.zsh.org/ by opening a new command-line window. - -h3. Problems? - -You _might_ need to modify your @PATH@ in @~/.zshrc@ if you're not able to find some commands after switching to @oh-my-zsh@. - -If you installed manually or changed the install location, check the @ZSH@ environment variable in @~/.zshrc@. - -h2. Usage - -* enable the plugins you want in your @~/.zshrc@ (take a look at the @plugins/@ directory and the "wiki":https://github.com/robbyrussell/oh-my-zsh/wiki/Plugins to see what's available) -** example: @plugins=(git osx ruby)@ -* theme support: change the @ZSH_THEME@ environment variable in @~/.zshrc@ -** take a look at the @themes/@ directory and the "wiki":https://wiki.github.com/robbyrussell/oh-my-zsh/themes to see what comes bundled with @oh-my-zsh@ -* & much, much more… take a look at the @lib/@ directory to see what @oh-my-zsh@ has to offer… - -h2. Useful - -The "refcard":http://www.bash2zsh.com/zsh_refcard/refcard.pdf is pretty useful for tips. - -h3. Customization - -If you want to override any of the default behaviors, just add a new file (ending in @.zsh@) in the @custom/@ directory. - -If you have many functions that go well together, you can put them as a @*.plugin.zsh@ file in the @custom/plugins/@ directory and then enable this plugin (see '"Usage":https://github.com/robbyrussell/oh-my-zsh#usage' above). - -If you would like to override the functionality of a plugin distributed with @oh-my-zsh@, create a plugin of the same name in the @custom/plugins/@ directory and it will be loaded instead of the one in @plugins/@. - -h3. Updates - -By default you will be prompted to check for upgrades. If you would like @oh-my-zsh@ to automatically upgrade itself without prompting you, set the following in your @~/.zshrc@: - -@DISABLE_UPDATE_PROMPT=true@ - -To disable upgrades entirely, set the following in your @~/.zshrc@: - -@DISABLE_AUTO_UPDATE=true@ - -To upgrade directly from the command-line, just run @upgrade_oh_my_zsh@. - -h3. Uninstalling - -If you want to uninstall @oh-my-zsh@, just run @uninstall_oh_my_zsh@ from the command-line and it'll remove itself and revert you to @bash@ (or your previous "Zsh":http://www.zsh.org/ configuration). - -h2. Help out! - -I'm far from being a "Zsh":http://www.zsh.org/ expert and suspect there are many ways to improve – if you have ideas on how to make the configuration easier to maintain (and faster), don't hesitate to fork and send pull requests! - -h3. (Don't) send us your theme (for now)! - --I'm hoping to collect a bunch of themes – you can see existing ones in the @themes/@ directory.- - -We have enough themes for the time being. Please fork the project and add on in there – you can let people know how to grab it from there. - -h2. Contributors - -This project wouldn't exist without all of our awesome users and contributors: "view our growing list of contributors":https://github.com/robbyrussell/oh-my-zsh/contributors - -Thank you so much! From caac64cf37912f37d85c7eb8fa6e053ceb7d2151 Mon Sep 17 00:00:00 2001 From: Robby Russell <robby@planetargon.com> Date: Sat, 21 Feb 2015 16:11:57 -0800 Subject: [PATCH 349/488] Few copy edits to README --- README.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index 1a8e6f8d0..40f5e661c 100644 --- a/README.markdown +++ b/README.markdown @@ -3,14 +3,14 @@ Oh My Zsh is an open source, community-driven framework for managing your [zsh](http://www.zsh.org/) configuration. That sounds boring. Let's try this again. -Oh My Zsh is a way of life. Once installed, your terminal prompt will become the talk of the town. Everytime you begin interacting with your command prompt, you'll begin to take advantage of the hundreds of bundled plugins and pretty themes. Strangers will come up to you in cafés and ask you, _"that is amazing. are you some sort of genius?"_ Finally, you'll begin to get the sort of attention that you always felt that you deserved. ...or maybe you'll just use the time that you saved to start flossing more often. +__Oh My Zsh is a way of life!__ Once installed, your terminal prompt will become the talk of the town _or your money back!_ Each time you interace with your command prompt, you'll be able take advantage of the hundreds of bundled plugins and pretty themes. Strangers will come up to you in cafés and ask you, _"that is amazing. are you some sort of genius?"_ Finally, you'll begin to get the sort of attention that you always felt that you deserved. ...or maybe you'll just use the time that you saved to start flossing more often. To learn more, visit http://ohmyz.sh and/or follow [ohmyzsh](https://twitter.com/ohmyzsh) on twitter. ## Getting Started -### Pre-requisites +### Prerequisites __Disclaimer:__ _Oh My Zsh works best on Mac OS X and Linux._ From 5cd31822c72964b19b6c1938694697726b2ac3b9 Mon Sep 17 00:00:00 2001 From: Robby Russell <robby@planetargon.com> Date: Sat, 21 Feb 2015 16:13:53 -0800 Subject: [PATCH 350/488] Missed a few textile formatting spots --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 40f5e661c..8fa0de46b 100644 --- a/README.markdown +++ b/README.markdown @@ -21,7 +21,7 @@ __Disclaimer:__ _Oh My Zsh works best on Mac OS X and Linux._ ### Basic Installation -Oh My Zsh is installed by running one of the following commands in your terminal. You can install this via the command-line with either @curl@ or @wget@. +Oh My Zsh is installed by running one of the following commands in your terminal. You can install this via the command-line with either `curl` or `wget`. #### via curl From a1de65e3595c9bc3438b98d9ca671c2890a4b613 Mon Sep 17 00:00:00 2001 From: Robby Russell <robby@planetargon.com> Date: Sat, 21 Feb 2015 16:19:22 -0800 Subject: [PATCH 351/488] Removing --no-check-certificate from README --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 8fa0de46b..25bcdbe6e 100644 --- a/README.markdown +++ b/README.markdown @@ -29,7 +29,7 @@ Oh My Zsh is installed by running one of the following commands in your terminal #### via wget -`wget --no-check-certificate https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh` +`wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh` ## Using Oh My Zsh From d7837c6041b1099982e3f278b50e8868b8b30ff9 Mon Sep 17 00:00:00 2001 From: Brian Derr <brian@derrclan.com> Date: Sat, 21 Feb 2015 18:08:54 -0800 Subject: [PATCH 352/488] Shorten the zle check and reset-prompt into one line. --- plugins/vi-mode/vi-mode.plugin.zsh | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/plugins/vi-mode/vi-mode.plugin.zsh b/plugins/vi-mode/vi-mode.plugin.zsh index ac9233290..80df97d61 100644 --- a/plugins/vi-mode/vi-mode.plugin.zsh +++ b/plugins/vi-mode/vi-mode.plugin.zsh @@ -16,14 +16,7 @@ function zle-keymap-select zle-line-init zle-line-finish { # Ensure that the prompt is redrawn when the terminal size changes. TRAPWINCH() { - if [[ -o zle ]]; then - # Verify that zle is active before trying to reset-prompt. - zle - if [[ $? -eq 0 ]]; then - zle reset-prompt - zle -R - fi - fi + zle && { zle reset-prompt; zle -R } } zle -N zle-line-init From aa16e18644b3fee0b3cf0320692d6566d539cdd0 Mon Sep 17 00:00:00 2001 From: Robby Russell <robby@planetargon.com> Date: Sun, 22 Feb 2015 09:29:31 -0800 Subject: [PATCH 353/488] Updating histoby-substring-search README to instruct user to load plugins via .zshrc. Closes #1832. --- plugins/history-substring-search/README | 7 ------- plugins/history-substring-search/README.markdown | 7 +++++++ 2 files changed, 7 insertions(+), 7 deletions(-) delete mode 100644 plugins/history-substring-search/README create mode 100644 plugins/history-substring-search/README.markdown diff --git a/plugins/history-substring-search/README b/plugins/history-substring-search/README deleted file mode 100644 index be11adf76..000000000 --- a/plugins/history-substring-search/README +++ /dev/null @@ -1,7 +0,0 @@ -To activate this script, load it into an interactive ZSH session: - - % source 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.markdown b/plugins/history-substring-search/README.markdown new file mode 100644 index 000000000..143b813a1 --- /dev/null +++ b/plugins/history-substring-search/README.markdown @@ -0,0 +1,7 @@ +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` From ce607d3fcb4c730c991563b4c62725cd89ce0ced Mon Sep 17 00:00:00 2001 From: Robby Russell <robby@planetargon.com> Date: Sun, 22 Feb 2015 09:51:22 -0800 Subject: [PATCH 354/488] Adding keystrong return to oascrupt per suggestion by @enzzzy. Fixes #2913. --- plugins/osx/osx.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index d366f1fc8..d0f9f009a 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -35,6 +35,7 @@ EOF set current_session to current session tell current_session write text "${command}" + keystroke return end tell end tell end tell From 43bdea4c2fab0ff313a28e2b45274a90c8cc3c76 Mon Sep 17 00:00:00 2001 From: Robby Russell <robby@planetargon.com> Date: Sun, 22 Feb 2015 09:57:42 -0800 Subject: [PATCH 355/488] Removing say() function in perl plugin so that it doesn't overwrite OSX comand line utility. Closes #2562 --- plugins/perl/perl.plugin.zsh | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/plugins/perl/perl.plugin.zsh b/plugins/perl/perl.plugin.zsh index f94c4195d..1fbf7c122 100644 --- a/plugins/perl/perl.plugin.zsh +++ b/plugins/perl/perl.plugin.zsh @@ -27,7 +27,7 @@ alias latest-perl='curl -s http://www.perl.org/get.html | perl -wlne '\''if (/pe # Functions ################################################################# -# newpl - creates a basic Perl script file and opens it with $EDITOR +# newpl - creates a basic Perl script file and opens it with $EDITOR newpl () { # set $EDITOR to 'vim' if it is undefined [[ -z $EDITOR ]] && EDITOR=vim @@ -54,9 +54,3 @@ pgs() { # [find] [replace] [filename] prep() { # [pattern] [filename unless STDOUT] perl -nle 'print if /'"$1"'/;' $2 } - -# say - append a newline to 'print' -say() { - print "$1\n" -} - From 7fc47e7ebcff3ec1e01399d32752451f14e3de6a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mads=20M=C3=A6tzke=20Tandrup?= <mads@maetzke-tandrup.dk> Date: Sun, 22 Feb 2015 22:14:37 +0100 Subject: [PATCH 356/488] Fixing spaces in title and message given to bgnotify on OS X --- plugins/bgnotify/bgnotify.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh index 259d27424..5ccead3b8 100755 --- a/plugins/bgnotify/bgnotify.plugin.zsh +++ b/plugins/bgnotify/bgnotify.plugin.zsh @@ -34,7 +34,7 @@ bgnotify () { if hash notify-send 2>/dev/null; then #ubuntu! notify-send $1 $2 elif hash terminal-notifier 2>/dev/null; then #osx - terminal-notifier -message $2 -title $1 + terminal-notifier -message "$2" -title "$1" elif hash growlnotify 2>/dev/null; then #osx growl growlnotify -m $1 $2 elif hash notifu 2>/dev/null; then #cygwyn support! From 8b45118f266fd5422f80a7868add48234adc1d30 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Micha=C5=82=20Ordon?= <michal@tehidea.com> Date: Mon, 23 Feb 2015 11:43:19 +0000 Subject: [PATCH 357/488] Update Grunt plugin to 0.1.2 --- plugins/grunt/grunt.plugin.zsh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/plugins/grunt/grunt.plugin.zsh b/plugins/grunt/grunt.plugin.zsh index 48f6cb5a2..3f9695177 100644 --- a/plugins/grunt/grunt.plugin.zsh +++ b/plugins/grunt/grunt.plugin.zsh @@ -1,4 +1,5 @@ #compdef grunt +#autoload # ----------------------------------------------------------------------------- # _grunt # @@ -8,11 +9,11 @@ # # ----------------------------------------------------------------------------- # -# Version : 0.1.0 +# Version : 0.1.2 # Author : Yonchu <yuyuchu3333@gmail.com> # License : MIT License # Repository : https://github.com/yonchu/grunt-zsh-completion -# Last Change : 22 Jul 2013. +# Last Change : 20 Aug 2014. # # Copyright (c) 2013 Yonchu. # @@ -46,7 +47,7 @@ # # ----------------------------------------------------------------------------- -function _grunt() { +function __grunt() { local curcontext="$curcontext" update_policy state local show_grunt_path update_msg gruntfile opts tasks @@ -113,7 +114,7 @@ function _grunt() { # The cache variable name: __grunt_version __grunt_gruntfile __grunt_opts __grunt_tasks function __grunt_update_cache() { # TODO - local version='0.1.0' + local version='0.1.2' local is_updating=0 local gruntfile="$1" local grunt_info no_update_options cache_path @@ -177,6 +178,7 @@ function __grunt_get_tasks() { | grep 'Available tasks' -A 100 \ | grep '^ ' \ | sed -e 's/^[[:blank:]]*//' -e 's/[[:blank:]]*$//' \ + | sed -e 's/:/\\:/g' \ | sed -e 's/ /:/' } @@ -250,4 +252,4 @@ function __grunt_caching_policy() { (( $#oldp )) } -compdef _grunt grunt +compdef __grunt grunt \ No newline at end of file From 0dc7b5c049b9cfb747b48d13b32799266b231caf Mon Sep 17 00:00:00 2001 From: uberspot <onexemailx@gmail.com> Date: Thu, 12 Feb 2015 15:08:19 +0200 Subject: [PATCH 358/488] add nmap plugin with some aliases for scan modes --- plugins/nmap/README.md | 32 ++++++++++++++++++++++++++++++++ plugins/nmap/nmap.plugin.zsh | 28 ++++++++++++++++++++++++++++ 2 files changed, 60 insertions(+) create mode 100644 plugins/nmap/README.md create mode 100644 plugins/nmap/nmap.plugin.zsh diff --git a/plugins/nmap/README.md b/plugins/nmap/README.md new file mode 100644 index 000000000..8bb8e0648 --- /dev/null +++ b/plugins/nmap/README.md @@ -0,0 +1,32 @@ +# Nmap aliases plugin + +Adds some useful aliases for nmap similar to the profiles in zenmap. + +Nmap options are: + * -sS - TCP SYN scan + * -v - verbose + * -T1 - timing of scan. Options are paranoid (0), sneaky (1), polite (2), normal (3), aggressive (4), and insane (5) + * -sF - FIN scan (can sneak through non-stateful firewalls) + * -PE - ICMP echo discovery probe + * -PP - timestamp discovery probe + * -PY - SCTP init ping + * -g - use given number as source port + * -A - enable OS detection, version detection, script scanning, and traceroute (aggressive) + * -O - enable OS detection + * -sA - TCP ACK scan + * -F - fast scan + * --script=vulscan - also access vulnerabilities in target + +## 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_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 diff --git a/plugins/nmap/nmap.plugin.zsh b/plugins/nmap/nmap.plugin.zsh new file mode 100644 index 000000000..f3603f622 --- /dev/null +++ b/plugins/nmap/nmap.plugin.zsh @@ -0,0 +1,28 @@ +# Some useful nmap aliases for scan modes + +# Nmap options are: +# -sS - TCP SYN scan +# -v - verbose +# -T1 - timing of scan. Options are paranoid (0), sneaky (1), polite (2), normal (3), aggressive (4), and insane (5) +# -sF - FIN scan (can sneak through non-stateful firewalls) +# -PE - ICMP echo discovery probe +# -PP - timestamp discovery probe +# -PY - SCTP init ping +# -g - use given number as source port +# -A - enable OS detection, version detection, script scanning, and traceroute (aggressive) +# -O - enable OS detection +# -sA - TCP ACK scan +# -F - fast scan +# --script=vulscan - also access vulnerabilities in target + +alias nmap_open_ports="nmap --open" +alias nmap_list_interfaces="nmap --iflist" +alias nmap_slow="nmap -sS -v -T1" +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_detect_versions="nmap -sV -p1-65535 -O --osscan-guess -T4 -Pn" +alias nmap_check_for_vulns="nmap --script=vulscan" + From 1308515d1c2014a52aca3ac952a0172d9961eee0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Kristj=C3=A1n=20Oddsson?= <koddsson@gmail.com> Date: Sun, 22 Feb 2015 19:15:33 +0000 Subject: [PATCH 359/488] Re-order OS detection if..else statement. This patch will re-order the if statements when checking what operating system the user is running. This is useful for people that already have a `notify-send` binary in their $PATH but are running OSX. An example of such requirements is anyone running `vagrant-notify` is required to have a `notify-send` binary on their $PATH. See [link](https://github.com/fgrehm/vagrant-notify#os-x). --- plugins/bgnotify/bgnotify.plugin.zsh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh index 5ccead3b8..14ca4c817 100755 --- a/plugins/bgnotify/bgnotify.plugin.zsh +++ b/plugins/bgnotify/bgnotify.plugin.zsh @@ -1,6 +1,5 @@ #!/usr/bin/env zsh - ## setup ## [[ -o interactive ]] || return #interactive only! @@ -21,22 +20,22 @@ if ! (type bgnotify_formatted | grep -q 'function'); then fi currentWindowId () { - if hash notify-send 2>/dev/null; then #ubuntu! - xprop -root | awk '/NET_ACTIVE_WINDOW/ { print $5; exit }' - elif hash osascript 2>/dev/null; then #osx + 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 }' else echo $EPOCHSECONDS #fallback for windows fi } bgnotify () { - if hash notify-send 2>/dev/null; then #ubuntu! - notify-send $1 $2 - elif hash terminal-notifier 2>/dev/null; then #osx + if hash terminal-notifier 2>/dev/null; then #osx terminal-notifier -message "$2" -title "$1" 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 elif hash notifu 2>/dev/null; then #cygwyn support! notifu /m "$2" /p "$1" fi From 2e1b964c002aa193fef733d52da252e2e11ca2ef Mon Sep 17 00:00:00 2001 From: wyldphyre <craigreynolds@Claire.local> Date: Tue, 24 Feb 2015 20:58:50 +0800 Subject: [PATCH 360/488] Add README.md file --- plugins/sublime/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 plugins/sublime/README.md diff --git a/plugins/sublime/README.md b/plugins/sublime/README.md new file mode 100644 index 000000000..75b2d9dc1 --- /dev/null +++ b/plugins/sublime/README.md @@ -0,0 +1,15 @@ +## sublime + +Plugin for Sublime Text, a cross platform text and code editor, available for Linux, Mac OS X, and Windows. + +### Requirements + + * [Sublime Text](http://www.sublimetext.com/) + +### Usage + + * If `st` command is called without an argument, launch Sublime Text + + * If `st` is passed a directory, `cd` to it and open it in Sublime Text + + * If `st` is passed a file, open it in Sublime Text \ No newline at end of file From 01ec37e5f87281e91b174d068a43d0ce6e43944e Mon Sep 17 00:00:00 2001 From: wyldphyre <craigreynolds@Claire.local> Date: Tue, 24 Feb 2015 21:05:58 +0800 Subject: [PATCH 361/488] Added missing 'stt' command alias --- plugins/sublime/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/sublime/README.md b/plugins/sublime/README.md index 75b2d9dc1..e38cf66dc 100644 --- a/plugins/sublime/README.md +++ b/plugins/sublime/README.md @@ -12,4 +12,6 @@ Plugin for Sublime Text, a cross platform text and code editor, available for Li * If `st` is passed a directory, `cd` to it and open it in Sublime Text - * If `st` is passed a file, open it in Sublime Text \ No newline at end of file + * 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 From c58c6233052381300870f8073e315ab9ca1b3be6 Mon Sep 17 00:00:00 2001 From: James Womack <jwomack@netflix.com> Date: Wed, 11 Mar 2015 14:18:42 -0700 Subject: [PATCH 362/488] Use camelCase for npm aliases --- plugins/npm/npm.plugin.zsh | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/plugins/npm/npm.plugin.zsh b/plugins/npm/npm.plugin.zsh index d19079b3f..68ec5fabd 100644 --- a/plugins/npm/npm.plugin.zsh +++ b/plugins/npm/npm.plugin.zsh @@ -1,7 +1,14 @@ eval "$(npm completion 2>/dev/null)" -# Install and save to dependencies -alias npms="npm i -S " -# Install and save to dev-dependencies -alias npmd="npm i -D " +# 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 +# npms is used by https://www.npmjs.com/package/npms +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 " From a414b5e3d906bb13062ca9ec19118c01ac44dc2a Mon Sep 17 00:00:00 2001 From: XerWandeRer <xerwanderer@me.com> Date: Mon, 16 Mar 2015 13:55:35 +0800 Subject: [PATCH 363/488] Update _adb Added support for `tcpip` option --- plugins/adb/_adb | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/adb/_adb b/plugins/adb/_adb index 4c998172d..22089581a 100644 --- a/plugins/adb/_adb +++ b/plugins/adb/_adb @@ -21,6 +21,7 @@ _1st_arguments=( 'push:copy file/dir to device' '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’ 'uninstall:remove this app package from the device' 'version:show version num' ) From 0dde9943c9cc90c720a33e6713450d96cf210777 Mon Sep 17 00:00:00 2001 From: Abner Chen <houjunchen@gmail.com> Date: Tue, 17 Mar 2015 03:26:44 +0800 Subject: [PATCH 364/488] [Modify] Update django.plugin.zsh for Django 1.7.6 --- plugins/django/django.plugin.zsh | 263 +++++++++++++++++++++++++------ 1 file changed, 212 insertions(+), 51 deletions(-) diff --git a/plugins/django/django.plugin.zsh b/plugins/django/django.plugin.zsh index 2e9ce1c52..35865a692 100644 --- a/plugins/django/django.plugin.zsh +++ b/plugins/django/django.plugin.zsh @@ -2,59 +2,114 @@ typeset -ga nul_args nul_args=( + '--verbosity=-[verbosity level; 0=minimal output, 1=normal output, 2=all output.]:Verbosity:((0\:minimal 1\:normal 2\:all))' '--settings=-[the Python path to a settings module.]:file:_files' - '--pythonpath=-[a directory to add to the Python path.]::directory:_directories' + '--pythonpath=-[a directory to add to the Python path.]:directory:_directories' '--traceback[print traceback on exception.]' + "--no-color[Don't colorize the command output.]" "--version[show program's version number and exit.]" {-h,--help}'[show this help message and exit.]' ) -_managepy-adminindex(){ +typeset -ga start_args +start_args=( + '--template=-[The path or URL to load the template from.]:directory:_directories' + '--extension=-[The file extension(s) to render (default: "py").]' + '--name=-[The file name(s) to render.]:file:_files' +) + +typeset -ga db_args +db_args=( + '--database=-[Nominates a database. Defaults to the "default" database.]' +) + +typeset -ga noinput_args +noinput_args=( + '--noinput[tells Django to NOT prompt the user for input of any kind.]' +) + +typeset -ga no_init_data_args +no_init_data_args=( + '--no-initial-data[Tells Django not to load any initial data after database synchronization.]' +) + +typeset -ga tag_args +tag_args=( + '--tag=-[Run only checks labeled with given tag.]' + '--list-tags[List available tags.]' +) + +_managepy-check(){ _arguments -s : \ - $nul_args \ - '*::directory:_directories' && ret=0 + $tag_args \ + $nul_args && ret=0 +} + +_managepy-changepassword(){ + _arguments -s : \ + $db_args \ + $nul_args && ret=0 } _managepy-createcachetable(){ _arguments -s : \ + $db_args \ + $nul_args && ret=0 +} + +_managepy-createsuperuser(){ + _arguments -s : \ + '--username=-[Specifies the login for the superuser.]' \ + '--email=-[Specifies the email for the superuser.]' \ + $noinput_args \ + $db_args \ $nul_args && ret=0 } _managepy-collectstatic(){ _arguments -s : \ - '--link=-[Create a symbolic link to each file instead of copying.]:' \ - '--noinput=-[Do NOT prompt the user for input of any kind.]:' \ - '--no-post-process=-[Do NOT post process collected files.]:' \ - '--ignore=-[Ignore files or directories matching this glob-style pattern. Use multiple times to ignore more.]:' \ - '--dry-run=-[Do everything except modify the filesystem.]:' \ - '--clear=-[Clear the existing files using the storage before trying to copy or link the original file.]:' \ - '--link=-[Create a symbolic link to each file instead of copying.]:' \ - '--no-default-ignore=-[Do not ignore the common private glob-style patterns "CVS", ".*" and "*~".]:' \ + '--link[Create a symbolic link to each file instead of copying.]' \ + '--no-post-process[Do NOT post process collected files.]' \ + '--ignore=-[Ignore files or directories matching this glob-style pattern. Use multiple times to ignore more.]' \ + '--dry-run[Do everything except modify the filesystem.]' \ + '--clear[Clear the existing files using the storage before trying to copy or link the original file.]' \ + '--link[Create a symbolic link to each file instead of copying.]' \ + '--no-default-ignore[Do not ignore the common private glob-style patterns "CVS", ".*" and "*~".]' \ + $noinput_args \ $nul_args && ret=0 } _managepy-dbshell(){ _arguments -s : \ + $db_args \ $nul_args && ret=0 } _managepy-diffsettings(){ _arguments -s : \ + "--all[Display all settings, regardless of their value.]" $nul_args && ret=0 } _managepy-dumpdata(){ _arguments -s : \ - '--format=-[specifies the output serialization format for fixtures.]:format:(json yaml xml)' \ - '--indent=-[specifies the indent level to use when pretty-printing output.]:' \ + '--format=-[Specifies the output serialization format for fixtures.]:format:(json yaml xml)' \ + '--indent=-[Specifies the indent level to use when pretty-printing output.]' \ + '--exclude=-[An app_label or app_label.ModelName to exclude (use multiple --exclude to exclude multiple apps/models).]' \ + '--natural-foreign[Use natural foreign keys if they are available.]' \ + '--natural-primary[Use natural primary keys if they are available.]' \ + "--all[Use Django's base manager to dump all models stored in the database.]" \ + '--pks=-[Only dump objects with given primary keys.]' \ + $db_args \ $nul_args \ '*::appname:_applist' && ret=0 } _managepy-flush(){ _arguments -s : \ - '--verbosity=-[verbosity level; 0=minimal output, 1=normal output, 2=all output.]:Verbosity:((0\:minimal 1\:normal 2\:all))' \ - '--noinput[tells Django to NOT prompt the user for input of any kind.]' \ + $no_init_data_args \ + $db_args \ + $noinput_args \ $nul_args && ret=0 } @@ -75,32 +130,61 @@ _managepy_cmds(){ _managepy-inspectdb(){ _arguments -s : \ + $db_args \ $nul_args && ret=0 } _managepy-loaddata(){ _arguments -s : \ - '--verbosity=-[verbosity level; 0=minimal output, 1=normal output, 2=all output.]:Verbosity:((0\:minimal 1\:normal 2\:all))' \ + '--ignorenonexistent[Ignores entries in the serialized data for fields that do not currently exist on the model.]' \ + '--app=-[Only look for fixtures in the specified app.]:appname:_applist' \ '*::file:_files' \ + $db_args \ $nul_args && ret=0 } -_managepy-reset(){ +_managepy-makemessages(){ _arguments -s : \ - '--noinput[tells Django to NOT prompt the user for input of any kind.]' \ - '*::appname:_applist' \ + '--locale=-[Creates or updates the message files for the given locale(s) (e.g. pt_BR).]' \ + '--domain=-[The domain of the message files (default: "django").]' \ + '--all[Updates the message files for all existing locales.]' \ + '--extension=-[The file extension(s) to examine (default: "html,txt", or "js" if the domain is "djangojs").]' \ + '--symlinks[Follows symlinks to directories when examining source code and templates for translation strings.]' \ + '--ignore=-[Ignore files or directories matching this glob-style pattern.]' \ + "--no-default-ignore[Don't ignore the common glob-style patterns 'CVS', '.*', '*~' and '*.pyc'.]" \ + "--no-wrap[Don't break long message lines into several lines.]" \ + "--no-location[Don't write '#: filename:line' lines.]" \ + '--no-obsolete[emove obsolete message strings.]' \ + '--keep-pot[Keep .pot file after making messages.]' \ + $nul_args && ret=0 +} +_managepy-makemigrations(){ + _arguments -s : \ + '--dry-run[Just show what migrations would be made]' \ + '--merge[Enable fixing of migration conflicts.]' \ + '--empty[Create an empty migration.]' \ + $noinput_args \ + $nul_args && ret=0 +} +_managepy-migrate(){ + _arguments -s : \ + '--fake[Mark migrations as run without actually running them]' \ + '--list[Show a list of all known migrations and which are applied]' \ + $no_init_data_args \ + $noinput_args \ + $db_args \ $nul_args && ret=0 } _managepy-runfcgi(){ local state - + local fcgi_opts fcgi_opts=( 'protocol[fcgi, scgi, ajp, ... (default fcgi)]:protocol:(fcgi scgi ajp)' 'host[hostname to listen on..]:' 'port[port to listen on.]:' - 'socket[UNIX socket to listen on.]::file:_files' + 'socket[UNIX socket to listen on.]:file:_files' 'method[prefork or threaded (default prefork)]:method:(prefork threaded)' 'maxrequests[number of requests a child handles before it is killed and a new child is forked (0 = no limit).]:' 'maxspare[max number of spare processes / threads.]:' @@ -112,7 +196,7 @@ _managepy-runfcgi(){ 'outlog[write stdout to this file.]:file:_files' 'errlog[write stderr to this file.]:file:_files' ) - + _arguments -s : \ $nul_args \ '*: :_values "FCGI Setting" $fcgi_opts' && ret=0 @@ -120,72 +204,148 @@ _managepy-runfcgi(){ _managepy-runserver(){ _arguments -s : \ - '--noreload[tells Django to NOT use the auto-reloader.]' \ - '--adminmedia[specifies the directory from which to serve admin media.]:directory:_files' \ + '--ipv6[Tells Django to use an IPv6 address.]' \ + '--nothreading[Tells Django to NOT use threading.]' \ + '--noreload[Tells Django to NOT use the auto-reloader.]' \ + '--nostatic[Tells Django to NOT automatically serve static files at STATIC_URL.]' \ + '--insecure[Allows serving static files even if DEBUG is False.]' \ $nul_args && ret=0 } _managepy-shell(){ _arguments -s : \ - '--plain[tells Django to use plain Python, not IPython.]' \ + '--plain[Tells Django to use plain Python, not IPython.]' \ + '--no-startup[When using plain Python, ignore the PYTHONSTARTUP environment variable and ~/.pythonrc.py script.]' \ + '--interface=-[Specify an interactive interpreter interface.]:INTERFACE:((ipython bpython))' \ $nul_args && ret=0 } -_managepy-sql(){} -_managepy-sqlall(){} -_managepy-sqlclear(){} -_managepy-sqlcustom(){} -_managepy-sqlflush(){} -_managepy-sqlindexes(){} -_managepy-sqlinitialdata(){} -_managepy-sqlreset(){} -_managepy-sqlsequencereset(){} -_managepy-startapp(){} -_managepy-startproject(){} +_managepy-sql(){ + _arguments -s : \ + $db_args \ + $nul_args && ret=0 +} + +_managepy-sqlall(){ + _arguments -s : \ + $db_args \ + $nul_args && ret=0 +} + +_managepy-sqlclear(){ + _arguments -s : \ + $db_args \ + $nul_args && ret=0 +} + +_managepy-sqlcustom(){ + _arguments -s : \ + $db_args \ + $nul_args && ret=0 +} + +_managepy-dropindexes(){ + _arguments -s : \ + $db_args \ + $nul_args && ret=0 +} + +_managepy-sqlflush(){ + _arguments -s : \ + $db_args \ + $nul_args && ret=0 +} + +_managepy-sqlindexes(){ + _arguments -s : \ + $db_args \ + $nul_args && ret=0 +} + +_managepy-sqlinitialdata(){ + _arguments -s : \ + $nul_args && ret=0 +} + +_managepy-sqlsequencereset(){ + _arguments -s : \ + $db_args \ + $nul_args && ret=0 +} + +_managepy-squashmigrations(){ + _arguments -s : \ + '--no-optimize[Do not try to optimize the squashed operations.]' \ + $noinput_args \ + $nul_args && ret=0 +} + +_managepy-startapp(){ + _arguments -s : \ + $start_args \ + $nul_args && ret=0 +} +_managepy-startproject(){ + _arguments -s : \ + $start_args \ + $nul_args && ret=0 +} _managepy-syncdb() { _arguments -s : \ - '--verbosity=-[verbosity level; 0=minimal output, 1=normal output, 2=all output.]:Verbosity:((0\:minimal 1\:normal 2\:all))' \ - '--noinput[tells Django to NOT prompt the user for input of any kind.]' \ + $noinput_args \ + $no_init_data_args \ + $db_args \ $nul_args && ret=0 } _managepy-test() { _arguments -s : \ - '--verbosity=-[verbosity level; 0=minimal output, 1=normal output, 2=all output.]:Verbosity:((0\:minimal 1\:normal 2\:all))' \ - '--noinput[tells Django to NOT prompt the user for input of any kind.]' \ + '--failfast[Tells Django to stop running the test suite after first failed test.]' \ + '--testrunner=-[Tells Django to use specified test runner class instead of the one specified by the TEST_RUNNER setting.]' \ + '--liveserver=-[Overrides the default address where the live server (used with LiveServerTestCase) is expected to run from. The default value is localhost:8081.]' \ + '--top-level-directory=-[Top level of project for unittest discovery.]' \ + '--pattern=-[The test matching pattern. Defaults to test*.py.]:' \ + $noinput_args \ '*::appname:_applist' \ $nul_args && ret=0 } _managepy-testserver() { _arguments -s : \ - '--verbosity=-[verbosity level; 0=minimal output, 1=normal output, 2=all output.]:Verbosity:((0\:minimal 1\:normal 2\:all))' \ '--addrport=-[port number or ipaddr:port to run the server on.]' \ + '--ipv6[Tells Django to use an IPv6 address.]' \ + $noinput_args \ '*::fixture:_files' \ $nul_args && ret=0 } _managepy-validate() { _arguments -s : \ + $tag_args \ $nul_args && ret=0 } _managepy-commands() { local -a commands - + commands=( - 'adminindex:prints the admin-index template snippet for the given app name(s).' - 'createcachetable:creates the table needed to use the SQL cache backend.' + "changepassword:Change a user's password for django.contrib.auth." + 'check:Checks the entire Django project for potential problems.' + 'compilemessages:Compiles .po files to .mo files for use with builtin gettext support.' + 'createcachetable:Creates the table needed to use the SQL cache backend.' + 'createsuperuser:Used to create a superuser.' 'collectstatic:Collect static files in a single location.' - 'dbshell:runs the command-line client for the current DATABASE_ENGINE.' - "diffsettings:displays differences between the current settings.py and Django's default settings." + 'dbshell:Runs the command-line client for the current DATABASE_ENGINE.' + "diffsettings:Displays differences between the current settings.py and Django's default settings." 'dumpdata:Output the contents of the database as a fixture of the given format.' 'flush:Executes ``sqlflush`` on the current database.' 'help:manage.py help.' 'inspectdb:Introspects the database tables in the given database and outputs a Django model module.' 'loaddata:Installs the named fixture(s) in the database.' - 'reset:Executes ``sqlreset`` for the given app(s) in the current database.' + 'makemessages:Runs over the entire source tree of the current directory and pulls out all strings marked for translation.' + 'makemigrations:Creates new migration(s) for apps.' + 'migrate:Updates database schema. Manages both apps with migrations and those without.' 'runfcgi:Run this project as a fastcgi (or some other protocol supported by flup) application,' 'runserver:Starts a lightweight Web server for development.' 'shell:Runs a Python interactive interpreter.' @@ -193,11 +353,12 @@ _managepy-commands() { 'sqlall:Prints the CREATE TABLE, custom SQL and CREATE INDEX SQL statements for the given model module name(s).' 'sqlclear:Prints the DROP TABLE SQL statements for the given app name(s).' 'sqlcustom:Prints the custom table modifying SQL statements for the given app name(s).' + 'sqldropindexes:Prints the DROP INDEX SQL statements for the given model module name(s).' 'sqlflush:Returns a list of the SQL statements required to return all tables in the database to the state they were in just after they were installed.' 'sqlindexes:Prints the CREATE INDEX SQL statements for the given model module name(s).' "sqlinitialdata:RENAMED: see 'sqlcustom'" - 'sqlreset:Prints the DROP TABLE SQL, then the CREATE TABLE SQL, for the given app name(s).' 'sqlsequencereset:Prints the SQL statements for resetting sequences for the given app name(s).' + 'squashmigrations:Squashes an existing set of migrations (from first until specified) into a single new one.' "startapp:Creates a Django app directory structure for the given app name in this project's directory." "startproject:Creates a Django project directory structure for the given project name in this current directory." "syncdb:Create the database tables for all apps in INSTALLED_APPS whose tables haven't already been created." @@ -205,7 +366,7 @@ _managepy-commands() { 'testserver:Runs a development server with data from the given fixture(s).' 'validate:Validates all installed models.' ) - + _describe -t commands 'manage.py command' commands && ret=0 } @@ -223,7 +384,7 @@ _applist() { _managepy() { local curcontext=$curcontext ret=1 - + if ((CURRENT == 2)); then _managepy-commands else From d4918ae8a096545d0135e3f001bc1195c0a365fe Mon Sep 17 00:00:00 2001 From: Nathan Daly <NHDaly@gmail.com> Date: Fri, 27 Mar 2015 15:59:53 -0700 Subject: [PATCH 365/488] Fixed Typo. --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 25bcdbe6e..9f96e315d 100644 --- a/README.markdown +++ b/README.markdown @@ -3,7 +3,7 @@ Oh My Zsh is an open source, community-driven framework for managing your [zsh](http://www.zsh.org/) configuration. That sounds boring. Let's try this again. -__Oh My Zsh is a way of life!__ Once installed, your terminal prompt will become the talk of the town _or your money back!_ Each time you interace with your command prompt, you'll be able take advantage of the hundreds of bundled plugins and pretty themes. Strangers will come up to you in cafés and ask you, _"that is amazing. are you some sort of genius?"_ Finally, you'll begin to get the sort of attention that you always felt that you deserved. ...or maybe you'll just use the time that you saved to start flossing more often. +__Oh My Zsh is a way of life!__ Once installed, your terminal prompt will become the talk of the town _or your money back!_ Each time you interface with your command prompt, you'll be able take advantage of the hundreds of bundled plugins and pretty themes. Strangers will come up to you in cafés and ask you, _"that is amazing. are you some sort of genius?"_ Finally, you'll begin to get the sort of attention that you always felt that you deserved. ...or maybe you'll just use the time that you saved to start flossing more often. To learn more, visit http://ohmyz.sh and/or follow [ohmyzsh](https://twitter.com/ohmyzsh) on twitter. From eea77b7cb7a8d64a03d7eddc5e0f05e122b82546 Mon Sep 17 00:00:00 2001 From: Will Mendes <willmendesneto@gmail.com> Date: Sat, 18 Apr 2015 20:59:13 -0300 Subject: [PATCH 366/488] Add stackoverflow link --- plugins/frontend-search/README.md | 2 ++ plugins/frontend-search/frontend-search.plugin.zsh | 9 ++++++++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/frontend-search/README.md b/plugins/frontend-search/README.md index 32784d03b..c1ccc9092 100644 --- a/plugins/frontend-search/README.md +++ b/plugins/frontend-search/README.md @@ -47,6 +47,7 @@ The search content are * `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 ## @@ -72,6 +73,7 @@ There are a few aliases presented as well: * `angularjs` A shorthand for `frontend angularjs` * `reactjs` A shorthand for `frontend reactjs` * `emberjs` A shorthand for `frontend emberjs` +* `stackoverflow` A shorthand for `frontend stackoverflow` ## Author diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh index f1d45b0d1..c9e51b2e0 100644 --- a/plugins/frontend-search/frontend-search.plugin.zsh +++ b/plugins/frontend-search/frontend-search.plugin.zsh @@ -17,7 +17,7 @@ function frontend() { 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)' ]]; + if [[ ! $1 =~ '(jquery|mdn|compass|html5please|caniuse|aurajs|dartlang|qunit|fontello|bootsnipp|cssflow|codepen|unheap|bem|smacss|angularjs|reactjs|emberjs|stackoverflow)' ]]; then echo "Search valid search content $1 not supported." echo "Valid contents: (formats 'frontend <search-content>' or '<search-content>')" @@ -40,6 +40,7 @@ function frontend() { echo "* angularjs" echo "* reactjs" echo "* emberjs" + echo "* stackoverflow" echo "" return 1 @@ -103,6 +104,9 @@ function frontend() { "emberjs") url="${url}emberjs.com" url="${url}/api/#stq=$2&stp=1" ;; + "stackoverflow") + url="${url}https://stackoverflow.com" + url="${url}/search?q=$2" ;; *) echo "INVALID PARAM!" return ;; esac @@ -149,3 +153,6 @@ alias smacss='frontend smacss' alias angularjs='frontend angularjs' alias reactjs='frontend reactjs' alias emberjs='frontend emberjs' + +# search websites +alias stackoverflow='frontend stackoverflow' From 7f0b577b142fad91ad04f03112498304c9f27dbb Mon Sep 17 00:00:00 2001 From: dnixx <nicoqh@gmail.com> Date: Tue, 21 Apr 2015 21:34:26 +0200 Subject: [PATCH 367/488] Use the newest Vundle commands Vundle changed the command names during an interface update. The old commands will be deprecated. https://github.com/gmarik/Vundle.vim/blob/v0.10.2/doc/vundle.txt#L372-L396 --- plugins/vundle/vundle.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/vundle/vundle.plugin.zsh b/plugins/vundle/vundle.plugin.zsh index 830774fe3..b5f1c0bbf 100644 --- a/plugins/vundle/vundle.plugin.zsh +++ b/plugins/vundle/vundle.plugin.zsh @@ -13,15 +13,15 @@ function vundle-init () { function vundle () { vundle-init - vim -c "execute \"BundleInstall\" | q | q" + vim -c "execute \"PluginInstall\" | q | q" } function vundle-update () { vundle-init - vim -c "execute \"BundleInstall!\" | q | q" + vim -c "execute \"PluginInstall!\" | q | q" } function vundle-clean () { vundle-init - vim -c "execute \"BundleClean!\" | q | q" + vim -c "execute \"PluginClean!\" | q | q" } From 05f2ad3dbb537bcbfbf3acf54221552d036de997 Mon Sep 17 00:00:00 2001 From: Will Mendes <willmendesneto@gmail.com> Date: Thu, 23 Apr 2015 00:38:25 -0300 Subject: [PATCH 368/488] fix stackoverflow url in search --- plugins/frontend-search/frontend-search.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh index c9e51b2e0..b9fb8634c 100644 --- a/plugins/frontend-search/frontend-search.plugin.zsh +++ b/plugins/frontend-search/frontend-search.plugin.zsh @@ -105,7 +105,7 @@ function frontend() { url="${url}emberjs.com" url="${url}/api/#stq=$2&stp=1" ;; "stackoverflow") - url="${url}https://stackoverflow.com" + url="${url}stackoverflow.com" url="${url}/search?q=$2" ;; *) echo "INVALID PARAM!" return ;; From 551d68ad11c65ece0ea2af07a58fe971795bb9e6 Mon Sep 17 00:00:00 2001 From: Matthew Ziegelbaum <mziegelbaum@gmail.com> Date: Sat, 25 Apr 2015 16:08:26 -0400 Subject: [PATCH 369/488] Fixes gradle autocomplete. Regex did not include subproject tasks before. --- plugins/gradle/gradle.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/gradle/gradle.plugin.zsh b/plugins/gradle/gradle.plugin.zsh index 9229512f7..14ababa9e 100644 --- a/plugins/gradle/gradle.plugin.zsh +++ b/plugins/gradle/gradle.plugin.zsh @@ -72,7 +72,7 @@ _gradle_tasks () { if [ in_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 | grep "^[ ]*[a-zA-Z0-9:]*\ -\ " | sed "s/ - .*$//" | sed "s/[\ ]*//" > .gradletasknamecache fi compadd -X "==== Gradle Tasks ====" `cat .gradletasknamecache` fi @@ -82,7 +82,7 @@ _gradlew_tasks () { if [ in_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 | grep "^[ ]*[a-zA-Z0-9:]*\ -\ " | sed "s/ - .*$//" | sed "s/[\ ]*//" > .gradletasknamecache fi compadd -X "==== Gradlew Tasks ====" `cat .gradletasknamecache` fi From 590d3935955dfcda42bdc9edc94b30855c29305e Mon Sep 17 00:00:00 2001 From: Will Mendes <willmendesneto@gmail.com> Date: Sun, 26 Apr 2015 11:43:45 -0300 Subject: [PATCH 370/488] Add autocomplete for frontend-search --- plugins/frontend-search/README.md | 15 +-- plugins/frontend-search/_frontend-search.sh | 128 ++++++++++++++++++++ 2 files changed, 134 insertions(+), 9 deletions(-) create mode 100644 plugins/frontend-search/_frontend-search.sh diff --git a/plugins/frontend-search/README.md b/plugins/frontend-search/README.md index c1ccc9092..801d450f3 100644 --- a/plugins/frontend-search/README.md +++ b/plugins/frontend-search/README.md @@ -1,18 +1,12 @@ ## Rationale ## -The idea for this script is to help searches in important doc contents from frontend. +> Searches for your Frontend contents more easier + ## Instalation ## -I will send a Pull Request with this plugin for .oh-my-zsh official repository. If accept them, it's only add in plugins list that exists in ```.zshrc``` file. -For now, you can clone this repository and add in ```custom/plugins``` folder - -```bash -$ git clone git://github.com/willmendesneto/frontend-search.git ~/.oh-my-zsh/custom/plugins/frontend-search -``` - -After this, restart your terminal and frontend-search plugin is configurated in you CLI. +Open your `.zshrc` file and load `frontend-search` plugin ```bash ... @@ -20,6 +14,7 @@ plugins=( <your-plugins-list>... frontend-search) ... ``` + ## Commands ## All command searches are accept only in format @@ -75,9 +70,11 @@ There are a few aliases presented as well: * `emberjs` A shorthand for `frontend emberjs` * `stackoverflow` A shorthand for `frontend stackoverflow` + ## Author **Wilson Mendes (willmendesneto)** ++ <https://plus.google.com/+WilsonMendes> + <https://twitter.com/willmendesneto> + <http://github.com/willmendesneto> diff --git a/plugins/frontend-search/_frontend-search.sh b/plugins/frontend-search/_frontend-search.sh new file mode 100644 index 000000000..252f21570 --- /dev/null +++ b/plugins/frontend-search/_frontend-search.sh @@ -0,0 +1,128 @@ +#compdef frontend + +zstyle ':completion:*:descriptions' format '%B%d%b' +zstyle ':completion::complete:frontend:*:commands' group-name commands +zstyle ':completion::complete:frontend:*:frontend_points' group-name frontend_points +zstyle ':completion::complete:frontend::' list-grouped + +zmodload zsh/mapfile + +function _frontend() { + local CONFIG=$HOME/.frontend-search + local ret=1 + + local -a commands + local -a frontend_points + + frontend_points=( "${(f)mapfile[$CONFIG]//$HOME/~}" ) + + commands=( + 'jquery: Search in jQuery website' + 'mdn: Search in MDN website' + 'compass: Search in COMPASS website' + 'html5please: Search in HTML5 Please website' + 'caniuse: Search in Can I Use website' + 'aurajs: Search in AuraJs website' + 'dartlang: Search in Dart website' + 'lodash: Search in Lo-Dash website' + 'qunit: Search in Qunit website' + 'fontello: Search in fontello website' + 'bootsnipp: Search in bootsnipp website' + 'cssflow: Search in cssflow website' + 'codepen: Search in codepen website' + 'unheap: Search in unheap website' + 'bem: Search in BEM website' + 'smacss: Search in SMACSS website' + 'angularjs: Search in Angular website' + 'reactjs: Search in React website' + 'emberjs: Search in Ember website' + 'stackoverflow: Search in StackOverflow website' + ) + + _arguments -C \ + '1: :->first_arg' \ + '2: :->second_arg' && ret=0 + + case $state in + first_arg) + _describe -t frontend_points "Warp points" frontend_points && ret=0 + _describe -t commands "Commands" commands && ret=0 + ;; + second_arg) + case $words[2] in + jquery) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + mdn) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + compass) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + html5please) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + caniuse) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + aurajs) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + dartlang) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + lodash) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + qunit) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + fontello) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + bootsnipp) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + cssflow) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + codepen) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + unheap) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + bem) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + smacss) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + angularjs) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + reactjs) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + emberjs) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + stackoverflow) + _describe -t points "Warp points" frontend_points && ret=0 + ;; + esac + ;; + esac + + return $ret +} + +_frontend "$@" + +# Local Variables: +# mode: Shell-Script +# sh-indentation: 2 +# indent-tabs-mode: nil +# sh-basic-offset: 2 +# End: +# vim: ft=zsh sw=2 ts=2 et From 5c9c373cd7944b514c22c292333700bea0408203 Mon Sep 17 00:00:00 2001 From: Brian Hartvigsen <brian.andrew@brianandjenny.com> Date: Tue, 28 Apr 2015 00:05:11 -0700 Subject: [PATCH 371/488] Fix minimal.zsh-theme's check for in_svn and add support for mercurial --- themes/minimal.zsh-theme | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/themes/minimal.zsh-theme b/themes/minimal.zsh-theme index a2a16031f..f79e795d9 100644 --- a/themes/minimal.zsh-theme +++ b/themes/minimal.zsh-theme @@ -6,13 +6,19 @@ ZSH_THEME_SVN_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX ZSH_THEME_SVN_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX ZSH_THEME_SVN_PROMPT_DIRTY=$ZSH_THEME_GIT_PROMPT_DIRTY ZSH_THEME_SVN_PROMPT_CLEAN=$ZSH_THEME_GIT_PROMPT_CLEAN +ZSH_THEME_HG_PROMPT_PREFIX=$ZSH_THEME_GIT_PROMPT_PREFIX +ZSH_THEME_HG_PROMPT_SUFFIX=$ZSH_THEME_GIT_PROMPT_SUFFIX +ZSH_THEME_HG_PROMPT_DIRTY=$ZSH_THEME_GIT_PROMPT_DIRTY +ZSH_THEME_HG_PROMPT_CLEAN=$ZSH_THEME_GIT_PROMPT_CLEAN vcs_status() { - if [[ ( $(whence in_svn) != "" ) && ( $(in_svn) == 1 ) ]]; then + if [[ $(whence in_svn) != "" ]] && in_svn; then svn_prompt_info + elif [[ $(whence in_hg) != "" ]] && in_hg; then + hg_prompt_info else git_prompt_info fi } -PROMPT='%2~ $(vcs_status)»%b ' \ No newline at end of file +PROMPT='%2~ $(vcs_status)»%b ' From 2dbf9951d92e1f63672da3721b23b1d53b5cfa31 Mon Sep 17 00:00:00 2001 From: Kennedy Oliveira <kennedy.oliveira@outlook.com> Date: Wed, 29 Apr 2015 15:17:11 -0300 Subject: [PATCH 372/488] Fixing some issues where show repeated weird values, and fixed commands that need the container autocomplete without being running, like start, now it autocompletes showing all the containers so you can start without knowing the right name --- plugins/docker/_docker | 21 ++++++++++++++++----- 1 file changed, 16 insertions(+), 5 deletions(-) diff --git a/plugins/docker/_docker b/plugins/docker/_docker index aadc9c61d..fd459a0ca 100644 --- a/plugins/docker/_docker +++ b/plugins/docker/_docker @@ -12,7 +12,16 @@ __docker_containers() { declare -a cont_cmd cont_cmd=($(docker ps | awk 'NR>1{print $NF":[CON("$1")"$2"("$3")]"}')) - _describe 'containers' cont_cmd + if [[ 'X$cont_cmd' != 'X' ]] + _describe 'containers' cont_cmd +} + +# Output a selectable list of all containers, even not running +__docker_all_containers() { + declare -a cont_cmd + cont_cmd=($(docker ps -a | awk 'NR>1{print $NF":[CON("$1")"$2"("$3")]"}')) + if [[ 'X$cont_cmd' != 'X' ]] + _describe 'containers' cont_cmd } # output a selectable list of all docker images @@ -57,7 +66,7 @@ __diff() { __docker_containers } -__events() { +__events() { _arguments \ '--since=[Show previously created events and then stream.]' } @@ -98,10 +107,12 @@ __insert() { __inspect() { __docker_images - __docker_containers + __docker_all_containers } __kill() { + _arguments \ + '(-s,--signal=)'{-s,--signal=}'[KILL Signal]' __docker_containers } @@ -162,7 +173,7 @@ __rm() { '(-f,--force=)'{-f,--force=}'[Force removal of running container]' \ '(-l,--link=)'{-l,--link=}'[Remove the specified link and not the underlying container]' \ '(-v,--volumes=)'{-v,--volumes=}'[Remove the volumes associated to the container]' - __docker_containers + __docker_all_containers } __rmi() { @@ -216,7 +227,7 @@ __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]' - __docker_containers + __docker_all_containers } __stats() { From 66052e2d07fc4e6205bf7f14adfa12d53d9ad487 Mon Sep 17 00:00:00 2001 From: Jordan Klassen <jordan@klassen.me.uk> Date: Wed, 29 Apr 2015 15:37:39 -0700 Subject: [PATCH 373/488] Add hyphen insensitivity --- lib/completion.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index 4b1bb0a62..452c0dfe7 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -15,7 +15,12 @@ if [ "x$CASE_SENSITIVE" = "xtrue" ]; then zstyle ':completion:*' matcher-list 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' unset CASE_SENSITIVE else - zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + if [ "x$HYPHEN_INSENSITIVE" = "xtrue" ]; then + zstyle ':completion:*' matcher-list 'm:{a-zA-Z-_}={A-Za-z_-}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + unset HYPHEN_INSENSITIVE + else + zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|[._-]=* r:|=*' 'l:|=* r:|=*' + fi fi zstyle ':completion:*' list-colors '' From 8e8cdc0502fc35844975548fa268e7ed027d00b7 Mon Sep 17 00:00:00 2001 From: Cooper Maruyama <cooperm@susteen.com> Date: Fri, 1 May 2015 01:34:20 -0700 Subject: [PATCH 374/488] Add coffeescript aliases: cf, cfc, cfp cf: compile and show output cfc: compile & copy cfp: compile from pasteboard & print --- plugins/coffee/coffee.plugin.zsh | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 plugins/coffee/coffee.plugin.zsh diff --git a/plugins/coffee/coffee.plugin.zsh b/plugins/coffee/coffee.plugin.zsh new file mode 100644 index 000000000..96393f66d --- /dev/null +++ b/plugins/coffee/coffee.plugin.zsh @@ -0,0 +1,13 @@ +#!/bin/zsh + +# compile a string of coffeescript and print to output +cf () { + coffee -peb $1 +} +# compile & copy to clipboard +cfc () { + cf $1 | tail -n +2 | pbcopy +} + +# compile from pasteboard & print +alias cfp='coffeeMe "$(pbpaste)"' From a315ddc075e6a6a4b9dbdcaced0fa08349597223 Mon Sep 17 00:00:00 2001 From: Cooper Maruyama <cooperm@susteen.com> Date: Fri, 1 May 2015 01:37:55 -0700 Subject: [PATCH 375/488] typofix --- plugins/coffee/coffee.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/coffee/coffee.plugin.zsh b/plugins/coffee/coffee.plugin.zsh index 96393f66d..be34b03c2 100644 --- a/plugins/coffee/coffee.plugin.zsh +++ b/plugins/coffee/coffee.plugin.zsh @@ -6,7 +6,7 @@ cf () { } # compile & copy to clipboard cfc () { - cf $1 | tail -n +2 | pbcopy + cf $1 | pbcopy } # compile from pasteboard & print From 45121611fe00a27155aa4259c31761224d4ccef4 Mon Sep 17 00:00:00 2001 From: Jordan Klassen <jordan@klassen.me.uk> Date: Fri, 1 May 2015 15:10:45 -0700 Subject: [PATCH 376/488] Update template zshrc with HYPHEN_INSENSITIVE --- templates/zshrc.zsh-template | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/templates/zshrc.zsh-template b/templates/zshrc.zsh-template index 763288dfd..44e8b0d1b 100644 --- a/templates/zshrc.zsh-template +++ b/templates/zshrc.zsh-template @@ -10,6 +10,10 @@ ZSH_THEME="robbyrussell" # Uncomment the following line to use case-sensitive completion. # CASE_SENSITIVE="true" +# Uncomment the following line to use hyphen-insensitive completion. Case +# sensitive completion must be off. _ and - will be interchangeable. +# HYPHEN_INSENSITIVE="true" + # Uncomment the following line to disable bi-weekly auto-update checks. # DISABLE_AUTO_UPDATE="true" From 24552f02259829428c412a88729de4cfd0b7ba8b Mon Sep 17 00:00:00 2001 From: Cooper Maruyama <cooperm@susteen.com> Date: Sat, 2 May 2015 07:14:21 -0700 Subject: [PATCH 377/488] Add readme and add new alias cfpc: paste+compile+copy --- plugins/coffee/README | 31 +++++++++++++++++++++++++++++++ plugins/coffee/coffee.plugin.zsh | 3 +++ 2 files changed, 34 insertions(+) create mode 100644 plugins/coffee/README diff --git a/plugins/coffee/README b/plugins/coffee/README new file mode 100644 index 000000000..d0e7bbe74 --- /dev/null +++ b/plugins/coffee/README @@ -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 be 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 index be34b03c2..1a7bedd87 100644 --- a/plugins/coffee/coffee.plugin.zsh +++ b/plugins/coffee/coffee.plugin.zsh @@ -11,3 +11,6 @@ cfc () { # compile from pasteboard & print alias cfp='coffeeMe "$(pbpaste)"' + +# compile from pasteboard and copy to clipboard +alias cfpc='cfp | pbcopy' From d80918bf981d5df3f192346b44c0c35636ee7b2b Mon Sep 17 00:00:00 2001 From: Cooper Maruyama <cooperm@susteen.com> Date: Sat, 2 May 2015 07:16:27 -0700 Subject: [PATCH 378/488] add markdown extension to README --- plugins/coffee/{README => README.md} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename plugins/coffee/{README => README.md} (100%) diff --git a/plugins/coffee/README b/plugins/coffee/README.md similarity index 100% rename from plugins/coffee/README rename to plugins/coffee/README.md From 83cf909ad621938d3dc64c1f28155e819e1b6ea5 Mon Sep 17 00:00:00 2001 From: Toni Ristola <toni.ristola@gofore.com> Date: Mon, 4 May 2015 07:47:02 +0300 Subject: [PATCH 379/488] Added aliases for docker compose --- plugins/docker-compose/README.md | 1 + plugins/docker-compose/docker-compose.plugin.zsh | 14 ++++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 plugins/docker-compose/README.md create mode 100644 plugins/docker-compose/docker-compose.plugin.zsh diff --git a/plugins/docker-compose/README.md b/plugins/docker-compose/README.md new file mode 100644 index 000000000..77b98f30d --- /dev/null +++ b/plugins/docker-compose/README.md @@ -0,0 +1 @@ +# Docker-compose plugin for oh my zsh diff --git a/plugins/docker-compose/docker-compose.plugin.zsh b/plugins/docker-compose/docker-compose.plugin.zsh new file mode 100644 index 000000000..08500408d --- /dev/null +++ b/plugins/docker-compose/docker-compose.plugin.zsh @@ -0,0 +1,14 @@ +# Authors: +# https://github.com/tristola +# +# Docker-compose related zsh aliases + +# Aliases ################################################################### + +alias dcup='docker-compose up' +alias dcb='docker-compose build' +alias dcrm='docker-compose rm' +alias dcps='docker-compose ps' +alias dcstop='docker-compose stop' +alias dcrestart='docker-compose restart' + From d60d4f68aa75cc21a0fc771020fdbd578b872d75 Mon Sep 17 00:00:00 2001 From: Satoshi Ohmori <sachin21dev@gmail.com> Date: Tue, 5 May 2015 14:27:59 +0900 Subject: [PATCH 380/488] Add alias of bundle clean --- plugins/bundler/bundler.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/bundler/bundler.plugin.zsh b/plugins/bundler/bundler.plugin.zsh index ba3d3f623..dfff6956e 100644 --- a/plugins/bundler/bundler.plugin.zsh +++ b/plugins/bundler/bundler.plugin.zsh @@ -4,6 +4,7 @@ alias bp="bundle package" alias bo="bundle open" alias bu="bundle update" alias bi="bundle_install" +alias bcn="bundle clean" bundled_commands=( annotate From 03b8c199e591de73de3824fc6b366138964c1ba6 Mon Sep 17 00:00:00 2001 From: Pablo Tamarit <pablo.tmrt@gmail.com> Date: Tue, 5 May 2015 19:49:19 +0200 Subject: [PATCH 381/488] Fix 'chsh' by checking '/etc/shells' instead of using 'which' fix test for chsh in install in case $SHELL is zsh but not the last one in /etc/shells fixes #3026 fixes #3779 fixes #3780 --- tools/install.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index bd4c55749..c83a6f23d 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -32,10 +32,12 @@ sed -i -e "/export PATH=/ c\\ export PATH=\"$PATH\" " ~/.zshrc -if [ "$SHELL" != "$(which zsh)" ]; then +TEST_CURRENT_SHELL=$(expr "$SHELL" : '.*/\(.*\)') +if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then echo "\033[0;34mTime to change your default shell to zsh!\033[0m" - chsh -s `which zsh` + chsh -s $(grep /zsh$ /etc/shells | tail -1) fi +unset TEST_CURRENT_SHELL echo "\033[0;32m"' __ __ '"\033[0m" echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m" From 9a5e1a055201409ebe9e1ab97cd8c3fe52b990f5 Mon Sep 17 00:00:00 2001 From: Aleks <aleks@s-ko.net> Date: Wed, 6 May 2015 10:26:05 +0100 Subject: [PATCH 382/488] Use $EDITOR --- plugins/common-aliases/common-aliases.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/common-aliases/common-aliases.plugin.zsh b/plugins/common-aliases/common-aliases.plugin.zsh index e3830adcf..fc19d73c3 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} ' From 5b75cc7880de1931a0507800d90eb77ed659fa46 Mon Sep 17 00:00:00 2001 From: ncanceill <nicolas.canceill@ens-cachan.org> Date: Fri, 12 Jul 2013 15:26:04 +0200 Subject: [PATCH 383/488] Many updates to git plugin (see #2790) --- plugins/git/README.md | 10 +- plugins/git/_git-branch | 83 --------- plugins/git/_git-remote | 74 -------- plugins/git/git.plugin.zsh | 335 ++++++++++++++++++++----------------- 4 files changed, 188 insertions(+), 314 deletions(-) delete mode 100644 plugins/git/_git-branch delete mode 100644 plugins/git/_git-remote 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..e42e09688 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -1,177 +1,202 @@ -# Aliases -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 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 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' +# Query/use custom command for `git`. +local git_cmd +zstyle -s ":vcs_info:git:*:-all-" "command" git_cmd +: ${git_cmd:=git} -# 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 gpoat='git push origin --all && git push origin --tags' -alias gmt='git mergetool --no-prompt' -compdef _git gmt=git-mergetool - -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 ".")' - -# Git and svn mix -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 +# Functions +# + +# The current branch name # Usage example: git pull origin $(current_branch) -# +# Using '--quiet' with 'symbolic-ref' will not cause a fatal error (128) if +# it's not a symbolic ref, but in a Git repo. function current_branch() { - ref=$(git symbolic-ref HEAD 2> /dev/null) || \ - ref=$(git rev-parse --short HEAD 2> /dev/null) || return + local ref + ref=$($git_cmd symbolic-ref --quiet HEAD 2> /dev/null) + local ret=$? + if [[ $ret != 0 ]]; then + [[ $ret == 128 ]] && return # no git repo. + ref=$($git_cmd rev-parse --short HEAD 2> /dev/null) || return + fi echo ${ref#refs/heads/} } - +# The list of remotes 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) + if ! $git_cmd rev-parse --is-inside-work-tree &> /dev/null; then + return + fi + echo $($git_cmd remote -v | cut -d':' -f 2) } - -# 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 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 +# 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 } -# 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' -# these alias ignore changes to file +# +# Aliases +# (sorted alphabetically) +# + +alias g='git' + +alias ga='git add' + +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' +alias gc!='git commit -v --amend' +alias gca='git commit -v -a' +alias gca!='git commit -v -a --amend' +alias gcan!='git commit -v -a -s --no-edit --amend' +alias gcb='git checkout -b' +alias gcf='git config --list' +alias gcl='git clone --recursive' +alias gclean='git reset --hard && git clean -dfx' +alias gcm='git checkout master' +alias gcmsg='git commit -m' +alias gco='git checkout' +alias gcount='git shortlog -sn' +compdef gcount=git +alias gcp='git cherry-pick' +alias gcs='git commit -S' + +alias gd='git diff' +alias gdc='git diff --cached' +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 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' +ggf() { +[[ "$#" != 1 ]] && b="$(current_branch)" +git push --force origin "${b:=$1}" +} +compdef _git ggf=git-checkout +ggl() { +[[ "$#" != 1 ]] && b="$(current_branch)" +git pull origin "${b:=$1}" +} +compdef _git ggl=git-checkout +ggp() { +[[ "$#" != 1 ]] && b="$(current_branch)" +git push origin "${b:=$1}" +} +compdef _git ggp=git-checkout +ggpnp() { +ggl "$1" && ggp "$1" +} +compdef _git ggpnp=git-checkout +alias ggsup='git branch --set-upstream-to=origin/$(current_branch)' +ggu() { +[[ "$#" != 1 ]] && b="$(current_branch)" +git pull --rebase origin "${b:=$1}" +} +compdef _git ggu=git-checkout + 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 git-svn-dcommit-push='git svn dcommit && git push github master:svntrunk' +compdef git-svn-dcommit-push=git + +alias gk='\gitk --all --branches' +compdef _git gk='gitk' +alias gke='\gitk --all $(git log -g --pretty=format:%h)' +compdef _git gke='gitk' + +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 + +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 gunignore='git update-index --no-assume-unchanged' +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 gvt='git verify-tag' + +alias gwch='git whatchanged -p --abbrev-commit --pretty=medium' +alias gwip='git add -A; git rm $(git ls-files --deleted); git commit -m "--wip--"' From de769058b9bb846cdbda8eadfde7ebc1bad3993d Mon Sep 17 00:00:00 2001 From: Andrew Dwyer <andrewrdwyer@gmail.com> Date: Sat, 9 May 2015 14:33:01 +0930 Subject: [PATCH 384/488] Fix awk command. \s only working in gawk --- plugins/n98-magerun/n98-magerun.plugin.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/n98-magerun/n98-magerun.plugin.zsh b/plugins/n98-magerun/n98-magerun.plugin.zsh index e4b0d6885..3a29f39b3 100755 --- a/plugins/n98-magerun/n98-magerun.plugin.zsh +++ b/plugins/n98-magerun/n98-magerun.plugin.zsh @@ -7,7 +7,7 @@ # n98-magerun basic command completion _n98_magerun_get_command_list () { - n98-magerun.phar --no-ansi | sed "1,/Available commands/d" | awk '/^\s+[a-z]+/ { print $1 }' + n98-magerun.phar --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z\-:]+/ { print $1 }' } _n98_magerun () { @@ -15,9 +15,10 @@ _n98_magerun () { } compdef _n98_magerun n98-magerun.phar +compdef _n98_magerun n98-magerun # Aliases -alias n98-magerun='n98-magerun.phar' +alias n98='n98-magerun.phar' alias mage='n98-magerun.phar' alias magefl='n98-magerun.phar cache:flush' From 2449e41248f03f4313e67294883cb928d597ad27 Mon Sep 17 00:00:00 2001 From: Andrew Dwyer <andrewrdwyer@gmail.com> Date: Sat, 9 May 2015 15:43:30 +0930 Subject: [PATCH 385/488] Add file completion as optional argument --- plugins/n98-magerun/n98-magerun.plugin.zsh | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/plugins/n98-magerun/n98-magerun.plugin.zsh b/plugins/n98-magerun/n98-magerun.plugin.zsh index 3a29f39b3..bfcf27b98 100755 --- a/plugins/n98-magerun/n98-magerun.plugin.zsh +++ b/plugins/n98-magerun/n98-magerun.plugin.zsh @@ -7,11 +7,19 @@ # n98-magerun basic command completion _n98_magerun_get_command_list () { - n98-magerun.phar --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z\-:]+/ { print $1 }' + $_comp_command1 --no-ansi | sed "1,/Available commands/d" | awk '/^ +[a-z\-:]+/ { print $1 }' } + _n98_magerun () { - compadd `_n98_magerun_get_command_list` + _arguments '1: :->command' '*:optional arg:_files' + + case $state in + command) + compadd $(_n98_magerun_get_command_list) + ;; + *) + esac } compdef _n98_magerun n98-magerun.phar From 4d0aca48dace8cc4952aeb3c266837b993133a1c Mon Sep 17 00:00:00 2001 From: Diego Rabatone Oliveira <diraol@diraol.eng.br> Date: Sat, 9 May 2015 18:46:54 -0300 Subject: [PATCH 386/488] Differing upgrade and safe-upgrade Improving with "safe-upgrade" for aptitude and "upgrade" for apt-get --- plugins/debian/debian.plugin.zsh | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) 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" From 6504a2d386570213a3a1b1e9b371622b1f74ab2f Mon Sep 17 00:00:00 2001 From: Jad Bitar <jadbitar@mac.com> Date: Tue, 12 May 2015 13:23:05 -0400 Subject: [PATCH 387/488] Add CakePHP3 plugin --- plugins/cakephp3/cakephp3.plugin.zsh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plugins/cakephp3/cakephp3.plugin.zsh 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' From 7b478d75a3a0db466e78b6e46a0e468d64354618 Mon Sep 17 00:00:00 2001 From: epelletier <enguerrand.pelletier@supinfo.com> Date: Thu, 21 May 2015 17:34:24 +0200 Subject: [PATCH 388/488] Detect the .venv in any parent directory of the current directory --- plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index 5faa1a823..b3a3b56d5 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -29,8 +29,11 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then if [ ! $WORKON_CWD ]; then WORKON_CWD=1 # Check if this is a Git repo - PROJECT_ROOT=`git rev-parse --show-toplevel 2> /dev/null` - if (( $? != 0 )); then + PROJECT_ROOT=`pwd` + while [[ "$PROJECT_ROOT" != "/" && ! -e "$PROJECT_ROOT/.venv" ]]; do + PROJECT_ROOT=`realpath $PROJECT_ROOT/..` + done + if [[ "$PROJECT_ROOT" == "/" ]]; then PROJECT_ROOT="." fi # Check for virtualenv name override From 743be91b207d4617e68b04a43311438652cec63d Mon Sep 17 00:00:00 2001 From: Xin Li <delphij@FreeBSD.org> Date: Thu, 21 May 2015 12:34:04 -0700 Subject: [PATCH 389/488] Don't leak extendedglob to global environment. --- plugins/history-substring-search/history-substring-search.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/history-substring-search/history-substring-search.zsh b/plugins/history-substring-search/history-substring-search.zsh index 22f03dd6d..65f0750db 100644 --- a/plugins/history-substring-search/history-substring-search.zsh +++ b/plugins/history-substring-search/history-substring-search.zsh @@ -175,7 +175,6 @@ fi # implementation details #----------------------------------------------------------------------------- -setopt extendedglob zmodload -F zsh/parameter # @@ -284,6 +283,7 @@ if [[ $+functions[_zsh_highlight] -eq 0 ]]; then fi function _history-substring-search-begin() { + setopt localoptions extendedglob _history_substring_search_move_cursor_eol=false _history_substring_search_query_highlight= @@ -350,6 +350,7 @@ function _history-substring-search-begin() { } function _history-substring-search-end() { + setopt localoptions extendedglob _history_substring_search_result=$BUFFER # move the cursor to the end of the command line From 0c8cb11d44d4ed4f458907cc19a0896416590587 Mon Sep 17 00:00:00 2001 From: GunfighterJ <joseph.jenniges@gmail.com> Date: Mon, 25 May 2015 16:02:26 -0500 Subject: [PATCH 390/488] Add sublime text 3 paths to check list --- plugins/sublime/sublime.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh index 38a7596fd..ef76826cf 100644 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -8,6 +8,8 @@ if [[ $('uname') == 'Linux' ]]; then "/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 From 7416018d1c51ae2ff008538c98e6f9b19b752bc5 Mon Sep 17 00:00:00 2001 From: Nicolas Brousse <pro@nicolas-brousse.fr> Date: Sun, 31 May 2015 19:34:01 +0200 Subject: [PATCH 391/488] Create new aliases for homebrew plugin --- plugins/brew/brew.plugin.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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' From 7f232f69fe8140a919759ea3b0811a71247f11e1 Mon Sep 17 00:00:00 2001 From: william <mkwmms@users.noreply.github.com> Date: Tue, 2 Jun 2015 14:43:38 -0600 Subject: [PATCH 392/488] Respect $ZSH_CACHE_DIR when creating fasd's cache --- plugins/fasd/fasd.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/fasd/fasd.plugin.zsh b/plugins/fasd/fasd.plugin.zsh index 8ad43fc23..472ab2b0f 100644 --- a/plugins/fasd/fasd.plugin.zsh +++ b/plugins/fasd/fasd.plugin.zsh @@ -1,5 +1,5 @@ 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 From cc639287d2fbb3e5b032a70b2f5fb671ee9e95ff Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Sat, 28 Feb 2015 13:31:54 +0100 Subject: [PATCH 393/488] Round 3 of batch-closing obsolete issues From cffeefde903149df8ef48224fedf5205cb2497c3 Mon Sep 17 00:00:00 2001 From: Lucas Braun <lucas.braun@annkissam.com> Date: Thu, 4 Jun 2015 11:00:21 -0400 Subject: [PATCH 394/488] Add installation instructions to README Update README formatting --- plugins/zeus/README.md | 15 +++++++++------ 1 file changed, 9 insertions(+), 6 deletions(-) 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)`) From 3a77433cea136ff9d9a383866f191f66169468c9 Mon Sep 17 00:00:00 2001 From: Manfred Touron <m@42.am> Date: Tue, 9 Jun 2015 11:29:37 +0200 Subject: [PATCH 395/488] Add new boot2docker options --- plugins/boot2docker/_boot2docker | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/boot2docker/_boot2docker b/plugins/boot2docker/_boot2docker index baa08b26d..3116bd14c 100644 --- a/plugins/boot2docker/_boot2docker +++ b/plugins/boot2docker/_boot2docker @@ -35,11 +35,14 @@ _1st_arguments=( _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.]' \ From 5770ad51f963af7b75af03fabc691492137277ef Mon Sep 17 00:00:00 2001 From: Werner Buck <wernerbuck@gmail.com> Date: Tue, 9 Jun 2015 16:52:40 +0200 Subject: [PATCH 396/488] Set AWS_PROFILE and use existing RPROMPT --- plugins/aws/aws.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index 0ae18dd56..6d93d530d 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -13,7 +13,8 @@ function agp { } function asp { 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/')) From b7d041c627ab9e40c08a51932afe2d61e840de09 Mon Sep 17 00:00:00 2001 From: Rodrigo Argumedo <rodrigo.argumedo@outlook.com> Date: Tue, 9 Jun 2015 13:41:34 -0600 Subject: [PATCH 397/488] Add rdrs method to reset the database(s) --- plugins/rails/rails.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/rails/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh index 5ed96f8cd..d3b51d8af 100644 --- a/plugins/rails/rails.plugin.zsh +++ b/plugins/rails/rails.plugin.zsh @@ -50,6 +50,7 @@ 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' From 6a1b8320fe9f087179c9ebf092bd17a782127d96 Mon Sep 17 00:00:00 2001 From: HeroCC <HeroCC@users.noreply.github.com> Date: Mon, 20 Apr 2015 11:24:05 -0400 Subject: [PATCH 398/488] No input for Update Check defaults to Yes --- tools/check_for_upgrade.sh | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/tools/check_for_upgrade.sh b/tools/check_for_upgrade.sh index b2b356e0c..5afd83c1e 100644 --- a/tools/check_for_upgrade.sh +++ b/tools/check_for_upgrade.sh @@ -41,10 +41,9 @@ then then _upgrade_zsh else - echo "[Oh My Zsh] Would you like to check for updates?" - echo "Type Y to update oh-my-zsh: \c" + echo "[Oh My Zsh] Would you like to check for updates? [Y/n]: \c" read line - if [ "$line" = Y ] || [ "$line" = y ]; then + if [ "$line" = Y ] || [ "$line" = y ] || [ -z "$line" ]; then _upgrade_zsh else _update_zsh_update From a2f782e5f3fd3d65dfb34b7f22ec68234b2774a3 Mon Sep 17 00:00:00 2001 From: Alexandre Joly <alexandre.joly@mekanics.ch> Date: Wed, 21 May 2014 09:55:26 +0200 Subject: [PATCH 399/488] updated the command list to the latest cocoapod version (0.33.0) version bumped --- plugins/pod/_pod | 275 ++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 249 insertions(+), 26 deletions(-) diff --git a/plugins/pod/_pod b/plugins/pod/_pod index 8c0f4460f..eb7be52e9 100644 --- a/plugins/pod/_pod +++ b/plugins/pod/_pod @@ -3,29 +3,31 @@ # ----------------------------------------------------------------------------- # FILE: _pod -# DESCRIPTION: Cocoapods (0.27.1) autocomplete plugin for Oh-My-Zsh +# DESCRIPTION: Cocoapods (0.33.0) autocomplete plugin for Oh-My-Zsh # http://cocoapods.org # AUTHOR: Alexandre Joly (alexandre.joly@mekanics.ch) # GITHUB: https://github.com/mekanics # TWITTER: @jolyAlexandre -# VERSION: 0.0.3 -# LICENSE: MIT +# VERSION: 0.0.4 # ----------------------------------------------------------------------------- local -a _1st_arguments _1st_arguments=( - 'help:Show help for the given command' - 'init:Generate a Podfile for the current directory' + 'help:Show help for the given command.' + 'init:Generate a Podfile for the current directory.' 'install:Install project dependencies' 'ipc:Inter-process communication' + 'lib:Develop pods' 'list:List pods' 'outdated:Show outdated project dependencies' - 'podfile-info:Shows information on installed Pods' - 'push:Push new specifications to a spec-repo' + '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 trunk.cocoapods.org' + 'try:Try a Pod!' 'update:Update outdated project dependencies' ) @@ -33,6 +35,7 @@ local -a _repo_arguments _repo_arguments=( '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' ) @@ -51,24 +54,56 @@ _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' + 'spec:Converts a podspec to JSON' 'update-search-index:Updates the search index' ) +local -a _lib_arguments +_lib_arguments=( + 'create:Creates a new Pod' + 'lint:Validates a Pod' +) + +local -a _plugins_arguments +_plugins_arguments=( + 'create:Creates a new plugin' + 'list:List all known plugins' + 'search:Search for known plugins' +) + local -a _list_arguments _list_arguments=( 'new:Lists pods introduced in the master spec-repo since the last check' ) +local -a _trunk_arguments +_trunk_arguments=( + 'add-owner:Add an owner to a pod' + 'me:Display information about your sessions' + 'push:Publish a podspec' + 'register:Manage sessions' +) + +local -a _trunk_me_arguments +_trunk_me_arguments=( + 'clean-sessions:Remove sessions' +) + 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]' \ + '(--no-ansi)--no-ansi[Show output without ANSI codes]' \ '(--help)--help[Show help banner of specified command]' ) +local -a _root_options +_root_options=( + '(--version)--version[Show the version of CocoaPods]' \ + '(--completion-script)--completion-script[Print the auto-completion script]' + +) + local -a _install_options _install_options=( '(--no-clean)--no-clean[Leave SCM dirs like `.git` and `.svn` intact after downloading]' \ @@ -76,6 +111,15 @@ _install_options=( '(--no-repo-update)--no-repo-update[Skip running `pod repo update` before install]' ) +local -a _lib_lint_options +_lib_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]' \ + '(--subspec=NAME)--subspec=[Lint validates only the given subspec]' \ + '(--no-subspecs)--no-subspecs[Lint skips validation of subspecs]' \ + '(--no-clean)--no-clean[Lint leaves the build directory intact for inspection]' +) + local -a _update_options _update_options=( '(--no-clean)--no-clean[Leave SCM dirs like `.git` and `.svn intact after downloading]' \ @@ -93,7 +137,8 @@ _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]' + '(--osx)--osx[Restricts the search to Pods supported on OS X]' \ + '(--web)--web[Searches on cocoapods.org]' ) local -a _list_options @@ -101,20 +146,23 @@ _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 _plugins_search_options +_plugins_search_options=( + '(--full)--full[Search by name, author, and description]' ) -local -a _push_options -_push_options=( +local -a _repo_push_options +_repo_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_add_options +_repo_add_options=( + '(--shallow)--shallow[Create a shallow clone (fast clone, but no push capabilities)]' +) + local -a _repo_lint_options _repo_lint_options=( '(--only-errors)--only-errors[Lint presents only the errors]' @@ -122,6 +170,7 @@ _repo_lint_options=( local -a _setup_options _setup_options=( + '(--no-shallow)--no-shallow[Clone full history so push will work]' '(--push)--push[Use this option to enable push access once granted]' ) @@ -129,6 +178,8 @@ 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]' \ + '(--subspec=NAME)--subspec=[Lint validates only the given subspec]' \ + '(--no-subspecs)--no-subspecs[Lint skips validation of subspecs]' \ '(--no-clean)--no-clean[Lint leaves the build directory intact for inspection]' \ '*:script or directory:_files' ) @@ -148,6 +199,11 @@ _spec_edit_options=( '(--show-all)--show-all[Pick which spec to edit from all available versions of the given podspec]' ) +local -a _trunk_register_options +_trunk_register_options=( + '(--description=DESCRIPTION)--description=[An arbitrary description to easily identify your session later on.]' +) + __first_command_list () { @@ -192,9 +248,17 @@ __pod-repo() { ':feature:__repo_list' ;; + (push) + _arguments \ + $_inherited_options \ + $_repo_push_options \ + ':feature:__repo_list' + ;; + (add) _arguments \ - $_inherited_options + $_inherited_options \ + $_repo_add_options (remove) _arguments \ @@ -211,6 +275,7 @@ __pod-spec() { typeset -A opt_args _arguments -C \ + $_inherited_options \ ':command:->command' \ '*::options:->options' @@ -278,6 +343,145 @@ __pod-ipc() { esac } +__pod-lib() { + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + ':command:->command' \ + '*::options:->options' + + case $state in + (command) + _describe -t commands "pod lib" _lib_arguments + return + ;; + + (options) + case $line[1] in + (create) + _arguments \ + $_inherited_options + ;; + + (lint) + _arguments \ + $_inherited_options \ + $_lib_lint_options + ;; + esac + return + ;; + esac +} + +__pod-plugins() { + 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 plugins" _plugins_arguments + return + ;; + + (options) + case $line[1] in + (create) + _arguments \ + $_inherited_options + ;; + + (list) + _arguments \ + $_inherited_options + ;; + + (search) + _arguments \ + $_inherited_options \ + $_plugins_search_options + ;; + esac + return + ;; + esac +} + +__pod-trunk() { + 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 trunk" _trunk_arguments + return + ;; + + (options) + case $line[1] in + (add-owner) + _arguments \ + $_inherited_options + ;; + + (me) + __pod-trunk-me + ;; + + (push) + _arguments \ + $_inherited_options + ;; + + (register) + _arguments \ + $_inherited_options \ + $_trunk_register_options + ;; + esac + return + ;; + esac +} + +__pod-trunk-me() { + 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 trunk me" _trunk_me_arguments + return + ;; + + (options) + case $line[1] in + (clean-sessions) + _arguments \ + $_inherited_options + ;; + esac + return + ;; + esac +} + __pod-list() { local curcontext="$curcontext" state line typeset -A opt_args @@ -314,6 +518,9 @@ _arguments -C \ case $state in (command) _describe -t commands "pod" _1st_arguments + _arguments \ + $_inherited_options \ + $_root_options return ;; @@ -325,10 +532,15 @@ case $state in ':help:__first_command_list' ;; + (init) + _arguments \ + $_inherited_options + ;; + (push) _arguments \ $_inherited_options \ - $_push_options \ + $_repo_push_options \ ':repo:__repo_list' ;; @@ -344,6 +556,10 @@ case $state in __pod-ipc ;; + (lib) + __pod-lib + ;; + (list) __pod-list ;; @@ -366,18 +582,25 @@ case $state in $_outdated_options ;; + (plugins) + __pod-plugins + ;; + + (trunk) + __pod-trunk + ;; + + (try) + _arguments \ + $_inherited_options + ;; + (search) _arguments \ $_inherited_options \ $_search_options ;; - (podfile-info) - _arguments \ - $_inherited_options \ - $_podfile_info_options - ;; - (setup) _arguments \ $_inherited_options \ From d686f8a8d0aa4ee42be6a9663c05374344e2c649 Mon Sep 17 00:00:00 2001 From: Alexandre Joly <alexandre.joly@mekanics.ch> Date: Wed, 28 May 2014 16:16:30 +0200 Subject: [PATCH 400/488] generate with 'pod --completion-script' /cc thx to @ajmccall version bumped --- plugins/pod/_pod | 1260 ++++++++++++++++++++++++---------------------- 1 file changed, 665 insertions(+), 595 deletions(-) diff --git a/plugins/pod/_pod b/plugins/pod/_pod index eb7be52e9..508a47102 100644 --- a/plugins/pod/_pod +++ b/plugins/pod/_pod @@ -1,612 +1,682 @@ #compdef pod #autoload +# setopt XTRACE VERBOSE +# vim: ft=zsh sw=2 ts=2 et + # ----------------------------------------------------------------------------- # FILE: _pod -# DESCRIPTION: Cocoapods (0.33.0) 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.4 +# 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' - '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 trunk.cocoapods.org' - 'try:Try a Pod!' - 'update:Update outdated project dependencies' -) +local -a _subcommands +local -a _options -local -a _repo_arguments -_repo_arguments=( - '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' -) - -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 JSON' - 'update-search-index:Updates the search index' -) - -local -a _lib_arguments -_lib_arguments=( - 'create:Creates a new Pod' - 'lint:Validates a Pod' -) - -local -a _plugins_arguments -_plugins_arguments=( - 'create:Creates a new plugin' - 'list:List all known plugins' - 'search:Search for known plugins' -) - -local -a _list_arguments -_list_arguments=( - 'new:Lists pods introduced in the master spec-repo since the last check' -) - -local -a _trunk_arguments -_trunk_arguments=( - 'add-owner:Add an owner to a pod' - 'me:Display information about your sessions' - 'push:Publish a podspec' - 'register:Manage sessions' -) - -local -a _trunk_me_arguments -_trunk_me_arguments=( - 'clean-sessions:Remove sessions' -) - -local -a _inherited_options -_inherited_options=( - '(--silent)--silent[Show nothing]' \ - '(--verbose)--verbose[Show more debugging information]' \ - '(--no-ansi)--no-ansi[Show output without ANSI codes]' \ - '(--help)--help[Show help banner of specified command]' -) - -local -a _root_options -_root_options=( - '(--version)--version[Show the version of CocoaPods]' \ - '(--completion-script)--completion-script[Print the auto-completion script]' - -) - -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 _lib_lint_options -_lib_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]' \ - '(--subspec=NAME)--subspec=[Lint validates only the given subspec]' \ - '(--no-subspecs)--no-subspecs[Lint skips validation of subspecs]' \ - '(--no-clean)--no-clean[Lint leaves the build directory intact for inspection]' -) - -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]' \ - '(--web)--web[Searches on cocoapods.org]' -) - -local -a _list_options -_list_options=( - '(--update)--update[Run `pod repo update` before listing]' -) - -local -a _plugins_search_options -_plugins_search_options=( - '(--full)--full[Search by name, author, and description]' -) - -local -a _repo_push_options -_repo_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_add_options -_repo_add_options=( - '(--shallow)--shallow[Create a shallow clone (fast clone, but no push capabilities)]' -) - -local -a _repo_lint_options -_repo_lint_options=( - '(--only-errors)--only-errors[Lint presents only the errors]' -) - -local -a _setup_options -_setup_options=( - '(--no-shallow)--no-shallow[Clone full history so push will work]' - '(--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]' \ - '(--subspec=NAME)--subspec=[Lint validates only the given subspec]' \ - '(--no-subspecs)--no-subspecs[Lint skips validation of subspecs]' \ - '(--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]' -) - -local -a _trunk_register_options -_trunk_register_options=( - '(--description=DESCRIPTION)--description=[An arbitrary description to easily identify your session later on.]' -) - - -__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' - ;; - - (push) - _arguments \ - $_inherited_options \ - $_repo_push_options \ - ':feature:__repo_list' - ;; - - (add) - _arguments \ - $_inherited_options \ - $_repo_add_options - - (remove) - _arguments \ - $_inherited_options \ - ':feature:__repo_list' - ;; - esac - ;; +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 \ - $_inherited_options \ - ':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 - ;; - 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 - ;; - esac -} - -__pod-lib() { - local curcontext="$curcontext" state line - typeset -A opt_args - - _arguments -C \ - ':command:->command' \ - '*::options:->options' - - case $state in - (command) - _describe -t commands "pod lib" _lib_arguments - return - ;; - - (options) - case $line[1] in - (create) - _arguments \ - $_inherited_options - ;; - - (lint) - _arguments \ - $_inherited_options \ - $_lib_lint_options - ;; - esac - return - ;; - esac -} - -__pod-plugins() { - 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 plugins" _plugins_arguments - return - ;; - - (options) - case $line[1] in - (create) - _arguments \ - $_inherited_options - ;; - - (list) - _arguments \ - $_inherited_options - ;; - - (search) - _arguments \ - $_inherited_options \ - $_plugins_search_options - ;; - esac - return - ;; - esac -} - -__pod-trunk() { - 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 trunk" _trunk_arguments - return - ;; - - (options) - case $line[1] in - (add-owner) - _arguments \ - $_inherited_options - ;; - - (me) - __pod-trunk-me - ;; - - (push) - _arguments \ - $_inherited_options - ;; - - (register) - _arguments \ - $_inherited_options \ - $_trunk_register_options - ;; - esac - return - ;; - esac -} - -__pod-trunk-me() { - 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 trunk me" _trunk_me_arguments - return - ;; - - (options) - case $line[1] in - (clean-sessions) - _arguments \ - $_inherited_options - ;; - esac - return - ;; - 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 - ;; - 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 - _arguments \ - $_inherited_options \ - $_root_options - return ;; - - (options) - case $line[1] in - (help) - _arguments \ - $_inherited_options \ - ':help:__first_command_list' - ;; - - (init) - _arguments \ - $_inherited_options - ;; - - (push) - _arguments \ - $_inherited_options \ - $_repo_push_options \ - ':repo:__repo_list' - ;; - - (repo) - __pod-repo - ;; - - (spec) - __pod-spec - ;; - - (ipc) - __pod-ipc - ;; - - (lib) - __pod-lib - ;; - - (list) - __pod-list - ;; - - (install) - _arguments \ - $_inherited_options \ - $_install_options - ;; - - (update) - _arguments \ - $_inherited_options \ - $_update_options - ;; - - (outdated) - _arguments \ - $_inherited_options \ - $_outdated_options - ;; - - (plugins) - __pod-plugins - ;; - - (trunk) - __pod-trunk - ;; - - (try) - _arguments \ - $_inherited_options - ;; - - (search) - _arguments \ - $_inherited_options \ - $_search_options - ;; - - (setup) - _arguments \ - $_inherited_options \ - $_setup_options - ;; - + 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 ;; + 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 + ;; + 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 + ;; + 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 From a98501d2ce76152f1601aad0d2be23fcda230c0a Mon Sep 17 00:00:00 2001 From: Mark Mendoza <mendoza.mark.a@gmail.com> Date: Mon, 20 Apr 2015 01:29:16 -0700 Subject: [PATCH 401/488] Grep bug in Agnoster --- themes/agnoster.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 8c7be6e01..b8d0b5872 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -126,7 +126,7 @@ prompt_hg() { if `hg st | grep -q "^\?"`; then prompt_segment red black st='±' - elif `hg st | grep -q "^(M|A)"`; then + elif `hg st | grep -q "^[MA]"`; then prompt_segment yellow black st='±' else From 3cc3084f5fadcd9fedb5f633e2e207e8150e9451 Mon Sep 17 00:00:00 2001 From: Andrew Janke <janke@pobox.com> Date: Wed, 18 Mar 2015 01:02:09 -0400 Subject: [PATCH 402/488] Fix typo in $VCS_CLEAN_COLOR in adben theme --- themes/adben.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/adben.zsh-theme b/themes/adben.zsh-theme index 212b823a5..e4774cf0e 100644 --- a/themes/adben.zsh-theme +++ b/themes/adben.zsh-theme @@ -42,7 +42,7 @@ GREEN_BASE_START="${PR_RESET}${PR_GREY}>${PR_RESET}${PR_GREEN}>${PR_BRIGHT_GREEN GREEN_START_P1="${PR_RESET}${GREEN_BASE_START}${PR_RESET} " DIVISION="${PR_RESET}${PR_RED} < ${PR_RESET}" VCS_DIRTY_COLOR="${PR_RESET}${PR_YELLOW}" -Vcs_CLEAN_COLOR="${PR_RESET}${PR_GREEN}" +VCS_CLEAN_COLOR="${PR_RESET}${PR_GREEN}" VCS_SUFIX_COLOR="${PR_RESET}${PR_RED}› ${PR_RESET}" # ########## COLOR ########### # ########## SVN ########### From 45e3f623cc5c80eff68449a7db66829bc08d9a18 Mon Sep 17 00:00:00 2001 From: liuxiang <liuxiang921@gmail.com> Date: Wed, 25 Feb 2015 10:45:13 +0800 Subject: [PATCH 403/488] Add README for httpie plugin --- plugins/httpie/README.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 plugins/httpie/README.md 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) From 729b19c0852b7efe7d9c63e08b676883794b90ec Mon Sep 17 00:00:00 2001 From: Wayne <waynelkh0@gmail.com> Date: Sun, 26 Apr 2015 03:52:00 +0800 Subject: [PATCH 404/488] Remove docker insert command Remove the docker insert command of autocomplete --- plugins/docker/_docker | 8 -------- 1 file changed, 8 deletions(-) diff --git a/plugins/docker/_docker b/plugins/docker/_docker index fd459a0ca..e95a22bfd 100644 --- a/plugins/docker/_docker +++ b/plugins/docker/_docker @@ -100,11 +100,6 @@ __info() { # no arguments } -__insert() { - __docker_images - _arguments '*:files:_files' -} - __inspect() { __docker_images __docker_all_containers @@ -278,7 +273,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" @@ -335,8 +329,6 @@ case "$words[1]" in __import ;; info) __info ;; - insert) - __insert ;; inspect) __inspect ;; kill) From de56943a0ee120fdc0ba9f2c3929f8bb1742e3b4 Mon Sep 17 00:00:00 2001 From: Samuel Parkinson <sam.parkinson@graze.com> Date: Wed, 2 Jul 2014 18:22:32 +0100 Subject: [PATCH 405/488] Improved the `_git_time_since_commit` function. Check for at least one commit using a `git log` limit of one. Improves the performance inside git repos with a large history. --- themes/avit.zsh-theme | 47 ++++++++++++++++++++----------------------- 1 file changed, 22 insertions(+), 25 deletions(-) diff --git a/themes/avit.zsh-theme b/themes/avit.zsh-theme index a21a9c8c4..65466b82f 100644 --- a/themes/avit.zsh-theme +++ b/themes/avit.zsh-theme @@ -38,34 +38,32 @@ function _ruby_version() { # Determine the time since last commit. If branch is clean, # use a neutral color, otherwise colors will vary according to time. function _git_time_since_commit() { - if git rev-parse --git-dir > /dev/null 2>&1; then - # Only proceed if there is actually a commit. - if [[ $(git log 2>&1 > /dev/null | grep -c "^fatal: bad default revision") == 0 ]]; then - # Get the last commit. - last_commit=$(git log --pretty=format:'%at' -1 2> /dev/null) - now=$(date +%s) - seconds_since_last_commit=$((now-last_commit)) +# Only proceed if there is actually a commit. + if git log -1 > /dev/null 2>&1; then + # Get the last commit. + last_commit=$(git log --pretty=format:'%at' -1 2> /dev/null) + now=$(date +%s) + seconds_since_last_commit=$((now-last_commit)) - # Totals - minutes=$((seconds_since_last_commit / 60)) - hours=$((seconds_since_last_commit/3600)) + # Totals + minutes=$((seconds_since_last_commit / 60)) + hours=$((seconds_since_last_commit/3600)) - # Sub-hours and sub-minutes - days=$((seconds_since_last_commit / 86400)) - sub_hours=$((hours % 24)) - sub_minutes=$((minutes % 60)) + # Sub-hours and sub-minutes + days=$((seconds_since_last_commit / 86400)) + sub_hours=$((hours % 24)) + sub_minutes=$((minutes % 60)) - if [ $hours -gt 24 ]; then - commit_age="${days}d" - elif [ $minutes -gt 60 ]; then - commit_age="${sub_hours}h${sub_minutes}m" - else - commit_age="${minutes}m" - fi - - color=$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL - echo "$color$commit_age%{$reset_color%}" + if [ $hours -gt 24 ]; then + commit_age="${days}d" + elif [ $minutes -gt 60 ]; then + commit_age="${sub_hours}h${sub_minutes}m" + else + commit_age="${minutes}m" fi + + color=$ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL + echo "$color$commit_age%{$reset_color%}" fi } @@ -99,4 +97,3 @@ ZSH_THEME_GIT_TIME_SINCE_COMMIT_NEUTRAL="%{$fg[grey]%}" export LSCOLORS="exfxcxdxbxegedabagacad" export LS_COLORS='di=34;40:ln=35;40:so=32;40:pi=33;40:ex=31;40:bd=34;46:cd=34;43:su=0;41:sg=0;46:tw=0;42:ow=0;43:' export GREP_COLOR='1;33' - From 8652fd64efe7bcf950494856fd10ef1f5627a9ea Mon Sep 17 00:00:00 2001 From: David Hartmann <dh@thesilverlogic.com> Date: Sun, 22 Jun 2014 03:10:53 +0200 Subject: [PATCH 406/488] added comment functionality added commenting functionality by appending 'm' after the issue key (regular JIRA shortcut) --- plugins/jira/jira.plugin.zsh | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index 4a36b882d..8ad60b8fe 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -49,6 +49,20 @@ open_jira_issue () { else $open_cmd "$jira_url/browse/$jira_prefix$1" fi + else + local addcomment='' + if [[ "$2" == "m" ]]; then + addcomment="#add-comment" + echo "Add comment to issue #$1" + else + echo "Opening issue #$1" + fi + + if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then + $open_cmd "$jira_url/issues/$1$addcomment" + else + $open_cmd "$jira_url/browse/$1$addcomment" + fi fi } From a28dbc83937cbe624ec726199b4bbe7b65b2b2a0 Mon Sep 17 00:00:00 2001 From: Matthew Hager <matthew@poeticsystems.com> Date: Sat, 21 Feb 2015 12:33:38 -0600 Subject: [PATCH 407/488] Move custon *.zsh file sourcing up so that they can load plugins and other things that come after. --- oh-my-zsh.sh | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index bc7a8e496..71716f77f 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -29,6 +29,11 @@ for config_file ($ZSH/lib/*.zsh); do source $config_file done +# Load all of your custom configurations from custom/ +for config_file ($ZSH_CUSTOM/*.zsh(N)); do + source $config_file +done +unset config_file is_plugin() { local base_dir=$1 @@ -72,12 +77,6 @@ for plugin ($plugins); do fi done -# Load all of your custom configurations from custom/ -for config_file ($ZSH_CUSTOM/*.zsh(N)); do - source $config_file -done -unset config_file - # Load the theme if [ "$ZSH_THEME" = "random" ]; then themes=($ZSH/themes/*zsh-theme) From 16535452829d36f5382b176216a9ad312b2be1e5 Mon Sep 17 00:00:00 2001 From: Tejas Bubane <tejas.bubane@infibeam.net> Date: Tue, 23 Dec 2014 12:48:09 +0530 Subject: [PATCH 408/488] Recognize comments by default. --- lib/misc.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/misc.zsh b/lib/misc.zsh index 0b7cb2696..c9a8e9e8f 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -20,3 +20,6 @@ alias afind='ack-grep -il' if [[ -z "$LC_CTYPE" && -z "$LC_ALL" ]]; then export LC_CTYPE=${LANG%%:*} # pick the first entry from LANG fi + +# recognize comments +setopt interactivecomments From 41104f8af842cd9ba441255808053a36ef4fcd6b Mon Sep 17 00:00:00 2001 From: Andrew Purcell <andrew.purcell@grandroundshealth.com> Date: Mon, 1 Dec 2014 12:29:59 -0800 Subject: [PATCH 409/488] Fix homebrew directory in aws plugin. Sometimes the output of ``homebrew --prefix`` and ``homebrew --prefix awscli`` don't match, and the second is the correct call. --- plugins/aws/aws.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index 0ae18dd56..e5e3f1236 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -22,7 +22,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 From 70c4a27fd6048c3213dd2f3bae21bff26005bc16 Mon Sep 17 00:00:00 2001 From: "leif.hanack" <strug@web.de> Date: Wed, 4 Jun 2014 00:37:33 +0200 Subject: [PATCH 410/488] Added a possibility to display the remote branch and the number of commits you are ahead or behind --- lib/git.zsh | 20 +++++++++++++++----- themes/strug.zsh-theme | 25 +++++++++++++++++++++++++ 2 files changed, 40 insertions(+), 5 deletions(-) create mode 100644 themes/strug.zsh-theme diff --git a/lib/git.zsh b/lib/git.zsh index 118841f06..733492ba0 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -36,16 +36,26 @@ git_remote_status() { ahead=$(command git rev-list ${hook_com[branch]}@{upstream}..HEAD 2>/dev/null | wc -l) behind=$(command git rev-list HEAD..${hook_com[branch]}@{upstream} 2>/dev/null | wc -l) - if [ $ahead -eq 0 ] && [ $behind -gt 0 ] + if [ $ahead -gt 0 ] && [ $behind -eq 0 ] then - echo "$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE" - elif [ $ahead -gt 0 ] && [ $behind -eq 0 ] + git_remote_status="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE" + git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))%{$reset_color%}" + elif [ $behind -gt 0 ] && [ $ahead -eq 0 ] then - echo "$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE" + git_remote_status="$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE" + git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE$((behind))%{$reset_color%}" elif [ $ahead -gt 0 ] && [ $behind -gt 0 ] then - echo "$ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE" + git_remote_status="$ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE" + git_remote_status_detailed="$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE$((ahead))%{$reset_color%}$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR$ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE$((behind))%{$reset_color%}" fi + + if [ $ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_DETAILED ] + then + git_remote_status="$ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_PREFIX$remote$git_remote_status_detailed$ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_SUFFIX" + fi + + echo $git_remote_status fi } diff --git a/themes/strug.zsh-theme b/themes/strug.zsh-theme new file mode 100644 index 000000000..89b56b008 --- /dev/null +++ b/themes/strug.zsh-theme @@ -0,0 +1,25 @@ +# terminal coloring +export CLICOLOR=1 +export LSCOLORS=dxFxCxDxBxegedabagacad + +local git_branch='$(git_prompt_info)%{$reset_color%}$(git_remote_status)' + +PROMPT="%{$fg[green]%}╭─%n@%m %{$reset_color%}%{$fg[yellow]%}in %~ %{$reset_color%}${git_branch} +%{$fg[green]%}╰\$ %{$reset_color%}" + +ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[yellow]%}on " +ZSH_THEME_GIT_PROMPT_SUFFIX="%{$reset_color%}" + +ZSH_THEME_GIT_PROMPT_DIRTY="%{$reset_color%}%{$fg[red]%} ✘ %{$reset_color%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg[green]%} ✔ %{$reset_color%}" + +ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_DETAILED=true +ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_PREFIX="%{$fg[yellow]%}(" +ZSH_THEME_GIT_PROMPT_REMOTE_STATUS_SUFFIX="%{$fg[yellow]%})%{$reset_color%}" + +ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=" +" +ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE_COLOR=%{$fg[green]%} + +ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE=" -" +ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE_COLOR=%{$fg[red]%} + From f21a672fed1e1455c8341c972f3ba5a408726053 Mon Sep 17 00:00:00 2001 From: Sean Escriva <sean.escriva@gmail.com> Date: Sat, 24 May 2014 14:24:56 -0400 Subject: [PATCH 411/488] add kitchen completion plugin from @petere --- plugins/kitchen/_kitchen | 41 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 plugins/kitchen/_kitchen 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 "$@" From 2d40cc0bb315a92368e35c15c92f955bd901c7c3 Mon Sep 17 00:00:00 2001 From: Adam Lindberg <hello@alind.io> Date: Wed, 16 Apr 2014 10:34:45 +0200 Subject: [PATCH 412/488] Add git_prompt_behind and git_prompt_exists This adds two new theme functions for git: * `git_prompt_behind` works in a identical fashion to `git_prompt_ahead` and will output a format variable (`ZSH_THEME_GIT_PROMPT_BEHIND`) if the branch is behind. * `git_prompt_remote` will output one format variable if the branch exists on remote (`ZSH_THEME_GIT_PROMPT_REMOTE_EXISTS`), and another if the branch is unpublished (`ZSH_THEME_GIT_PROMPT_REMOTE_MISSING`). The old `git_prompt_ahead` has been changed. Using git log is subject to formatting in .gitconfig, which can be overridden and will break this function. Relying on rev-list is much more stable. --- lib/git.zsh | 30 +++++++++++++++++++++++------- 1 file changed, 23 insertions(+), 7 deletions(-) diff --git a/lib/git.zsh b/lib/git.zsh index 733492ba0..caa7e6329 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -59,13 +59,6 @@ git_remote_status() { fi } -# Checks if there are commits ahead from remote -function git_prompt_ahead() { - if $(echo "$(command git log @{upstream}..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then - echo "$ZSH_THEME_GIT_PROMPT_AHEAD" - fi -} - # Gets the number of commits ahead from remote function git_commits_ahead() { if $(echo "$(command git log @{upstream}..HEAD 2> /dev/null)" | grep '^commit' &> /dev/null); then @@ -74,6 +67,29 @@ function git_commits_ahead() { fi } +# Outputs if current branch is ahead of remote +function git_prompt_ahead() { + if [[ -n "$(command git rev-list origin/$(current_branch)..HEAD 2> /dev/null)" ]]; then + echo "$ZSH_THEME_GIT_PROMPT_AHEAD" + fi +} + +# Outputs if current branch is behind remote +function git_prompt_behind() { + if [[ -n "$(command git rev-list HEAD..origin/$(current_branch) 2> /dev/null)" ]]; then + echo "$ZSH_THEME_GIT_PROMPT_BEHIND" + fi +} + +# Outputs if current branch exists on remote or not +function git_prompt_remote() { + if [[ -n "$(command git show-ref origin/$(current_branch) 2> /dev/null)" ]]; then + echo "$ZSH_THEME_GIT_PROMPT_REMOTE_EXISTS" + else + echo "$ZSH_THEME_GIT_PROMPT_REMOTE_MISSING" + fi +} + # Formats prompt string for current git commit short SHA function git_prompt_short_sha() { SHA=$(command git rev-parse --short HEAD 2> /dev/null) && echo "$ZSH_THEME_GIT_PROMPT_SHA_BEFORE$SHA$ZSH_THEME_GIT_PROMPT_SHA_AFTER" From 25df9f3998359832667db206774a18cb45153a15 Mon Sep 17 00:00:00 2001 From: Blake Watters <blakewatters@gmail.com> Date: Tue, 26 Feb 2013 11:29:19 -0500 Subject: [PATCH 413/488] Disable globbing when executing `zeus rake` aliases to enable use of square brackets without escaping --- plugins/zeus/zeus.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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' From 2fb326513a9e2cec473cff88669da890ad4ae834 Mon Sep 17 00:00:00 2001 From: Dan Mills <evilhamsterman@gmail.com> Date: Wed, 10 Jun 2015 15:49:47 -0700 Subject: [PATCH 414/488] Only load url-quote-magic if it is available. Partially fixes #3614 --- lib/misc.zsh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/lib/misc.zsh b/lib/misc.zsh index 0b7cb2696..92e336b64 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -1,6 +1,10 @@ -## smart urls -autoload -U url-quote-magic -zle -N self-insert url-quote-magic +## Load smart urls if available +for d in $fpath; do + if [[ -e "$d/url-quote-magic"]]; then + autoload -U url-quote-magic + zle -N self-insert url-quote-magic + fi +done ## jobs setopt long_list_jobs From 557dc09d71e489790742ed8603e929edb48fb071 Mon Sep 17 00:00:00 2001 From: UserTaken <elysian@live.com> Date: Thu, 11 Jun 2015 00:21:45 -0700 Subject: [PATCH 415/488] More run and create options --- plugins/docker/_docker | 90 +++++++++++++++++++++++++++++++++--------- 1 file changed, 71 insertions(+), 19 deletions(-) diff --git a/plugins/docker/_docker b/plugins/docker/_docker index fd459a0ca..bd494ecaa 100644 --- a/plugins/docker/_docker +++ b/plugins/docker/_docker @@ -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 } @@ -55,6 +55,7 @@ __commit() { '(-a,--author=)'{-a,--author=}'[Author (eg. "John Hannibal Smith <hannibal@a-team.com>"]' \ '(-m,--message=)'{-m,--message=}'[Commit message]' \ '--run=[Config automatically applied when the image is run.]' + '(-p,--pause=)'{-p,--pause=}'[Pause container during commit]' \ __docker_containers } @@ -62,6 +63,48 @@ __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]' \ + '(-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,42 @@ __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]' \ + '(-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 +277,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 +323,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 +331,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 +373,8 @@ case "$words[1]" in __commit ;; cp) __cp ;; + create) + __create ;; diff) __diff ;; events) @@ -335,8 +389,6 @@ case "$words[1]" in __import ;; info) __info ;; - insert) - __insert ;; inspect) __inspect ;; kill) From a570f4b7f332d6a1f7b25e1d5fd9a3954e379065 Mon Sep 17 00:00:00 2001 From: ncanceill <nicolas.canceill@ens-cachan.org> Date: Thu, 11 Jun 2015 11:04:54 +0200 Subject: [PATCH 416/488] git plugin: bring back olg gg aliases by popular demand, see #3972 --- plugins/git/git.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index e42e09688..28227dcb1 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -104,11 +104,15 @@ ggl() { git pull origin "${b:=$1}" } compdef _git ggl=git-checkout +alias ggpull='ggl' +compdef _git ggpull=git-checkout ggp() { [[ "$#" != 1 ]] && b="$(current_branch)" git push origin "${b:=$1}" } compdef _git ggp=git-checkout +alias ggpush='ggp' +compdef _git ggpush=git-checkout ggpnp() { ggl "$1" && ggp "$1" } @@ -119,6 +123,8 @@ ggu() { git pull --rebase origin "${b:=$1}" } compdef _git ggu=git-checkout +alias ggpur='ggu' +compdef _git ggpur=git-checkout alias gignore='git update-index --assume-unchanged' alias gignored='git ls-files -v | grep "^[[:lower:]]"' From 6c29041af73fc3668f6a3256ebc7ab532a2bbba9 Mon Sep 17 00:00:00 2001 From: ncanceill <nicolas.canceill@ens-cachan.org> Date: Thu, 11 Jun 2015 15:12:28 +0200 Subject: [PATCH 417/488] git plugin: global var for git command due to issues like #3962 until a proper plugin-loading system is implemented --- plugins/git/git.plugin.zsh | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 28227dcb1..154a7bb9c 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -1,7 +1,6 @@ # Query/use custom command for `git`. -local git_cmd -zstyle -s ":vcs_info:git:*:-all-" "command" git_cmd -: ${git_cmd:=git} +zstyle -s ":vcs_info:git:*:-all-" "command" _omz_git_git_cmd +: ${_omz_git_git_cmd:=git} # # Functions @@ -13,20 +12,20 @@ zstyle -s ":vcs_info:git:*:-all-" "command" git_cmd # it's not a symbolic ref, but in a Git repo. function current_branch() { local ref - ref=$($git_cmd symbolic-ref --quiet HEAD 2> /dev/null) + ref=$($_omz_git_git_cmd symbolic-ref --quiet HEAD 2> /dev/null) local ret=$? if [[ $ret != 0 ]]; then [[ $ret == 128 ]] && return # no git repo. - ref=$($git_cmd rev-parse --short HEAD 2> /dev/null) || return + ref=$($_omz_git_git_cmd rev-parse --short HEAD 2> /dev/null) || return fi echo ${ref#refs/heads/} } # The list of remotes function current_repository() { - if ! $git_cmd rev-parse --is-inside-work-tree &> /dev/null; then + if ! $_omz_git_git_cmd rev-parse --is-inside-work-tree &> /dev/null; then return fi - echo $($git_cmd remote -v | cut -d':' -f 2) + echo $($_omz_git_git_cmd remote -v | cut -d':' -f 2) } # Pretty log messages function _git_log_prettily(){ From 6ff96dab36865ab208b08a004903338bfd405eac Mon Sep 17 00:00:00 2001 From: ncanceill <nicolas.canceill@ens-cachan.org> Date: Thu, 11 Jun 2015 16:16:12 +0200 Subject: [PATCH 418/488] git plugin: fix error msg in gwip alias because git rm will fail when no files were deleted --- plugins/git/git.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 154a7bb9c..7db43351a 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -204,4 +204,4 @@ alias gupv='git pull --rebase -v' alias gvt='git verify-tag' alias gwch='git whatchanged -p --abbrev-commit --pretty=medium' -alias gwip='git add -A; git rm $(git ls-files --deleted); git commit -m "--wip--"' +alias gwip='git add -A; git rm $(git ls-files --deleted) 2> /dev/null; git commit -m "--wip--"' From f513999a4dbfea3a15287368848a718543fcaf7b Mon Sep 17 00:00:00 2001 From: ncanceill <nicolas.canceill@ens-cachan.org> Date: Thu, 11 Jun 2015 17:14:35 +0200 Subject: [PATCH 419/488] git plugin: make b local in gg* functions because it leaked, and led to #3991 --- plugins/git/git.plugin.zsh | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 7db43351a..dec787a8c 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -94,19 +94,19 @@ alias gfo='git fetch origin' alias gg='git gui citool' alias gga='git gui citool --amend' ggf() { -[[ "$#" != 1 ]] && b="$(current_branch)" +[[ "$#" != 1 ]] && local b="$(current_branch)" git push --force origin "${b:=$1}" } compdef _git ggf=git-checkout ggl() { -[[ "$#" != 1 ]] && b="$(current_branch)" +[[ "$#" != 1 ]] && local b="$(current_branch)" git pull origin "${b:=$1}" } compdef _git ggl=git-checkout alias ggpull='ggl' compdef _git ggpull=git-checkout ggp() { -[[ "$#" != 1 ]] && b="$(current_branch)" +[[ "$#" != 1 ]] && local b="$(current_branch)" git push origin "${b:=$1}" } compdef _git ggp=git-checkout @@ -118,7 +118,7 @@ ggl "$1" && ggp "$1" compdef _git ggpnp=git-checkout alias ggsup='git branch --set-upstream-to=origin/$(current_branch)' ggu() { -[[ "$#" != 1 ]] && b="$(current_branch)" +[[ "$#" != 1 ]] && local b="$(current_branch)" git pull --rebase origin "${b:=$1}" } compdef _git ggu=git-checkout From 83c3316cf4c4f11c15b8a9df488d629cf4bc23dc Mon Sep 17 00:00:00 2001 From: DimitriSteyaert <github@dimitri.eu> Date: Mon, 27 Apr 2015 22:26:30 +0200 Subject: [PATCH 420/488] Added the tugboat autocompletion plugin --- plugins/tugboat/_tugboat | 106 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 106 insertions(+) create mode 100644 plugins/tugboat/_tugboat 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 From 6bec3c6719f17898b6504a6189424bc23cc10c65 Mon Sep 17 00:00:00 2001 From: Matheus Cruz Rocha <matheus.rocha89@gmail.com> Date: Sat, 2 May 2015 12:59:18 -0300 Subject: [PATCH 421/488] Update history-substring-search README This Change remove the .zsh on the plugin activate example, cause with the .zsh at the end the plugin won't be activated --- plugins/history-substring-search/README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/history-substring-search/README.markdown b/plugins/history-substring-search/README.markdown index 143b813a1..c154afdce 100644 --- a/plugins/history-substring-search/README.markdown +++ b/plugins/history-substring-search/README.markdown @@ -1,6 +1,6 @@ To activate this script, please include it the `plugins` variable within `~/.zshrc` - `plugins=(git history-substring-search.zsh)` + `plugins=(git history-substring-search)` See the "history-substring-search.zsh" file for more information: From e8ac8b9b5f82369635d719408f8b4adc5d97bcf9 Mon Sep 17 00:00:00 2001 From: Jonathan Roemer <jon@roemersoftworks.com> Date: Fri, 1 May 2015 17:44:50 -0400 Subject: [PATCH 422/488] Added support for detecting Sublime Text 3 on Arch Linux --- plugins/sublime/sublime.plugin.zsh | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh index 38a7596fd..4d9979960 100644 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -5,6 +5,7 @@ if [[ $('uname') == 'Linux' ]]; then _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" From 4c409b0de918e62f9354cbc604c6ae65da611caf Mon Sep 17 00:00:00 2001 From: Paul Melnikow <paul.melnikow@bodylabs.com> Date: Mon, 29 Dec 2014 14:48:24 -0500 Subject: [PATCH 423/488] sublime: Make subl a function so it can be called from functions in other modules Without this change, whether a function can invoke 'subl' depends on the order in which modules are loaded. With this change, the order doesn't matter. zsh resolves aliases at parse time not run time, which means if you invoke an alias from a function, the alias must be defined before the function. See http://stackoverflow.com/a/25532276/893113 which refers to an explanation of this limitation. For code which may be used non-interactively, the recommend workaround is to use functions instead of aliases. --- plugins/sublime/sublime.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/sublime/sublime.plugin.zsh b/plugins/sublime/sublime.plugin.zsh index 4d9979960..3e338e4d3 100644 --- a/plugins/sublime/sublime.plugin.zsh +++ b/plugins/sublime/sublime.plugin.zsh @@ -34,7 +34,7 @@ elif [[ "$OSTYPE" = darwin* ]]; then 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 From 23ac32d34680785c678ee64a915d11e12253d206 Mon Sep 17 00:00:00 2001 From: Martin Delille <martin@phonations.com> Date: Mon, 30 Mar 2015 11:23:00 +0200 Subject: [PATCH 424/488] add help link to install zsh --- README.markdown | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index 9f96e315d..4723d3486 100644 --- a/README.markdown +++ b/README.markdown @@ -15,8 +15,7 @@ To learn more, visit http://ohmyz.sh and/or follow [ohmyzsh](https://twitter.com __Disclaimer:__ _Oh My Zsh works best on Mac OS X and Linux._ * Unix-based operating system (Mac OS X or Linux) -* [Zsh](http://www.zsh.org) should be installed (v4.3.9 or more recent) - * This is commonly pre-installed. (`zsh --version` to confirm) +* [Zsh](http://www.zsh.org) should be installed (v4.3.9 or more recent). If not pre-installed (`zsh --version` to confirm), check the following instruction here: [Installing-ZSH](https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH) * `curl` or `wget` should be installed ### Basic Installation From 4ab430025c97902a28c0fa7aad45e14d0a7852e9 Mon Sep 17 00:00:00 2001 From: Kevin Ndung'u <kevgathuku@users.noreply.github.com> Date: Sat, 18 Apr 2015 15:47:08 +0300 Subject: [PATCH 425/488] Add git to prerequisites Resolves #3786 --- README.markdown | 1 + 1 file changed, 1 insertion(+) diff --git a/README.markdown b/README.markdown index 4723d3486..31cbc810b 100644 --- a/README.markdown +++ b/README.markdown @@ -17,6 +17,7 @@ __Disclaimer:__ _Oh My Zsh works best on Mac OS X and Linux._ * Unix-based operating system (Mac OS X or Linux) * [Zsh](http://www.zsh.org) should be installed (v4.3.9 or more recent). If not pre-installed (`zsh --version` to confirm), check the following instruction here: [Installing-ZSH](https://github.com/robbyrussell/oh-my-zsh/wiki/Installing-ZSH) * `curl` or `wget` should be installed +* `git` should be installed ### Basic Installation From 563e1052c723739b25b34706a9c689b77435e5a2 Mon Sep 17 00:00:00 2001 From: Oleksandr Shybystyi <oleksandr.shybystyi@gmail.com> Date: Mon, 4 May 2015 14:04:25 +0300 Subject: [PATCH 426/488] Added README for mercurial plugin --- plugins/mercurial/README.md | 64 +++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 plugins/mercurial/README.md diff --git a/plugins/mercurial/README.md b/plugins/mercurial/README.md new file mode 100644 index 000000000..89e1c1743 --- /dev/null +++ b/plugins/mercurial/README.md @@ -0,0 +1,64 @@ +# Mercurial plugin +### Usage +Update .zshrc: + +1. Add name to the list of plugins, e.g. `plugins = (..., mercurial, ...)` + (that is pretty obvious). +2. Change PROMPT variable of current theme to contain current folder mercurial repo info: + + robbyrussel theme is used by default, so you need to modify PROMPT var + from [this file](https://github.com/robbyrussell/oh-my-zsh/blob/master/themes/robbyrussell.zsh-theme) + by adding `$(hg_prompt_info)` after `$(git_prompt_info)`, so currently it + looks next: + + ```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)$(hg_prompt_info)%{$fg_bold[blue]%} % %{$reset_color%}' + ``` + + and put modified var at the end of **.zshrc**. +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** 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 From fb5b83d10d5b1640fbd2035d5a7419cb5b25c32a Mon Sep 17 00:00:00 2001 From: Octavian Neamtu <octavian.neamtu@annkissam.com> Date: Sat, 9 May 2015 19:12:14 -0400 Subject: [PATCH 427/488] Fixed jump pluging to display the right mark name on 'mark . ' --- plugins/jump/jump.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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" From c838b9a112e1569bcc5af069d8283057f7d4208a Mon Sep 17 00:00:00 2001 From: Diego Rabatone Oliveira <diraol@diraol.eng.br> Date: Sat, 9 May 2015 17:38:34 -0300 Subject: [PATCH 428/488] Update README.markdown Updating the install instructions as proposed in: https://github.com/robbyrussell/oh-my-zsh/issues/3516#issuecomment-76506726 --- README.markdown | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/README.markdown b/README.markdown index 31cbc810b..88ef356fd 100644 --- a/README.markdown +++ b/README.markdown @@ -25,11 +25,11 @@ Oh My Zsh is installed by running one of the following commands in your terminal #### via curl -`curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh` +`sh -c "$(curl -fsSL https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"` #### via wget -`wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O - | sh` +`sh -c "$(wget https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh -O -)"` ## Using Oh My Zsh From af4ffe56eae27c85ed472307554fd7347966d316 Mon Sep 17 00:00:00 2001 From: Luca Stefani <luca.stefani.ge1@gmail.com> Date: Thu, 7 May 2015 13:24:33 +0200 Subject: [PATCH 429/488] adb: add more commands --- plugins/adb/_adb | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 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 From 980528f9fa33780499d625bbbb8ea2cada78530d Mon Sep 17 00:00:00 2001 From: Archie <isntall@users.noreply.github.com> Date: Sat, 23 May 2015 10:22:03 -0700 Subject: [PATCH 430/488] fix typo --- oh-my-zsh.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 71716f77f..ec64c240f 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -14,7 +14,7 @@ if [[ -z "$ZSH_CUSTOM" ]]; then ZSH_CUSTOM="$ZSH/custom" fi -# Set ZSH_CACHE_DIR to the path where cache files sould be created +# Set ZSH_CACHE_DIR to the path where cache files should be created # or else we will use the default cache/ if [[ -z "$ZSH_CACHE_DIR" ]]; then ZSH_CACHE_DIR="$ZSH/cache/" From 8791d7e09ea28335a60db7bd2f5c0d771d7910fc Mon Sep 17 00:00:00 2001 From: Paul <pavel.finkelshtein@gmail.com> Date: Tue, 9 Jun 2015 07:35:38 +0300 Subject: [PATCH 431/488] Update bgnotify.plugin.zsh Fixed error with spaces in commands --- plugins/bgnotify/bgnotify.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh index 14ca4c817..b70b42f98 100755 --- a/plugins/bgnotify/bgnotify.plugin.zsh +++ b/plugins/bgnotify/bgnotify.plugin.zsh @@ -33,9 +33,9 @@ bgnotify () { if hash terminal-notifier 2>/dev/null; then #osx terminal-notifier -message "$2" -title "$1" elif hash growlnotify 2>/dev/null; then #osx growl - growlnotify -m $1 $2 + growlnotify -m "$1" "$2" elif hash notify-send 2>/dev/null; then #ubuntu! - notify-send $1 $2 + notify-send "$1" "$2" elif hash notifu 2>/dev/null; then #cygwyn support! notifu /m "$2" /p "$1" fi From 69dee6538155cb604434363ba243e540a6104fe6 Mon Sep 17 00:00:00 2001 From: asaph <ace@dontletgo.com> Date: Tue, 19 May 2015 13:24:16 -0700 Subject: [PATCH 432/488] Fixed typo in README --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 88ef356fd..5d4819d76 100644 --- a/README.markdown +++ b/README.markdown @@ -51,7 +51,7 @@ Most plugins (should! we're working on this) include a __README__, which documen ### Themes -We'll admit it. Early in the Oh My Zsh world... we may have gotten a far too theme happy. We have over one hundred themes now bundled. Most of them have [screenshots](https://wiki.github.com/robbyrussell/oh-my-zsh/themes) on the wiki. Check them out! +We'll admit it. Early in the Oh My Zsh world... we may have gotten far too theme happy. We have over one hundred themes now bundled. Most of them have [screenshots](https://wiki.github.com/robbyrussell/oh-my-zsh/themes) on the wiki. Check them out! #### Selecting a Theme From 1a4dc0d2db56c2abf5244f1fca975ea887eb6bbb Mon Sep 17 00:00:00 2001 From: Michele Bologna <michele.bologna@gmail.com> Date: Fri, 19 Sep 2014 12:30:24 +0200 Subject: [PATCH 433/488] Renamed 'ss' alias to 'sstat' (to avoid collision with /bin/ss). --- plugins/rails/rails.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/rails/rails.plugin.zsh b/plugins/rails/rails.plugin.zsh index 5ed96f8cd..52aabab72 100644 --- a/plugins/rails/rails.plugin.zsh +++ b/plugins/rails/rails.plugin.zsh @@ -59,7 +59,7 @@ alias rn='rake notes' alias rr='rake routes' # 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' From 266894c6a138eb8a248ce8aa428fcabeabd7ffa4 Mon Sep 17 00:00:00 2001 From: regagain <regagainsttheregis@gmail.com> Date: Sun, 17 May 2015 16:26:18 +0200 Subject: [PATCH 434/488] Update taskwarrior.plugin.zsh Corrected documentation to avoid confusion (see https://github.com/robbyrussell/oh-my-zsh/issues/3796) --- plugins/taskwarrior/taskwarrior.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/taskwarrior/taskwarrior.plugin.zsh b/plugins/taskwarrior/taskwarrior.plugin.zsh index c1830042e..5d1e6ffea 100644 --- a/plugins/taskwarrior/taskwarrior.plugin.zsh +++ b/plugins/taskwarrior/taskwarrior.plugin.zsh @@ -8,7 +8,7 @@ # 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] +# Typing task [tabtab] will give you a list of current tasks, task 66[tabtab] # gives a list of available modifications for that task, etc. ################################################################################ From 02c2b74918b237f936ea51f14b38463221ec59dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jorge=20Gonz=C3=A1lez?= <scrub.mx@gmail.com> Date: Sat, 6 Jun 2015 21:08:59 -0400 Subject: [PATCH 435/488] Update aliases in laravel5.plugin.zsh file Some minor changes to the aliases. * removed php artisan dump-autoload since is no longer a command in laravel 5 * updated the la5routes alias to the new version of the command * added a la5vendor alias to publish assets from vendor packages --- plugins/laravel5/laravel5.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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' From 1f008b4113cd4586423c4ecc54f65f12e8a61145 Mon Sep 17 00:00:00 2001 From: "Mikhail S. Pobolovets" <styx.mp@gmail.com> Date: Thu, 30 Apr 2015 14:03:31 +0300 Subject: [PATCH 436/488] Update Mix complition upto 1.0.4 Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com> --- plugins/mix/_mix | 41 ++++++++++++++++++++++++++++------------- 1 file changed, 28 insertions(+), 13 deletions(-) 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 From 81eec406c8186a8f15763cf21230e0f1164942c9 Mon Sep 17 00:00:00 2001 From: Michele Bologna <michele.bologna@gmail.com> Date: Thu, 28 May 2015 16:25:49 +0200 Subject: [PATCH 437/488] * Added header with help and information * Moved git information to left prompt, with support for: * +ZSH_THEME_GIT_PROMPT_UNTRACKED, MODIFIED, STASHED, ADDED, UPSTREAM STATUS (if applicable) * Removed right prompt * Refactored following Google's guidelines for scripts [ http://goo.gl/oJSXH2 ] * Using local variables where applicable --- themes/michelebologna.zsh-theme | 102 +++++++++++++++++++++----------- 1 file changed, 66 insertions(+), 36 deletions(-) diff --git a/themes/michelebologna.zsh-theme b/themes/michelebologna.zsh-theme index a7599c8f5..fec243873 100644 --- a/themes/michelebologna.zsh-theme +++ b/themes/michelebologna.zsh-theme @@ -1,44 +1,74 @@ -# reference colors -GREEN="%{$fg_bold[green]%}" -RED="%{$fg_bold[red]%}" -CYAN="%{$fg_bold[cyan]%}" -YELLOW="%{$fg_bold[yellow]%}" -BLUE="%{$fg_bold[blue]%}" -MAGENTA="%{$fg_bold[magenta]%}" -WHITE="%{$fg_bold[white]%}" +# Michele Bologna's theme +# http://michelebologna.net +# +# This a theme for oh-my-zsh. Features a colored prompt with: +# * username@host: [jobs] [git] workdir % +# * hostname color is based on hostname characters. When using as root, the +# prompt shows only the hostname in red color. +# * [jobs], if applicable, counts the number of suspended jobs tty +# * [git], if applicable, represents the status of your git repo (more on that +# later) +# * '%' prompt will be green if last command return value is 0, yellow otherwise. +# +# git prompt is inspired by official git contrib prompt: +# https://github.com/git/git/tree/master/contrib/completion/git-prompt.sh +# and it adds: +# * the current branch +# * '%' if there are untracked files +# * '$' if there are stashed changes +# * '*' if there are modified files +# * '+' if there are added files +# * '<' if local repo is behind remote repo +# * '>' if local repo is ahead remote repo +# * '=' if local repo is equal to remote repo (in sync) +# * '<>' if local repo is diverged -COLOR_ARRAY=($GREEN $RED $CYAN $YELLOW $BLUE $MAGENTA $WHITE) +local green="%{$fg_bold[green]%}" +local red="%{$fg_bold[red]%}" +local cyan="%{$fg_bold[cyan]%}" +local yellow="%{$fg_bold[yellow]%}" +local blue="%{$fg_bold[blue]%}" +local magenta="%{$fg_bold[magenta]%}" +local white="%{$fg_bold[white]%}" +local reset="%{$reset_color%}" -# color reset -RESET_COLOR="%{$reset_color%}" +local -a color_array +color_array=($green $red $cyan $yellow $blue $magenta $white) -# which color should be applied? -USERNAME_NORMAL_COLOR=$WHITE -USERNAME_ROOT_COLOR=$RED -HOSTNAME_NORMAL_COLOR=$BLUE -# uncomment next line if you want auto-generated hostname color -#for i in $HOST; HOSTNAME_NORMAL_COLOR=$COLOR_ARRAY[$[((#i))%7+1]] -HOSTNAME_ROOT_COLOR=$RED -HOSTNAME_COLOR=%(!.$HOSTNAME_ROOT_COLOR.$HOSTNAME_NORMAL_COLOR) -CURRENT_DIR_COLOR=$CYAN +local username_normal_color=$white +local username_root_color=$red +local hostname_root_color=$red -# zsh commands -USERNAME_COMMAND="%n" -HOSTNAME_COMMAND="%m" -CURRENT_DIR="%~" +# calculating hostname color with hostname characters +for i in `hostname`; local hostname_normal_color=$color_array[$[((#i))%7+1]] +local -a hostname_color +hostname_color=%(!.$hostname_root_color.$hostname_normal_color) -# output: colors + commands -USERNAME_OUTPUT="%(!..$USERNAME_NORMAL_COLOR$USERNAME_COMMAND$RESET_COLOR@)" -HOSTNAME_OUTPUT="$HOSTNAME_COLOR$HOSTNAME_COMMAND$RESET_COLOR" -CURRENT_DIR_OUTPUT="$CURRENT_DIR_COLOR$CURRENT_DIR" -LAST_COMMAND_OUTPUT="%(?.%(!.$RED.$GREEN).$YELLOW)" +local current_dir_color=$blue +local username_command="%n" +local hostname_command="%m" +local current_dir="%~" -# git theming -ZSH_THEME_GIT_PROMPT_PREFIX="(" +local username_output="%(!..$username_normal_color$username_command$reset@)" +local hostname_output="$hostname_color$hostname_command$reset" +local current_dir_output="$current_dir_color$current_dir$reset" +local jobs_bg="${red}fg: %j$reset" +local last_command_output="%(?.%(!.$red.$green).$yellow)" + +ZSH_THEME_GIT_PROMPT_PREFIX="" ZSH_THEME_GIT_PROMPT_SUFFIX="" -ZSH_THEME_GIT_PROMPT_DIRTY=")$RED*" -ZSH_THEME_GIT_PROMPT_CLEAN=")" +ZSH_THEME_GIT_PROMPT_DIRTY="" +ZSH_THEME_GIT_PROMPT_CLEAN="" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%%" +ZSH_THEME_GIT_PROMPT_MODIFIED="*" +ZSH_THEME_GIT_PROMPT_ADDED="+" +ZSH_THEME_GIT_PROMPT_STASHED="$" +ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE="=" +ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=">" +ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="<" +ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="<>" -# wrap all together -PROMPT='$USERNAME_OUTPUT$HOSTNAME_OUTPUT:$CURRENT_DIR_OUTPUT $LAST_COMMAND_OUTPUT%#$RESET_COLOR ' -RPROMPT='%1(j.fg: [%j].) $GREEN$(git_prompt_info)$RESET_COLOR [%@]' +PROMPT='$username_output$hostname_output:$current_dir_output%1(j. [$jobs_bg].)' +PROMPT+='$(__git_ps1)' +PROMPT+=" $last_command_output%#$reset " +RPROMPT='' From 8eb31a6f9a053ea22ea88ccba3d91a4694674300 Mon Sep 17 00:00:00 2001 From: ncanceill <nicolas.canceill@ens-cachan.org> Date: Thu, 11 Jun 2015 23:34:18 +0200 Subject: [PATCH 438/488] git plugin: fix ggpnp when called without argument also allow multiple arguments for ggp and ggl aliases --- plugins/git/git.plugin.zsh | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index dec787a8c..5cceb8d25 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -99,21 +99,29 @@ git push --force origin "${b:=$1}" } compdef _git ggf=git-checkout ggl() { -[[ "$#" != 1 ]] && local b="$(current_branch)" -git pull origin "${b:=$1}" +[[ "$#" == 0 ]] && local b="$(current_branch)" +git pull origin "${b:=$1}" "${*[2,-1]}" } compdef _git ggl=git-checkout alias ggpull='ggl' compdef _git ggpull=git-checkout ggp() { -[[ "$#" != 1 ]] && local b="$(current_branch)" +if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then +git push origin "${*}" +else +[[ "$#" == 0 ]] && local b="$(current_branch)" git push origin "${b:=$1}" +fi } compdef _git ggp=git-checkout alias ggpush='ggp' compdef _git ggpush=git-checkout ggpnp() { -ggl "$1" && ggp "$1" +if [[ "$#" == 0 ]]; then +ggl && ggp +else +ggl "${*}" && ggp "${*}" +fi } compdef _git ggpnp=git-checkout alias ggsup='git branch --set-upstream-to=origin/$(current_branch)' From 3f9298514e22d6e5923f14f98b825f1688158781 Mon Sep 17 00:00:00 2001 From: Dominik Ritter <dritter03@googlemail.com> Date: Mon, 25 May 2015 01:15:37 +0200 Subject: [PATCH 439/488] Added references to the `external themes` wiki page. --- README.markdown | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index 5d4819d76..3805d1eb4 100644 --- a/README.markdown +++ b/README.markdown @@ -67,6 +67,8 @@ To use a different theme, simple change the value to match the name of your desi Open up a new terminal window and your prompt should look something like... +In case you did not find a suitable theme for your needs, please have a look at the wiki for [more themes](https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes). + ## Advanced Topics If you're the type that likes to get their hands dirty... these sections might resonate. @@ -154,7 +156,7 @@ We also need people to test out pull-requests. So take a look through [the open ### Do NOT Send Us Themes -We have (more than) enough themes for the time being. Please fork the project and add one in there – you can let people know how to grab it from there. +We have (more than) enough themes for the time being. Please add your theme to the [external themes](https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes) wiki page. ## Contributors From e0ce87632d1d8ecb609bb96202a8fb3151f6be4f Mon Sep 17 00:00:00 2001 From: KhasMek <Boushh@gmail.com> Date: Fri, 8 May 2015 15:42:26 -0600 Subject: [PATCH 440/488] Plugins: apache2-macports - add README --- plugins/apache2-macports/README.md | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 plugins/apache2-macports/README.md 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) + +--- From e5929680fdd4adb7b0942f16b58f99e1695ce8b8 Mon Sep 17 00:00:00 2001 From: KhasMek <Boushh@gmail.com> Date: Fri, 8 May 2015 13:18:06 -0600 Subject: [PATCH 441/488] Plugins: archlinux - use command -v in favor of which The command 'which' launches an external process that isn't really necessary. --- plugins/archlinux/archlinux.plugin.zsh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/archlinux/archlinux.plugin.zsh b/plugins/archlinux/archlinux.plugin.zsh index 6330a2152..b83c24560 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 [[ -x `command -v 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 [[ -x `command -v abs` && -x `command -v 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 [[ -x `command -v 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 [[ -x `command -v 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 [[ -x `command -v abs` && -x `command -v 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 [[ -x `command -v 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 [[ -x `command -v 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 From 0f96e8e6c20c25ba6bc78c3df425aec61bfbaa3c Mon Sep 17 00:00:00 2001 From: KhasMek <Boushh@gmail.com> Date: Fri, 8 May 2015 13:28:32 -0600 Subject: [PATCH 442/488] Plugins: archlinux - add basic README. --- plugins/archlinux/README.md | 64 +++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) create mode 100644 plugins/archlinux/README.md 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 + +--- From 0e35bd4001494782fb1956acaebadf2f81c25b42 Mon Sep 17 00:00:00 2001 From: "Daniel Campoverde [alx741]" <alx741@riseup.net> Date: Sun, 29 Mar 2015 00:12:58 -0500 Subject: [PATCH 443/488] Plugins: vi-mode: Add first README file --- plugins/vi-mode/README.md | 75 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 75 insertions(+) create mode 100644 plugins/vi-mode/README.md diff --git a/plugins/vi-mode/README.md b/plugins/vi-mode/README.md new file mode 100644 index 000000000..03e67cca2 --- /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 after the cursor +- `ctrl-w` : While in *Insert mode*: delete word after 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 From c28b226af2dc0843ab0f05ea4abc54c4bdfd7012 Mon Sep 17 00:00:00 2001 From: CkEsc <iamckesc@gmail.com> Date: Tue, 3 Mar 2015 23:03:44 +0300 Subject: [PATCH 444/488] Fix README.md for sst command --- plugins/sublime/README.md | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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 From a2d7d36e70abbdd1dc9b0f06e8841d4f74226195 Mon Sep 17 00:00:00 2001 From: wyldphyre <craigreynolds@Claire.local> Date: Fri, 27 Feb 2015 10:56:14 +0800 Subject: [PATCH 445/488] Added README.md file --- plugins/history/README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) create mode 100644 plugins/history/README.md 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 From 81da07602c8e99548ffbe4d110d40ea5873f20fe Mon Sep 17 00:00:00 2001 From: wyldphyre <craigreynolds@Claire.local> Date: Fri, 27 Feb 2015 11:05:05 +0800 Subject: [PATCH 446/488] Added README.md file for atom plugin --- plugins/atom/README.md | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 plugins/atom/README.md diff --git a/plugins/atom/README.md b/plugins/atom/README.md new file mode 100644 index 000000000..75d77a0ac --- /dev/null +++ b/plugins/atom/README.md @@ -0,0 +1,17 @@ +## atom + +Plugin for Atom, a cross platform text and code editor, available for Linux, Mac OS X, and Windows. + +### Requirements + + * [Atom](https://atom.io/) + +### Usage + + * If `at` command is called without an argument, launch Atom + + * If `at` is passed a directory, `cd` to it and open it in Atom + + * If `at` is passed a file, open it in Atom + + * if `att` command is called, it is equivalent to `at .`, opening the current folder in Atom From cf3fb873ec0cc0ec428e9c05dcac998d3b3f956c Mon Sep 17 00:00:00 2001 From: wyldphyre <craigreynolds@Claire.local> Date: Fri, 27 Feb 2015 13:38:31 +0800 Subject: [PATCH 447/488] Added README.md file for ForkLift plugin --- plugins/forklift/README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) create mode 100644 plugins/forklift/README.md diff --git a/plugins/forklift/README.md b/plugins/forklift/README.md new file mode 100644 index 000000000..b452a357c --- /dev/null +++ b/plugins/forklift/README.md @@ -0,0 +1,13 @@ +## forklift + +Plugin for ForkLift, an FTP application for OS X. + +### Requirements + +* [ForkLift](http://forkliftapp.com/forklift/) + +### Usage + +* If `fl` is called without arguments then the current folder is opened in ForkLift. Is equivalent to `fl .` + +* If `fl` is called with a directory as the argument, then that directory is opened in ForkLift \ No newline at end of file From 4b76b7429a820e7eda8bed6c214d81a275be30b9 Mon Sep 17 00:00:00 2001 From: Vadim <moshasmail@gmail.com> Date: Sun, 28 Dec 2014 01:54:18 +0200 Subject: [PATCH 448/488] remove trash command from osx plugin --- plugins/osx/osx.plugin.zsh | 17 ----------------- 1 file changed, 17 deletions(-) diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index d0f9f009a..a6e3a83e6 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -138,23 +138,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://$@ } From 763cef8013c90c3ea0b1edfe8c903008a7406bce Mon Sep 17 00:00:00 2001 From: Erlend Hamberg <ehamberg@gmail.com> Date: Mon, 20 Oct 2014 18:53:57 +0200 Subject: [PATCH 449/488] Add `leaves` command to `brew` completion --- plugins/brew/_brew | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/brew/_brew b/plugins/brew/_brew index d11aa245d..4c99a383a 100644 --- a/plugins/brew/_brew +++ b/plugins/brew/_brew @@ -35,6 +35,7 @@ _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' 'list:list files in a formula or not-installed formulae' 'log:git commit log for a formula' From e55d84f76e07785bec38d802b447df1fc93512f2 Mon Sep 17 00:00:00 2001 From: Filip Bartuzi <filip@bartuzi.me> Date: Sun, 12 Oct 2014 12:29:33 +0200 Subject: [PATCH 450/488] Add reference to bundler plugin issue in README --- plugins/bundler/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/bundler/README.md b/plugins/bundler/README.md index 56f0c7176..edd95ccc2 100644 --- a/plugins/bundler/README.md +++ b/plugins/bundler/README.md @@ -39,7 +39,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` From f1a43daa36efdbf5c75dbc07927310b25259a114 Mon Sep 17 00:00:00 2001 From: ncanceill <nicolas.canceill@ens-cachan.org> Date: Fri, 12 Jun 2015 11:50:30 +0200 Subject: [PATCH 451/488] =?UTF-8?q?git=20plugin:=20new/changed=20aliases?= =?UTF-8?q?=20gaa=20was=20brought=20back=20by=20popular=20demand=20?= =?UTF-8?q?=E2=80=94=20see=20#3535=20gap=20was=20replaced=20with=20gapa=20?= =?UTF-8?q?=E2=80=94=20see=20#3682=20gdc=20was=20replaced=20with=20gdca=20?= =?UTF-8?q?=E2=80=94=20see=20#3977?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/git/git.plugin.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 5cceb8d25..d59e0ca9f 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -48,6 +48,8 @@ function work_in_progress() { alias g='git' alias ga='git add' +alias gaa='git add --all' +alias gapa='git add --patch' alias gb='git branch' alias gba='git branch -a' @@ -79,7 +81,7 @@ alias gcp='git cherry-pick' alias gcs='git commit -S' alias gd='git diff' -alias gdc='git diff --cached' +alias gdca='git diff --cached' alias gdt='git diff-tree --no-commit-id --name-only -r' gdv() { git diff -w "$@" | view - } compdef _git gdv=git-diff From d0b690b584fa48946cfd93014aa6033ec0cc7fc3 Mon Sep 17 00:00:00 2001 From: Tommy Wang <twang@joinem.com> Date: Wed, 10 Jun 2015 10:01:38 -0500 Subject: [PATCH 452/488] use local options to set no_equals before sourcing bash completion script --- .../virtualenvwrapper/virtualenvwrapper.plugin.zsh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index 5faa1a823..b2c804edb 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -1,10 +1,18 @@ 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"\ "Please install with \`pip install virtualenvwrapper\`" >&2 From 83295ec9bc0a7c16a706a76c3c1f4a6ddd91948a Mon Sep 17 00:00:00 2001 From: Christian Hoener zu Siederdissen <choener@tbi.univie.ac.at> Date: Sat, 13 Sep 2014 20:41:47 +0200 Subject: [PATCH 453/488] last-working-dir working with spaces in dirnames --- plugins/last-working-dir/last-working-dir.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/last-working-dir/last-working-dir.plugin.zsh b/plugins/last-working-dir/last-working-dir.plugin.zsh index 4fa6fcc34..75041f08e 100644 --- a/plugins/last-working-dir/last-working-dir.plugin.zsh +++ b/plugins/last-working-dir/last-working-dir.plugin.zsh @@ -15,7 +15,7 @@ function chpwd() { # 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 From 8b95bdb5e0059a6007b24f2d60e1719c791c8cce Mon Sep 17 00:00:00 2001 From: Sriram Sundarraj <sriram.s.1994@gmail.com> Date: Sun, 19 Apr 2015 22:27:03 +0530 Subject: [PATCH 454/488] Added github in web_search plugin. --- plugins/web-search/web-search.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index 572427b0b..d407edb96 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -11,6 +11,7 @@ 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=" ) # define the open command @@ -49,6 +50,7 @@ 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' #add your own !bang searches here alias wiki='web_search duckduckgo \!w' From 26c7adf1107043419582c3d7a7dbb204ff70cbcc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Fri, 5 Jun 2015 18:58:13 +0200 Subject: [PATCH 455/488] Revert "Added migration notification for rails plugin" This reverts commit 1493d88e3f92c7034da5c1b1638ba19544aa3ccb, made to put a deprecated notice on rails3 and rails4 plugins, so that users would migrate to the unified rails plugin. It's been 1.5 years since that, so everyone should be migrated to the good one. --- plugins/rails3/rails3.plugin.zsh | 4 ---- plugins/rails4/rails4.plugin.zsh | 4 ---- 2 files changed, 8 deletions(-) delete mode 100644 plugins/rails3/rails3.plugin.zsh delete mode 100644 plugins/rails4/rails4.plugin.zsh 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" From 4cc0a2638c46cebda5bc6616fa3f94c720c5686d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A4ntz=20Miccoli?= <frantz.miccoli@fakedomain.com> Date: Mon, 16 Dec 2013 00:39:26 +0100 Subject: [PATCH 456/488] A paver (Python build and configuration utility) plugin --- plugins/paver/paver.plugin.zsh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 plugins/paver/paver.plugin.zsh 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 From 3d670c0bfc00858aff67f6b4dc161f4c0a0a5aef Mon Sep 17 00:00:00 2001 From: Michael Okner <mike@mikeokner.com> Date: Sat, 13 Jun 2015 08:59:10 -0500 Subject: [PATCH 457/488] Adding quotes to git completion discovery path Previously, spaces in the path would result in wto separate errouneous paths being parsed. This fixes that issue. --- plugins/gitfast/_git | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/gitfast/_git b/plugins/gitfast/_git index 6b7796857..c75b0be7f 100644 --- a/plugins/gitfast/_git +++ b/plugins/gitfast/_git @@ -30,7 +30,7 @@ if [ -z "$script" ]; then local -a locations local e locations=( - $(dirname ${funcsourcetrace[1]%:*})/git-completion.bash + "$(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 From 55b1a2befe3d041b54c6aa542bd11734db31a6d5 Mon Sep 17 00:00:00 2001 From: UserTaken <UserTaken@users.noreply.github.com> Date: Sat, 13 Jun 2015 16:30:18 -0700 Subject: [PATCH 458/488] Update _docker --- plugins/docker/_docker | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/plugins/docker/_docker b/plugins/docker/_docker index bd494ecaa..25f55beca 100644 --- a/plugins/docker/_docker +++ b/plugins/docker/_docker @@ -52,11 +52,10 @@ __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.]' '(-p,--pause=)'{-p,--pause=}'[Pause container during commit]' \ - __docker_containers } __cp() { @@ -70,7 +69,8 @@ __create() { '--add-host=[Add a custom host-to-IP mapping]' \ '--cap-add=[Add Linux capabilities]' \ '--cap-drop=[Drop Linux capabilities]' \ - '(-c,--cpu-shares=)'{-c,--cpu-shares=}':[CPU shares (relative weight)]' \ + '--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]' \ @@ -227,7 +227,8 @@ __run() { '--add-host=[Add a custom host-to-IP mapping]' \ '--cap-add=[Add Linux capabilities]' \ '--cap-drop=[Drop Linux capabilities]' \ - '(-c,--cpu-shares=)'{-c,--cpu-shares=}':[CPU shares (relative weight)]' \ + '--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=}'[Run container in the background, print new container id]' \ '--device=[Add a host device to the container]' \ From a7e79824f85a89cbcacbceab0277c9833dee4817 Mon Sep 17 00:00:00 2001 From: "Mikhail S. Pobolovets" <styx.mp@gmail.com> Date: Mon, 6 Oct 2014 09:59:20 +0300 Subject: [PATCH 459/488] Add mix-fast plugin (similar to rake-fast) Signed-off-by: Mikhail S. Pobolovets <styx.mp@gmail.com> --- plugins/mix-fast/README.md | 28 +++++++++++++++++++++++++++ plugins/mix-fast/mix-fast.plugin.zsh | 29 ++++++++++++++++++++++++++++ 2 files changed, 57 insertions(+) create mode 100644 plugins/mix-fast/README.md create mode 100644 plugins/mix-fast/mix-fast.plugin.zsh 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' From c6460ef3e73f8f26f300dd8a24a83257b3b8579b Mon Sep 17 00:00:00 2001 From: ivanfoo <sanfru.ivan@gmail.com> Date: Mon, 15 Jun 2015 00:25:22 +0200 Subject: [PATCH 460/488] Fixed odd chars on mac for agnoster theme --- themes/agnoster.zsh-theme | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 8c7be6e01..9f67543f5 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -26,7 +26,13 @@ # A few utility functions to make it easy and re-usable to draw segmented prompts CURRENT_BG='NONE' -SEGMENT_SEPARATOR='' + +# Fix odd char on mac +if [[ `uname` == 'Darwin' ]]; then + SEGMENT_SEPARATOR='\ue0b0' +else + SEGMENT_SEPARATOR='' +fi # Begin a segment # Takes two arguments, background and foreground. Both can be omitted, From f66a54fb7862b396e3fc09e7041ca6fee4b42a4a Mon Sep 17 00:00:00 2001 From: Ali Afshar <aafshar@gmail.com> Date: Sun, 14 Jun 2015 22:29:11 -0700 Subject: [PATCH 461/488] Add missing space causing parse error. --- lib/misc.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/misc.zsh b/lib/misc.zsh index e90836475..6d1a64e8d 100644 --- a/lib/misc.zsh +++ b/lib/misc.zsh @@ -1,6 +1,6 @@ ## Load smart urls if available for d in $fpath; do - if [[ -e "$d/url-quote-magic"]]; then + if [[ -e "$d/url-quote-magic" ]]; then autoload -U url-quote-magic zle -N self-insert url-quote-magic fi From d0670aa2bd5186357961dd90c4a97c2c3842f728 Mon Sep 17 00:00:00 2001 From: Andrew Janke <andrew@apjanke.net> Date: Mon, 15 Jun 2015 16:55:25 -0400 Subject: [PATCH 462/488] Fix merge conflict for jira-prefix and jira add comment --- plugins/jira/jira.plugin.zsh | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index 8ad60b8fe..ca540c84c 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -42,13 +42,6 @@ open_jira_issue () { $open_cmd "${jira_url}/secure/CreateIssue!default.jspa" elif [[ "$1" = "assigned" || "$1" = "reported" ]]; then jira_query $@ - else - echo "Opening issue #$1" - if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then - $open_cmd "$jira_url/issues/$jira_prefix$1" - else - $open_cmd "$jira_url/browse/$jira_prefix$1" - fi else local addcomment='' if [[ "$2" == "m" ]]; then @@ -59,9 +52,9 @@ open_jira_issue () { fi if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then - $open_cmd "$jira_url/issues/$1$addcomment" + $open_cmd "$jira_url/issues/$jira_prefix$1$addcomment" else - $open_cmd "$jira_url/browse/$1$addcomment" + $open_cmd "$jira_url/browse/$jira_prefix$1$addcomment" fi fi } From ed6645a2823dc6c3e0fae822186d79542682e68e Mon Sep 17 00:00:00 2001 From: Arnaud Rinquin <rinquin.arnaud@gmail.com> Date: Wed, 17 Jun 2015 13:25:09 +0100 Subject: [PATCH 463/488] Fix plugin/git ggpull and ggpush backward compatibility Current `ggpush` is `git push origin` instead of `git push origin $(current_branch)` Same for `ggpull` --- plugins/git/git.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index d59e0ca9f..168618760 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -105,7 +105,7 @@ ggl() { git pull origin "${b:=$1}" "${*[2,-1]}" } compdef _git ggl=git-checkout -alias ggpull='ggl' +alias ggpull='git pull origin $(current_branch)' compdef _git ggpull=git-checkout ggp() { if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then @@ -116,7 +116,7 @@ git push origin "${b:=$1}" fi } compdef _git ggp=git-checkout -alias ggpush='ggp' +alias ggpush='git push origin $(current_branch)' compdef _git ggpush=git-checkout ggpnp() { if [[ "$#" == 0 ]]; then From d24196cfbdb1b1c7a7055d6dae97c4e4c3e2b4c3 Mon Sep 17 00:00:00 2001 From: ncanceill <nicolas.canceill@ens-cachan.org> Date: Wed, 17 Jun 2015 22:38:31 +0200 Subject: [PATCH 464/488] git plugin: fix ggl to avoid empty string see https://github.com/robbyrussell/oh-my-zsh/pull/2790#issuecomment-112716330 --- plugins/git/git.plugin.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index 168618760..cc6eb1031 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -101,8 +101,12 @@ git push --force origin "${b:=$1}" } compdef _git ggf=git-checkout ggl() { +if [[ "$#" != 0 ]] && [[ "$#" != 1 ]]; then +git pull origin "${*}" +else [[ "$#" == 0 ]] && local b="$(current_branch)" -git pull origin "${b:=$1}" "${*[2,-1]}" +git pull origin "${b:=$1}" +fi } compdef _git ggl=git-checkout alias ggpull='git pull origin $(current_branch)' From 546b99ad4c509c6a9a4933fce2c662553f790b86 Mon Sep 17 00:00:00 2001 From: Fredrik Strandin <fredrik.strandin@telavox.se> Date: Fri, 26 Jun 2015 15:47:00 +0200 Subject: [PATCH 465/488] Use 'quit all' instead of counting needed quits --- plugins/vundle/vundle.plugin.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/plugins/vundle/vundle.plugin.zsh b/plugins/vundle/vundle.plugin.zsh index b5f1c0bbf..fa1911477 100644 --- a/plugins/vundle/vundle.plugin.zsh +++ b/plugins/vundle/vundle.plugin.zsh @@ -13,15 +13,15 @@ function vundle-init () { function vundle () { vundle-init - vim -c "execute \"PluginInstall\" | q | q" + vim -c "execute \"PluginInstall\" | qa" } function vundle-update () { vundle-init - vim -c "execute \"PluginInstall!\" | q | q" + vim -c "execute \"PluginInstall!\" | qa" } function vundle-clean () { vundle-init - vim -c "execute \"PluginClean!\" | q | q" + vim -c "execute \"PluginClean!\" | qa" } From 0950f9c56da1f22bbddc45cf179a80a712908b19 Mon Sep 17 00:00:00 2001 From: moncho <ramon.cr@gmail.com> Date: Sun, 28 Jun 2015 11:16:17 +0200 Subject: [PATCH 466/488] Plugin now uses completion script from docker-compose repo. --- plugins/docker-compose/README.md | 4 + plugins/docker-compose/_docker-compose | 308 ++++++++++++++++++ .../docker-compose/docker-compose.plugin.zsh | 14 - 3 files changed, 312 insertions(+), 14 deletions(-) create mode 100644 plugins/docker-compose/_docker-compose delete mode 100644 plugins/docker-compose/docker-compose.plugin.zsh diff --git a/plugins/docker-compose/README.md b/plugins/docker-compose/README.md index 77b98f30d..567b82148 100644 --- a/plugins/docker-compose/README.md +++ b/plugins/docker-compose/README.md @@ -1 +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-compose/docker-compose.plugin.zsh b/plugins/docker-compose/docker-compose.plugin.zsh deleted file mode 100644 index 08500408d..000000000 --- a/plugins/docker-compose/docker-compose.plugin.zsh +++ /dev/null @@ -1,14 +0,0 @@ -# Authors: -# https://github.com/tristola -# -# Docker-compose related zsh aliases - -# Aliases ################################################################### - -alias dcup='docker-compose up' -alias dcb='docker-compose build' -alias dcrm='docker-compose rm' -alias dcps='docker-compose ps' -alias dcstop='docker-compose stop' -alias dcrestart='docker-compose restart' - From c1f1f91daad68fa000900dc647157bbfdb2b603f Mon Sep 17 00:00:00 2001 From: Andrew Janke <andrew@apjanke.net> Date: Mon, 29 Jun 2015 18:55:58 -0400 Subject: [PATCH 467/488] virtualenvwrapper: Replace "realpath" with portable zsh-native `:A` and `:h` modifiers --- plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index 9fd0d3d8f..f5f37ff6f 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -30,16 +30,17 @@ if [[ "$WORKON_HOME" == "" ]]; then fi if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then - # Automatically activate Git projects's virtual environments based on the + # Automatically activate Git projects' virtual environments 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 function workon_cwd { if [ ! $WORKON_CWD ]; then WORKON_CWD=1 # Check if this is a Git repo - PROJECT_ROOT=`pwd` + # Get absolute path, resolving symlinks + PROJECT_ROOT="${PWD:A}" while [[ "$PROJECT_ROOT" != "/" && ! -e "$PROJECT_ROOT/.venv" ]]; do - PROJECT_ROOT=`realpath $PROJECT_ROOT/..` + PROJECT_ROOT="${PROJECT_ROOT:h}" done if [[ "$PROJECT_ROOT" == "/" ]]; then PROJECT_ROOT="." @@ -50,7 +51,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then 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 From f73e642e2265601b705b6aa9d9f71878ca98644a Mon Sep 17 00:00:00 2001 From: Andrew Janke <andrew@apjanke.net> Date: Thu, 2 Jul 2015 21:42:32 -0400 Subject: [PATCH 468/488] virtualenvwrapper: treat git repos as project roots again (instead of requiring a .venv customization directory) Change error output to more conventional OMZ format, so it's clear the plugin is for oh-my-zsh and not base zsh. Use `local` variables instead of manual unsetting. --- .../virtualenvwrapper.plugin.zsh | 28 +++++++++++-------- 1 file changed, 16 insertions(+), 12 deletions(-) diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index f5f37ff6f..c40ca86ac 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -14,32 +14,38 @@ elif [[ -f "/etc/bash_completion.d/virtualenvwrapper" ]]; then 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' 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 + 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 - PROJECT_ROOT="${PWD:A}" - while [[ "$PROJECT_ROOT" != "/" && ! -e "$PROJECT_ROOT/.venv" ]]; do + 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 @@ -47,7 +53,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then 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 @@ -69,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 } From 6d618ef70e5abfc5e18656ba8064ead0c8974386 Mon Sep 17 00:00:00 2001 From: Andrew Janke <andrew@apjanke.net> Date: Wed, 15 Jul 2015 02:56:48 -0400 Subject: [PATCH 469/488] emoji plugin: generate char map from Unicode UTR51 data files Refactor the functions and group listings to have fewer functions, but have them take group names as parameters. Pull group definitions in to a single associative array. --- plugins/emoji/README.md | 135 +++ plugins/emoji/emoji-char-definitions.zsh | 1294 +++++++++++++++++++++ plugins/emoji/emoji-data.txt | 1308 ++++++++++++++++++++++ plugins/emoji/emoji.plugin.zsh | 1096 +++--------------- plugins/emoji/update_emoji.pl | 113 ++ 5 files changed, 3026 insertions(+), 920 deletions(-) create mode 100644 plugins/emoji/README.md create mode 100644 plugins/emoji/emoji-char-definitions.zsh create mode 100644 plugins/emoji/emoji-data.txt create mode 100644 plugins/emoji/update_emoji.pl 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..7d110603c --- /dev/null +++ b/plugins/emoji/emoji-char-definitions.zsh @@ -0,0 +1,1294 @@ + +# 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 + +typeset -gAH emoji +typeset -gAH emoji_flags + +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[emoji_modifier_fitzpatrick_type_3]=$'\U1F3FC' +emoji[emoji_modifier_fitzpatrick_type_4]=$'\U1F3FD' +emoji[emoji_modifier_fitzpatrick_type_5]=$'\U1F3FE' +emoji[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 index be761871e..dbaf2bb9e 100644 --- a/plugins/emoji/emoji.plugin.zsh +++ b/plugins/emoji/emoji.plugin.zsh @@ -1,876 +1,149 @@ -# Make emoji available within the ZSH terminal +# emoji plugin +# +# Makes emoji support available within ZSH +# +# This plugin provides support for working with emoji characters in zsh using human-readable +# identifiers. It provides global variables which map emoji names to the actual +# characters, and some anmed groupings of emoji. It also provides associated functions +# for displaying them. +# +# Global variables: +# $emoji - Maps emoji names to characters +# $emoji2 - Auxiliary and combining characters +# $emoji_flags - Maps country names to flag characters (using region-indicators) +# $emoji_skintone - Skin tone modifiers (from Unicode 8.0) +# $emoji_groups - Named groups of emoji. Keys are group names; values are whitespace-separated +# lists of character names +# +# Functions: +# random_emoji - Prints a random emoji character +# display_emoji - Displays emoji, along with their names +# +# 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. +# +# The emoji in the main $emoji map are standalone character sequences which can all be output on their +# own, without worrying about combining effects. 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. +# +# Usage and Examples: # # To output a specific emoji, use: # $> echo $emoji[<name>] -# ex: $> echo $emoji[mouse_face] +# E.g.: +# $> echo $emoji[mouse_face] # # To output a random emoji, use: # $> random_emoji -# $> random_emoji_fruit -# $> random_emoji_animal -# $> random_emoji_vehicle -# $> random_emoji_face +# 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 valid group names can be found with `echo ${(k)emoji_groups}` # -# To list all available emoji with names, use: -# $> display_all_emoji -# $> display_emoji_fruits -# $> display_emoji_animals -# $> display_emoji_vehicles -# $> display_emoji_faces +# 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 an emoji in a prompt: -# PROMPT='$(echo $emoji[penguin]) > ' -# PROMPT='$(random_emoji_fruit) > ' -# eval surfer=$(echo $emoji[surfer]) -# PROMPT='$surfer > ' +# To use emoji in a prompt: +# PROMPT="$emoji[penguin] > "" +# PROMPT='$(random_emoji fruits) > ' +# surfer=$emoji[surfer] +# PROMPT="$surfer > " # -# emoji codes sourced from http://apps.timwhitlock.info/emoji/tables/unicode +# +# TODO: Move doco to a README +# TODO: Factor out parsing from generation in update_emoji.pl +# TODO: Incorporate CLDR data for ordering and groupings +# TODO: Short :bracket: style names (from gemoji) +# TODO: Country codes for flags +# TODO: ZWJ combining function? -typeset -A emoji -emoji[grinning_face_with_smiling_eyes]='\xF0\x9F\x98\x81' -emoji[face_with_tears_of_joy]='\xF0\x9F\x98\x82' -emoji[smiling_face_with_open_mouth]='\xF0\x9F\x98\x83' -emoji[smiling_face_with_open_mouth_and_smiling_eyes]='\xF0\x9F\x98\x84' -emoji[smiling_face_with_open_mouth_and_cold_sweat]='\xF0\x9F\x98\x85' -emoji[smiling_face_with_open_mouth_and_tightly_closed_eyes]='\xF0\x9F\x98\x86' -emoji[winking_face]='\xF0\x9F\x98\x89' -emoji[smiling_face_with_smiling_eyes]='\xF0\x9F\x98\x8A' -emoji[face_savouring_delicious_food]='\xF0\x9F\x98\x8B' -emoji[relieved_face]='\xF0\x9F\x98\x8C' -emoji[smiling_face_with_heart_shaped_eyes]='\xF0\x9F\x98\x8D' -emoji[smirking_face]='\xF0\x9F\x98\x8F' -emoji[unamused_face]='\xF0\x9F\x98\x92' -emoji[face_with_cold_sweat]='\xF0\x9F\x98\x93' -emoji[pensive_face]='\xF0\x9F\x98\x94' -emoji[confounded_face]='\xF0\x9F\x98\x96' -emoji[face_throwing_a_kiss]='\xF0\x9F\x98\x98' -emoji[kissing_face_with_closed_eyes]='\xF0\x9F\x98\x9A' -emoji[face_with_stuck_out_tongue_and_winking_eye]='\xF0\x9F\x98\x9C' -emoji[face_with_stuck_out_tongue_and_tightly_closed_eyes]='\xF0\x9F\x98\x9D' -emoji[disappointed_face]='\xF0\x9F\x98\x9E' -emoji[angry_face]='\xF0\x9F\x98\xA0' -emoji[pouting_face]='\xF0\x9F\x98\xA1' -emoji[crying_face]='\xF0\x9F\x98\xA2' -emoji[persevering_face]='\xF0\x9F\x98\xA3' -emoji[face_with_look_of_triumph]='\xF0\x9F\x98\xA4' -emoji[disappointed_but_relieved_face]='\xF0\x9F\x98\xA5' -emoji[fearful_face]='\xF0\x9F\x98\xA8' -emoji[weary_face]='\xF0\x9F\x98\xA9' -emoji[sleepy_face]='\xF0\x9F\x98\xAA' -emoji[tired_face]='\xF0\x9F\x98\xAB' -emoji[loudly_crying_face]='\xF0\x9F\x98\xAD' -emoji[face_with_open_mouth_and_cold_sweat]='\xF0\x9F\x98\xB0' -emoji[face_screaming_in_fear]='\xF0\x9F\x98\xB1' -emoji[astonished_face]='\xF0\x9F\x98\xB2' -emoji[flushed_face]='\xF0\x9F\x98\xB3' -emoji[dizzy_face]='\xF0\x9F\x98\xB5' -emoji[face_with_medical_mask]='\xF0\x9F\x98\xB7' -emoji[grinning_cat_face_with_smiling_eyes]='\xF0\x9F\x98\xB8' -emoji[cat_face_with_tears_of_joy]='\xF0\x9F\x98\xB9' -emoji[smiling_cat_face_with_open_mouth]='\xF0\x9F\x98\xBA' -emoji[smiling_cat_face_with_heart_shaped_eyes]='\xF0\x9F\x98\xBB' -emoji[cat_face_with_wry_smile]='\xF0\x9F\x98\xBC' -emoji[kissing_cat_face_with_closed_eyes]='\xF0\x9F\x98\xBD' -emoji[pouting_cat_face]='\xF0\x9F\x98\xBE' -emoji[crying_cat_face]='\xF0\x9F\x98\xBF' -emoji[weary_cat_face]='\xF0\x9F\x99\x80' -emoji[face_with_no_good_gesture]='\xF0\x9F\x99\x85' -emoji[face_with_ok_gesture]='\xF0\x9F\x99\x86' -emoji[person_bowing_deeply]='\xF0\x9F\x99\x87' -emoji[see_no_evil_monkey]='\xF0\x9F\x99\x88' -emoji[hear_no_evil_monkey]='\xF0\x9F\x99\x89' -emoji[speak_no_evil_monkey]='\xF0\x9F\x99\x8A' -emoji[happy_person_raising_one_hand]='\xF0\x9F\x99\x8B' -emoji[person_raising_both_hands_in_celebration]='\xF0\x9F\x99\x8C' -emoji[person_frowning]='\xF0\x9F\x99\x8D' -emoji[person_with_pouting_face]='\xF0\x9F\x99\x8E' -emoji[person_with_folded_hands]='\xF0\x9F\x99\x8F' -emoji[black_scissors]='\xE2\x9C\x82' -emoji[white_heavy_check_mark]='\xE2\x9C\x85' -emoji[airplane]='\xE2\x9C\x88' -emoji[envelope]='\xE2\x9C\x89' -emoji[raised_fist]='\xE2\x9C\x8A' -emoji[raised_hand]='\xE2\x9C\x8B' -emoji[victory_hand]='\xE2\x9C\x8C' -emoji[pencil]='\xE2\x9C\x8F' -emoji[black_nib]='\xE2\x9C\x92' -emoji[heavy_check_mark]='\xE2\x9C\x94' -emoji[heavy_multiplication_x]='\xE2\x9C\x96' -emoji[sparkles]='\xE2\x9C\xA8' -emoji[eight_spoked_asterisk]='\xE2\x9C\xB3' -emoji[eight_pointed_black_star]='\xE2\x9C\xB4' -emoji[snowflake]='\xE2\x9D\x84' -emoji[sparkle]='\xE2\x9D\x87' -emoji[cross_mark]='\xE2\x9D\x8C' -emoji[negative_squared_cross_mark]='\xE2\x9D\x8E' -emoji[black_question_mark_ornament]='\xE2\x9D\x93' -emoji[white_question_mark_ornament]='\xE2\x9D\x94' -emoji[white_exclamation_mark_ornament]='\xE2\x9D\x95' -emoji[heavy_exclamation_mark_symbol]='\xE2\x9D\x97' -emoji[heavy_black_heart]='\xE2\x9D\xA4' -emoji[heavy_plus_sign]='\xE2\x9E\x95' -emoji[heavy_minus_sign]='\xE2\x9E\x96' -emoji[heavy_division_sign]='\xE2\x9E\x97' -emoji[black_rightwards_arrow]='\xE2\x9E\xA1' -emoji[curly_loop]='\xE2\x9E\xB0' -emoji[rocket]='\xF0\x9F\x9A\x80' -emoji[railway_car]='\xF0\x9F\x9A\x83' -emoji[high_speed_train]='\xF0\x9F\x9A\x84' -emoji[high_speed_train_with_bullet_nose]='\xF0\x9F\x9A\x85' -emoji[metro]='\xF0\x9F\x9A\x87' -emoji[station]='\xF0\x9F\x9A\x89' -emoji[bus]='\xF0\x9F\x9A\x8C' -emoji[bus_stop]='\xF0\x9F\x9A\x8F' -emoji[ambulance]='\xF0\x9F\x9A\x91' -emoji[fire_engine]='\xF0\x9F\x9A\x92' -emoji[police_car]='\xF0\x9F\x9A\x93' -emoji[taxi]='\xF0\x9F\x9A\x95' -emoji[automobile]='\xF0\x9F\x9A\x97' -emoji[recreational_vehicle]='\xF0\x9F\x9A\x99' -emoji[delivery_truck]='\xF0\x9F\x9A\x9A' -emoji[ship]='\xF0\x9F\x9A\xA2' -emoji[speedboat]='\xF0\x9F\x9A\xA4' -emoji[horizontal_traffic_light]='\xF0\x9F\x9A\xA5' -emoji[construction_sign]='\xF0\x9F\x9A\xA7' -emoji[police_cars_revolving_light]='\xF0\x9F\x9A\xA8' -emoji[triangular_flag_on_post]='\xF0\x9F\x9A\xA9' -emoji[door]='\xF0\x9F\x9A\xAA' -emoji[no_entry_sign]='\xF0\x9F\x9A\xAB' -emoji[smoking_symbol]='\xF0\x9F\x9A\xAC' -emoji[no_smoking_symbol]='\xF0\x9F\x9A\xAD' -emoji[bicycle]='\xF0\x9F\x9A\xB2' -emoji[pedestrian]='\xF0\x9F\x9A\xB6' -emoji[mens_symbol]='\xF0\x9F\x9A\xB9' -emoji[womens_symbol]='\xF0\x9F\x9A\xBA' -emoji[restroom]='\xF0\x9F\x9A\xBB' -emoji[baby_symbol]='\xF0\x9F\x9A\xBC' -emoji[toilet]='\xF0\x9F\x9A\xBD' -emoji[water_closet]='\xF0\x9F\x9A\xBE' -emoji[bath]='\xF0\x9F\x9B\x80' -emoji[circled_latin_capital_letter_m]='\xE2\x93\x82' -emoji[negative_squared_latin_capital_letter_a]='\xF0\x9F\x85\xB0' -emoji[negative_squared_latin_capital_letter_b]='\xF0\x9F\x85\xB1' -emoji[negative_squared_latin_capital_letter_o]='\xF0\x9F\x85\xBE' -emoji[negative_squared_latin_capital_letter_p]='\xF0\x9F\x85\xBF' -emoji[negative_squared_ab]='\xF0\x9F\x86\x8E' -emoji[squared_cl]='\xF0\x9F\x86\x91' -emoji[squared_cool]='\xF0\x9F\x86\x92' -emoji[squared_free]='\xF0\x9F\x86\x93' -emoji[squared_id]='\xF0\x9F\x86\x94' -emoji[squared_new]='\xF0\x9F\x86\x95' -emoji[squared_ng]='\xF0\x9F\x86\x96' -emoji[squared_ok]='\xF0\x9F\x86\x97' -emoji[squared_sos]='\xF0\x9F\x86\x98' -emoji[squared_up_with_exclamation_mark]='\xF0\x9F\x86\x99' -emoji[squared_vs]='\xF0\x9F\x86\x9A' -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' -emoji[squared_katakana_koko]='\xF0\x9F\x88\x81' -emoji[squared_katakana_sa]='\xF0\x9F\x88\x82' -emoji[squared_cjk_unified_ideograph_7121]='\xF0\x9F\x88\x9A' -emoji[squared_cjk_unified_ideograph_6307]='\xF0\x9F\x88\xAF' -emoji[squared_cjk_unified_ideograph_7981]='\xF0\x9F\x88\xB2' -emoji[squared_cjk_unified_ideograph_7a7a]='\xF0\x9F\x88\xB3' -emoji[squared_cjk_unified_ideograph_5408]='\xF0\x9F\x88\xB4' -emoji[squared_cjk_unified_ideograph_6e80]='\xF0\x9F\x88\xB5' -emoji[squared_cjk_unified_ideograph_6709]='\xF0\x9F\x88\xB6' -emoji[squared_cjk_unified_ideograph_6708]='\xF0\x9F\x88\xB7' -emoji[squared_cjk_unified_ideograph_7533]='\xF0\x9F\x88\xB8' -emoji[squared_cjk_unified_ideograph_5272]='\xF0\x9F\x88\xB9' -emoji[squared_cjk_unified_ideograph_55b6]='\xF0\x9F\x88\xBA' -emoji[circled_ideograph_advantage]='\xF0\x9F\x89\x90' -emoji[circled_ideograph_accept]='\xF0\x9F\x89\x91' -emoji[copyright_sign]='\xC2\xA9' -emoji[registered_sign]='\xC2\xAE' -emoji[double_exclamation_mark]='\xE2\x80\xBC' -emoji[exclamation_question_mark]='\xE2\x81\x89' -emoji[digit_eight_combining_enclosing_keycap]='\x38\xE2\x83\xA3' -emoji[digit_nine_combining_enclosing_keycap]='\x39\xE2\x83\xA3' -emoji[digit_seven_combining_enclosing_keycap]='\x37\xE2\x83\xA3' -emoji[digit_six_combining_enclosing_keycap]='\x36\xE2\x83\xA3' -emoji[digit_one_combining_enclosing_keycap]='\x31\xE2\x83\xA3' -emoji[digit_zero_combining_enclosing_keycap]='\x30\xE2\x83\xA3' -emoji[digit_two_combining_enclosing_keycap]='\x32\xE2\x83\xA3' -emoji[digit_three_combining_enclosing_keycap]='\x33\xE2\x83\xA3' -emoji[digit_five_combining_enclosing_keycap]='\x35\xE2\x83\xA3' -emoji[digit_four_combining_enclosing_keycap]='\x34\xE2\x83\xA3' -emoji[number_sign_combining_enclosing_keycap]='\x23\xE2\x83\xA3' -emoji[trade_mark_sign]='\xE2\x84\xA2' -emoji[information_source]='\xE2\x84\xB9' -emoji[left_right_arrow]='\xE2\x86\x94' -emoji[up_down_arrow]='\xE2\x86\x95' -emoji[north_west_arrow]='\xE2\x86\x96' -emoji[north_east_arrow]='\xE2\x86\x97' -emoji[south_east_arrow]='\xE2\x86\x98' -emoji[south_west_arrow]='\xE2\x86\x99' -emoji[leftwards_arrow_with_hook]='\xE2\x86\xA9' -emoji[rightwards_arrow_with_hook]='\xE2\x86\xAA' -emoji[watch]='\xE2\x8C\x9A' -emoji[hourglass]='\xE2\x8C\x9B' -emoji[black_right_pointing_double_triangle]='\xE2\x8F\xA9' -emoji[black_left_pointing_double_triangle]='\xE2\x8F\xAA' -emoji[black_up_pointing_double_triangle]='\xE2\x8F\xAB' -emoji[black_down_pointing_double_triangle]='\xE2\x8F\xAC' -emoji[alarm_clock]='\xE2\x8F\xB0' -emoji[hourglass_with_flowing_sand]='\xE2\x8F\xB3' -emoji[black_small_square]='\xE2\x96\xAA' -emoji[white_small_square]='\xE2\x96\xAB' -emoji[black_right_pointing_triangle]='\xE2\x96\xB6' -emoji[black_left_pointing_triangle]='\xE2\x97\x80' -emoji[white_medium_square]='\xE2\x97\xBB' -emoji[black_medium_square]='\xE2\x97\xBC' -emoji[white_medium_small_square]='\xE2\x97\xBD' -emoji[black_medium_small_square]='\xE2\x97\xBE' -emoji[black_sun_with_rays]='\xE2\x98\x80' -emoji[cloud]='\xE2\x98\x81' -emoji[black_telephone]='\xE2\x98\x8E' -emoji[ballot_box_with_check]='\xE2\x98\x91' -emoji[umbrella_with_rain_drops]='\xE2\x98\x94' -emoji[hot_beverage]='\xE2\x98\x95' -emoji[white_up_pointing_index]='\xE2\x98\x9D' -emoji[white_smiling_face]='\xE2\x98\xBA' -emoji[aries]='\xE2\x99\x88' -emoji[taurus]='\xE2\x99\x89' -emoji[gemini]='\xE2\x99\x8A' -emoji[cancer]='\xE2\x99\x8B' -emoji[leo]='\xE2\x99\x8C' -emoji[virgo]='\xE2\x99\x8D' -emoji[libra]='\xE2\x99\x8E' -emoji[scorpius]='\xE2\x99\x8F' -emoji[sagittarius]='\xE2\x99\x90' -emoji[capricorn]='\xE2\x99\x91' -emoji[aquarius]='\xE2\x99\x92' -emoji[pisces]='\xE2\x99\x93' -emoji[black_spade_suit]='\xE2\x99\xA0' -emoji[black_club_suit]='\xE2\x99\xA3' -emoji[black_heart_suit]='\xE2\x99\xA5' -emoji[black_diamond_suit]='\xE2\x99\xA6' -emoji[hot_springs]='\xE2\x99\xA8' -emoji[black_universal_recycling_symbol]='\xE2\x99\xBB' -emoji[wheelchair_symbol]='\xE2\x99\xBF' -emoji[anchor]='\xE2\x9A\x93' -emoji[warning_sign]='\xE2\x9A\xA0' -emoji[high_voltage_sign]='\xE2\x9A\xA1' -emoji[medium_white_circle]='\xE2\x9A\xAA' -emoji[medium_black_circle]='\xE2\x9A\xAB' -emoji[soccer_ball]='\xE2\x9A\xBD' -emoji[baseball]='\xE2\x9A\xBE' -emoji[snowman_without_snow]='\xE2\x9B\x84' -emoji[sun_behind_cloud]='\xE2\x9B\x85' -emoji[ophiuchus]='\xE2\x9B\x8E' -emoji[no_entry]='\xE2\x9B\x94' -emoji[church]='\xE2\x9B\xAA' -emoji[fountain]='\xE2\x9B\xB2' -emoji[flag_in_hole]='\xE2\x9B\xB3' -emoji[sailboat]='\xE2\x9B\xB5' -emoji[tent]='\xE2\x9B\xBA' -emoji[fuel_pump]='\xE2\x9B\xBD' -emoji[arrow_pointing_rightwards_then_curving_upwards]='\xE2\xA4\xB4' -emoji[arrow_pointing_rightwards_then_curving_downwards]='\xE2\xA4\xB5' -emoji[leftwards_black_arrow]='\xE2\xAC\x85' -emoji[upwards_black_arrow]='\xE2\xAC\x86' -emoji[downwards_black_arrow]='\xE2\xAC\x87' -emoji[black_large_square]='\xE2\xAC\x9B' -emoji[white_large_square]='\xE2\xAC\x9C' -emoji[white_medium_star]='\xE2\xAD\x90' -emoji[heavy_large_circle]='\xE2\xAD\x95' -emoji[wavy_dash]='\xE3\x80\xB0' -emoji[part_alternation_mark]='\xE3\x80\xBD' -emoji[circled_ideograph_congratulation]='\xE3\x8A\x97' -emoji[circled_ideograph_secret]='\xE3\x8A\x99' -emoji[mahjong_tile_red_dragon]='\xF0\x9F\x80\x84' -emoji[playing_card_black_joker]='\xF0\x9F\x83\x8F' -emoji[cyclone]='\xF0\x9F\x8C\x80' -emoji[foggy]='\xF0\x9F\x8C\x81' -emoji[closed_umbrella]='\xF0\x9F\x8C\x82' -emoji[night_with_stars]='\xF0\x9F\x8C\x83' -emoji[sunrise_over_mountains]='\xF0\x9F\x8C\x84' -emoji[sunrise]='\xF0\x9F\x8C\x85' -emoji[cityscape_at_dusk]='\xF0\x9F\x8C\x86' -emoji[sunset_over_buildings]='\xF0\x9F\x8C\x87' -emoji[rainbow]='\xF0\x9F\x8C\x88' -emoji[bridge_at_night]='\xF0\x9F\x8C\x89' -emoji[water_wave]='\xF0\x9F\x8C\x8A' -emoji[volcano]='\xF0\x9F\x8C\x8B' -emoji[milky_way]='\xF0\x9F\x8C\x8C' -emoji[earth_globe_asia_australia]='\xF0\x9F\x8C\x8F' -emoji[new_moon_symbol]='\xF0\x9F\x8C\x91' -emoji[first_quarter_moon_symbol]='\xF0\x9F\x8C\x93' -emoji[waxing_gibbous_moon_symbol]='\xF0\x9F\x8C\x94' -emoji[full_moon_symbol]='\xF0\x9F\x8C\x95' -emoji[crescent_moon]='\xF0\x9F\x8C\x99' -emoji[first_quarter_moon_with_face]='\xF0\x9F\x8C\x9B' -emoji[glowing_star]='\xF0\x9F\x8C\x9F' -emoji[shooting_star]='\xF0\x9F\x8C\xA0' -emoji[chestnut]='\xF0\x9F\x8C\xB0' -emoji[seedling]='\xF0\x9F\x8C\xB1' -emoji[palm_tree]='\xF0\x9F\x8C\xB4' -emoji[cactus]='\xF0\x9F\x8C\xB5' -emoji[tulip]='\xF0\x9F\x8C\xB7' -emoji[cherry_blossom]='\xF0\x9F\x8C\xB8' -emoji[rose]='\xF0\x9F\x8C\xB9' -emoji[hibiscus]='\xF0\x9F\x8C\xBA' -emoji[sunflower]='\xF0\x9F\x8C\xBB' -emoji[blossom]='\xF0\x9F\x8C\xBC' -emoji[ear_of_maize]='\xF0\x9F\x8C\xBD' -emoji[ear_of_rice]='\xF0\x9F\x8C\xBE' -emoji[herb]='\xF0\x9F\x8C\xBF' -emoji[four_leaf_clover]='\xF0\x9F\x8D\x80' -emoji[maple_leaf]='\xF0\x9F\x8D\x81' -emoji[fallen_leaf]='\xF0\x9F\x8D\x82' -emoji[leaf_fluttering_in_wind]='\xF0\x9F\x8D\x83' -emoji[mushroom]='\xF0\x9F\x8D\x84' -emoji[tomato]='\xF0\x9F\x8D\x85' -emoji[aubergine]='\xF0\x9F\x8D\x86' -emoji[grapes]='\xF0\x9F\x8D\x87' -emoji[melon]='\xF0\x9F\x8D\x88' -emoji[watermelon]='\xF0\x9F\x8D\x89' -emoji[tangerine]='\xF0\x9F\x8D\x8A' -emoji[banana]='\xF0\x9F\x8D\x8C' -emoji[pineapple]='\xF0\x9F\x8D\x8D' -emoji[red_apple]='\xF0\x9F\x8D\x8E' -emoji[green_apple]='\xF0\x9F\x8D\x8F' -emoji[peach]='\xF0\x9F\x8D\x91' -emoji[cherries]='\xF0\x9F\x8D\x92' -emoji[strawberry]='\xF0\x9F\x8D\x93' -emoji[hamburger]='\xF0\x9F\x8D\x94' -emoji[slice_of_pizza]='\xF0\x9F\x8D\x95' -emoji[meat_on_bone]='\xF0\x9F\x8D\x96' -emoji[poultry_leg]='\xF0\x9F\x8D\x97' -emoji[rice_cracker]='\xF0\x9F\x8D\x98' -emoji[rice_ball]='\xF0\x9F\x8D\x99' -emoji[cooked_rice]='\xF0\x9F\x8D\x9A' -emoji[curry_and_rice]='\xF0\x9F\x8D\x9B' -emoji[steaming_bowl]='\xF0\x9F\x8D\x9C' -emoji[spaghetti]='\xF0\x9F\x8D\x9D' -emoji[bread]='\xF0\x9F\x8D\x9E' -emoji[french_fries]='\xF0\x9F\x8D\x9F' -emoji[roasted_sweet_potato]='\xF0\x9F\x8D\xA0' -emoji[dango]='\xF0\x9F\x8D\xA1' -emoji[oden]='\xF0\x9F\x8D\xA2' -emoji[sushi]='\xF0\x9F\x8D\xA3' -emoji[fried_shrimp]='\xF0\x9F\x8D\xA4' -emoji[fish_cake_with_swirl_design]='\xF0\x9F\x8D\xA5' -emoji[soft_ice_cream]='\xF0\x9F\x8D\xA6' -emoji[shaved_ice]='\xF0\x9F\x8D\xA7' -emoji[ice_cream]='\xF0\x9F\x8D\xA8' -emoji[doughnut]='\xF0\x9F\x8D\xA9' -emoji[cookie]='\xF0\x9F\x8D\xAA' -emoji[chocolate_bar]='\xF0\x9F\x8D\xAB' -emoji[candy]='\xF0\x9F\x8D\xAC' -emoji[lollipop]='\xF0\x9F\x8D\xAD' -emoji[custard]='\xF0\x9F\x8D\xAE' -emoji[honey_pot]='\xF0\x9F\x8D\xAF' -emoji[shortcake]='\xF0\x9F\x8D\xB0' -emoji[bento_box]='\xF0\x9F\x8D\xB1' -emoji[pot_of_food]='\xF0\x9F\x8D\xB2' -emoji[cooking]='\xF0\x9F\x8D\xB3' -emoji[fork_and_knife]='\xF0\x9F\x8D\xB4' -emoji[teacup_without_handle]='\xF0\x9F\x8D\xB5' -emoji[sake_bottle_and_cup]='\xF0\x9F\x8D\xB6' -emoji[wine_glass]='\xF0\x9F\x8D\xB7' -emoji[cocktail_glass]='\xF0\x9F\x8D\xB8' -emoji[tropical_drink]='\xF0\x9F\x8D\xB9' -emoji[beer_mug]='\xF0\x9F\x8D\xBA' -emoji[clinking_beer_mugs]='\xF0\x9F\x8D\xBB' -emoji[ribbon]='\xF0\x9F\x8E\x80' -emoji[wrapped_present]='\xF0\x9F\x8E\x81' -emoji[birthday_cake]='\xF0\x9F\x8E\x82' -emoji[jack_o_lantern]='\xF0\x9F\x8E\x83' -emoji[christmas_tree]='\xF0\x9F\x8E\x84' -emoji[father_christmas]='\xF0\x9F\x8E\x85' -emoji[fireworks]='\xF0\x9F\x8E\x86' -emoji[firework_sparkler]='\xF0\x9F\x8E\x87' -emoji[balloon]='\xF0\x9F\x8E\x88' -emoji[party_popper]='\xF0\x9F\x8E\x89' -emoji[confetti_ball]='\xF0\x9F\x8E\x8A' -emoji[tanabata_tree]='\xF0\x9F\x8E\x8B' -emoji[crossed_flags]='\xF0\x9F\x8E\x8C' -emoji[pine_decoration]='\xF0\x9F\x8E\x8D' -emoji[japanese_dolls]='\xF0\x9F\x8E\x8E' -emoji[carp_streamer]='\xF0\x9F\x8E\x8F' -emoji[wind_chime]='\xF0\x9F\x8E\x90' -emoji[moon_viewing_ceremony]='\xF0\x9F\x8E\x91' -emoji[school_satchel]='\xF0\x9F\x8E\x92' -emoji[graduation_cap]='\xF0\x9F\x8E\x93' -emoji[carousel_horse]='\xF0\x9F\x8E\xA0' -emoji[ferris_wheel]='\xF0\x9F\x8E\xA1' -emoji[roller_coaster]='\xF0\x9F\x8E\xA2' -emoji[fishing_pole_and_fish]='\xF0\x9F\x8E\xA3' -emoji[microphone]='\xF0\x9F\x8E\xA4' -emoji[movie_camera]='\xF0\x9F\x8E\xA5' -emoji[cinema]='\xF0\x9F\x8E\xA6' -emoji[headphone]='\xF0\x9F\x8E\xA7' -emoji[artist_palette]='\xF0\x9F\x8E\xA8' -emoji[top_hat]='\xF0\x9F\x8E\xA9' -emoji[circus_tent]='\xF0\x9F\x8E\xAA' -emoji[ticket]='\xF0\x9F\x8E\xAB' -emoji[clapper_board]='\xF0\x9F\x8E\xAC' -emoji[performing_arts]='\xF0\x9F\x8E\xAD' -emoji[video_game]='\xF0\x9F\x8E\xAE' -emoji[direct_hit]='\xF0\x9F\x8E\xAF' -emoji[slot_machine]='\xF0\x9F\x8E\xB0' -emoji[billiards]='\xF0\x9F\x8E\xB1' -emoji[game_die]='\xF0\x9F\x8E\xB2' -emoji[bowling]='\xF0\x9F\x8E\xB3' -emoji[flower_playing_cards]='\xF0\x9F\x8E\xB4' -emoji[musical_note]='\xF0\x9F\x8E\xB5' -emoji[multiple_musical_notes]='\xF0\x9F\x8E\xB6' -emoji[saxophone]='\xF0\x9F\x8E\xB7' -emoji[guitar]='\xF0\x9F\x8E\xB8' -emoji[musical_keyboard]='\xF0\x9F\x8E\xB9' -emoji[trumpet]='\xF0\x9F\x8E\xBA' -emoji[violin]='\xF0\x9F\x8E\xBB' -emoji[musical_score]='\xF0\x9F\x8E\xBC' -emoji[running_shirt_with_sash]='\xF0\x9F\x8E\xBD' -emoji[tennis_racquet_and_ball]='\xF0\x9F\x8E\xBE' -emoji[ski_and_ski_boot]='\xF0\x9F\x8E\xBF' -emoji[basketball_and_hoop]='\xF0\x9F\x8F\x80' -emoji[chequered_flag]='\xF0\x9F\x8F\x81' -emoji[snowboarder]='\xF0\x9F\x8F\x82' -emoji[runner]='\xF0\x9F\x8F\x83' -emoji[surfer]='\xF0\x9F\x8F\x84' -emoji[trophy]='\xF0\x9F\x8F\x86' -emoji[american_football]='\xF0\x9F\x8F\x88' -emoji[swimmer]='\xF0\x9F\x8F\x8A' -emoji[house_building]='\xF0\x9F\x8F\xA0' -emoji[house_with_garden]='\xF0\x9F\x8F\xA1' -emoji[office_building]='\xF0\x9F\x8F\xA2' -emoji[japanese_post_office]='\xF0\x9F\x8F\xA3' -emoji[hospital]='\xF0\x9F\x8F\xA5' -emoji[bank]='\xF0\x9F\x8F\xA6' -emoji[automated_teller_machine]='\xF0\x9F\x8F\xA7' -emoji[hotel]='\xF0\x9F\x8F\xA8' -emoji[love_hotel]='\xF0\x9F\x8F\xA9' -emoji[convenience_store]='\xF0\x9F\x8F\xAA' -emoji[school]='\xF0\x9F\x8F\xAB' -emoji[department_store]='\xF0\x9F\x8F\xAC' -emoji[factory]='\xF0\x9F\x8F\xAD' -emoji[izakaya_lantern]='\xF0\x9F\x8F\xAE' -emoji[japanese_castle]='\xF0\x9F\x8F\xAF' -emoji[european_castle]='\xF0\x9F\x8F\xB0' -emoji[snail]='\xF0\x9F\x90\x8C' -emoji[snake]='\xF0\x9F\x90\x8D' -emoji[horse]='\xF0\x9F\x90\x8E' -emoji[sheep]='\xF0\x9F\x90\x91' -emoji[monkey]='\xF0\x9F\x90\x92' -emoji[chicken]='\xF0\x9F\x90\x94' -emoji[boar]='\xF0\x9F\x90\x97' -emoji[elephant]='\xF0\x9F\x90\x98' -emoji[octopus]='\xF0\x9F\x90\x99' -emoji[spiral_shell]='\xF0\x9F\x90\x9A' -emoji[bug]='\xF0\x9F\x90\x9B' -emoji[ant]='\xF0\x9F\x90\x9C' -emoji[honeybee]='\xF0\x9F\x90\x9D' -emoji[lady_beetle]='\xF0\x9F\x90\x9E' -emoji[fish]='\xF0\x9F\x90\x9F' -emoji[tropical_fish]='\xF0\x9F\x90\xA0' -emoji[blowfish]='\xF0\x9F\x90\xA1' -emoji[turtle]='\xF0\x9F\x90\xA2' -emoji[hatching_chick]='\xF0\x9F\x90\xA3' -emoji[baby_chick]='\xF0\x9F\x90\xA4' -emoji[front_facing_baby_chick]='\xF0\x9F\x90\xA5' -emoji[bird]='\xF0\x9F\x90\xA6' -emoji[penguin]='\xF0\x9F\x90\xA7' -emoji[koala]='\xF0\x9F\x90\xA8' -emoji[poodle]='\xF0\x9F\x90\xA9' -emoji[bactrian_camel]='\xF0\x9F\x90\xAB' -emoji[dolphin]='\xF0\x9F\x90\xAC' -emoji[mouse_face]='\xF0\x9F\x90\xAD' -emoji[cow_face]='\xF0\x9F\x90\xAE' -emoji[tiger_face]='\xF0\x9F\x90\xAF' -emoji[rabbit_face]='\xF0\x9F\x90\xB0' -emoji[cat_face]='\xF0\x9F\x90\xB1' -emoji[dragon_face]='\xF0\x9F\x90\xB2' -emoji[spouting_whale]='\xF0\x9F\x90\xB3' -emoji[horse_face]='\xF0\x9F\x90\xB4' -emoji[monkey_face]='\xF0\x9F\x90\xB5' -emoji[dog_face]='\xF0\x9F\x90\xB6' -emoji[pig_face]='\xF0\x9F\x90\xB7' -emoji[frog_face]='\xF0\x9F\x90\xB8' -emoji[hamster_face]='\xF0\x9F\x90\xB9' -emoji[wolf_face]='\xF0\x9F\x90\xBA' -emoji[bear_face]='\xF0\x9F\x90\xBB' -emoji[panda_face]='\xF0\x9F\x90\xBC' -emoji[pig_nose]='\xF0\x9F\x90\xBD' -emoji[paw_prints]='\xF0\x9F\x90\xBE' -emoji[eyes]='\xF0\x9F\x91\x80' -emoji[ear]='\xF0\x9F\x91\x82' -emoji[nose]='\xF0\x9F\x91\x83' -emoji[mouth]='\xF0\x9F\x91\x84' -emoji[tongue]='\xF0\x9F\x91\x85' -emoji[white_up_pointing_backhand_index]='\xF0\x9F\x91\x86' -emoji[white_down_pointing_backhand_index]='\xF0\x9F\x91\x87' -emoji[white_left_pointing_backhand_index]='\xF0\x9F\x91\x88' -emoji[white_right_pointing_backhand_index]='\xF0\x9F\x91\x89' -emoji[fisted_hand_sign]='\xF0\x9F\x91\x8A' -emoji[waving_hand_sign]='\xF0\x9F\x91\x8B' -emoji[ok_hand_sign]='\xF0\x9F\x91\x8C' -emoji[thumbs_up_sign]='\xF0\x9F\x91\x8D' -emoji[thumbs_down_sign]='\xF0\x9F\x91\x8E' -emoji[clapping_hands_sign]='\xF0\x9F\x91\x8F' -emoji[open_hands_sign]='\xF0\x9F\x91\x90' -emoji[crown]='\xF0\x9F\x91\x91' -emoji[womans_hat]='\xF0\x9F\x91\x92' -emoji[eyeglasses]='\xF0\x9F\x91\x93' -emoji[necktie]='\xF0\x9F\x91\x94' -emoji[t_shirt]='\xF0\x9F\x91\x95' -emoji[jeans]='\xF0\x9F\x91\x96' -emoji[dress]='\xF0\x9F\x91\x97' -emoji[kimono]='\xF0\x9F\x91\x98' -emoji[bikini]='\xF0\x9F\x91\x99' -emoji[womans_clothes]='\xF0\x9F\x91\x9A' -emoji[purse]='\xF0\x9F\x91\x9B' -emoji[handbag]='\xF0\x9F\x91\x9C' -emoji[pouch]='\xF0\x9F\x91\x9D' -emoji[mans_shoe]='\xF0\x9F\x91\x9E' -emoji[athletic_shoe]='\xF0\x9F\x91\x9F' -emoji[high_heeled_shoe]='\xF0\x9F\x91\xA0' -emoji[womans_sandal]='\xF0\x9F\x91\xA1' -emoji[womans_boots]='\xF0\x9F\x91\xA2' -emoji[footprints]='\xF0\x9F\x91\xA3' -emoji[bust_in_silhouette]='\xF0\x9F\x91\xA4' -emoji[boy]='\xF0\x9F\x91\xA6' -emoji[girl]='\xF0\x9F\x91\xA7' -emoji[man]='\xF0\x9F\x91\xA8' -emoji[woman]='\xF0\x9F\x91\xA9' -emoji[family]='\xF0\x9F\x91\xAA' -emoji[man_and_woman_holding_hands]='\xF0\x9F\x91\xAB' -emoji[police_officer]='\xF0\x9F\x91\xAE' -emoji[woman_with_bunny_ears]='\xF0\x9F\x91\xAF' -emoji[bride_with_veil]='\xF0\x9F\x91\xB0' -emoji[person_with_blond_hair]='\xF0\x9F\x91\xB1' -emoji[man_with_gua_pi_mao]='\xF0\x9F\x91\xB2' -emoji[man_with_turban]='\xF0\x9F\x91\xB3' -emoji[older_man]='\xF0\x9F\x91\xB4' -emoji[older_woman]='\xF0\x9F\x91\xB5' -emoji[baby]='\xF0\x9F\x91\xB6' -emoji[construction_worker]='\xF0\x9F\x91\xB7' -emoji[princess]='\xF0\x9F\x91\xB8' -emoji[japanese_ogre]='\xF0\x9F\x91\xB9' -emoji[japanese_goblin]='\xF0\x9F\x91\xBA' -emoji[ghost]='\xF0\x9F\x91\xBB' -emoji[baby_angel]='\xF0\x9F\x91\xBC' -emoji[extraterrestrial_alien]='\xF0\x9F\x91\xBD' -emoji[alien_monster]='\xF0\x9F\x91\xBE' -emoji[imp]='\xF0\x9F\x91\xBF' -emoji[skull]='\xF0\x9F\x92\x80' -emoji[information_desk_person]='\xF0\x9F\x92\x81' -emoji[guardsman]='\xF0\x9F\x92\x82' -emoji[dancer]='\xF0\x9F\x92\x83' -emoji[lipstick]='\xF0\x9F\x92\x84' -emoji[nail_polish]='\xF0\x9F\x92\x85' -emoji[face_massage]='\xF0\x9F\x92\x86' -emoji[haircut]='\xF0\x9F\x92\x87' -emoji[barber_pole]='\xF0\x9F\x92\x88' -emoji[syringe]='\xF0\x9F\x92\x89' -emoji[pill]='\xF0\x9F\x92\x8A' -emoji[kiss_mark]='\xF0\x9F\x92\x8B' -emoji[love_letter]='\xF0\x9F\x92\x8C' -emoji[ring]='\xF0\x9F\x92\x8D' -emoji[gem_stone]='\xF0\x9F\x92\x8E' -emoji[kiss]='\xF0\x9F\x92\x8F' -emoji[bouquet]='\xF0\x9F\x92\x90' -emoji[couple_with_heart]='\xF0\x9F\x92\x91' -emoji[wedding]='\xF0\x9F\x92\x92' -emoji[beating_heart]='\xF0\x9F\x92\x93' -emoji[broken_heart]='\xF0\x9F\x92\x94' -emoji[two_hearts]='\xF0\x9F\x92\x95' -emoji[sparkling_heart]='\xF0\x9F\x92\x96' -emoji[growing_heart]='\xF0\x9F\x92\x97' -emoji[heart_with_arrow]='\xF0\x9F\x92\x98' -emoji[blue_heart]='\xF0\x9F\x92\x99' -emoji[green_heart]='\xF0\x9F\x92\x9A' -emoji[yellow_heart]='\xF0\x9F\x92\x9B' -emoji[purple_heart]='\xF0\x9F\x92\x9C' -emoji[heart_with_ribbon]='\xF0\x9F\x92\x9D' -emoji[revolving_hearts]='\xF0\x9F\x92\x9E' -emoji[heart_decoration]='\xF0\x9F\x92\x9F' -emoji[diamond_shape_with_a_dot_inside]='\xF0\x9F\x92\xA0' -emoji[electric_light_bulb]='\xF0\x9F\x92\xA1' -emoji[anger_symbol]='\xF0\x9F\x92\xA2' -emoji[bomb]='\xF0\x9F\x92\xA3' -emoji[sleeping_symbol]='\xF0\x9F\x92\xA4' -emoji[collision_symbol]='\xF0\x9F\x92\xA5' -emoji[splashing_sweat_symbol]='\xF0\x9F\x92\xA6' -emoji[droplet]='\xF0\x9F\x92\xA7' -emoji[dash_symbol]='\xF0\x9F\x92\xA8' -emoji[pile_of_poo]='\xF0\x9F\x92\xA9' -emoji[flexed_biceps]='\xF0\x9F\x92\xAA' -emoji[dizzy_symbol]='\xF0\x9F\x92\xAB' -emoji[speech_balloon]='\xF0\x9F\x92\xAC' -emoji[white_flower]='\xF0\x9F\x92\xAE' -emoji[hundred_points_symbol]='\xF0\x9F\x92\xAF' -emoji[money_bag]='\xF0\x9F\x92\xB0' -emoji[currency_exchange]='\xF0\x9F\x92\xB1' -emoji[heavy_dollar_sign]='\xF0\x9F\x92\xB2' -emoji[credit_card]='\xF0\x9F\x92\xB3' -emoji[banknote_with_yen_sign]='\xF0\x9F\x92\xB4' -emoji[banknote_with_dollar_sign]='\xF0\x9F\x92\xB5' -emoji[money_with_wings]='\xF0\x9F\x92\xB8' -emoji[chart_with_upwards_trend_and_yen_sign]='\xF0\x9F\x92\xB9' -emoji[seat]='\xF0\x9F\x92\xBA' -emoji[personal_computer]='\xF0\x9F\x92\xBB' -emoji[briefcase]='\xF0\x9F\x92\xBC' -emoji[minidisc]='\xF0\x9F\x92\xBD' -emoji[floppy_disk]='\xF0\x9F\x92\xBE' -emoji[optical_disc]='\xF0\x9F\x92\xBF' -emoji[dvd]='\xF0\x9F\x93\x80' -emoji[file_folder]='\xF0\x9F\x93\x81' -emoji[open_file_folder]='\xF0\x9F\x93\x82' -emoji[page_with_curl]='\xF0\x9F\x93\x83' -emoji[page_facing_up]='\xF0\x9F\x93\x84' -emoji[calendar]='\xF0\x9F\x93\x85' -emoji[tear_off_calendar]='\xF0\x9F\x93\x86' -emoji[card_index]='\xF0\x9F\x93\x87' -emoji[chart_with_upwards_trend]='\xF0\x9F\x93\x88' -emoji[chart_with_downwards_trend]='\xF0\x9F\x93\x89' -emoji[bar_chart]='\xF0\x9F\x93\x8A' -emoji[clipboard]='\xF0\x9F\x93\x8B' -emoji[pushpin]='\xF0\x9F\x93\x8C' -emoji[round_pushpin]='\xF0\x9F\x93\x8D' -emoji[paperclip]='\xF0\x9F\x93\x8E' -emoji[straight_ruler]='\xF0\x9F\x93\x8F' -emoji[triangular_ruler]='\xF0\x9F\x93\x90' -emoji[bookmark_tabs]='\xF0\x9F\x93\x91' -emoji[ledger]='\xF0\x9F\x93\x92' -emoji[notebook]='\xF0\x9F\x93\x93' -emoji[notebook_with_decorative_cover]='\xF0\x9F\x93\x94' -emoji[closed_book]='\xF0\x9F\x93\x95' -emoji[open_book]='\xF0\x9F\x93\x96' -emoji[green_book]='\xF0\x9F\x93\x97' -emoji[blue_book]='\xF0\x9F\x93\x98' -emoji[orange_book]='\xF0\x9F\x93\x99' -emoji[books]='\xF0\x9F\x93\x9A' -emoji[name_badge]='\xF0\x9F\x93\x9B' -emoji[scroll]='\xF0\x9F\x93\x9C' -emoji[memo]='\xF0\x9F\x93\x9D' -emoji[telephone_receiver]='\xF0\x9F\x93\x9E' -emoji[pager]='\xF0\x9F\x93\x9F' -emoji[fax_machine]='\xF0\x9F\x93\xA0' -emoji[satellite_antenna]='\xF0\x9F\x93\xA1' -emoji[public_address_loudspeaker]='\xF0\x9F\x93\xA2' -emoji[cheering_megaphone]='\xF0\x9F\x93\xA3' -emoji[outbox_tray]='\xF0\x9F\x93\xA4' -emoji[inbox_tray]='\xF0\x9F\x93\xA5' -emoji[package]='\xF0\x9F\x93\xA6' -emoji[e_mail_symbol]='\xF0\x9F\x93\xA7' -emoji[incoming_envelope]='\xF0\x9F\x93\xA8' -emoji[envelope_with_downwards_arrow_above]='\xF0\x9F\x93\xA9' -emoji[closed_mailbox_with_lowered_flag]='\xF0\x9F\x93\xAA' -emoji[closed_mailbox_with_raised_flag]='\xF0\x9F\x93\xAB' -emoji[postbox]='\xF0\x9F\x93\xAE' -emoji[newspaper]='\xF0\x9F\x93\xB0' -emoji[mobile_phone]='\xF0\x9F\x93\xB1' -emoji[mobile_phone_with_rightwards_arrow_at_left]='\xF0\x9F\x93\xB2' -emoji[vibration_mode]='\xF0\x9F\x93\xB3' -emoji[mobile_phone_off]='\xF0\x9F\x93\xB4' -emoji[antenna_with_bars]='\xF0\x9F\x93\xB6' -emoji[camera]='\xF0\x9F\x93\xB7' -emoji[video_camera]='\xF0\x9F\x93\xB9' -emoji[television]='\xF0\x9F\x93\xBA' -emoji[radio]='\xF0\x9F\x93\xBB' -emoji[videocassette]='\xF0\x9F\x93\xBC' -emoji[clockwise_downwards_and_upwards_open_circle_arrows]='\xF0\x9F\x94\x83' -emoji[speaker_with_three_sound_waves]='\xF0\x9F\x94\x8A' -emoji[battery]='\xF0\x9F\x94\x8B' -emoji[electric_plug]='\xF0\x9F\x94\x8C' -emoji[left_pointing_magnifying_glass]='\xF0\x9F\x94\x8D' -emoji[right_pointing_magnifying_glass]='\xF0\x9F\x94\x8E' -emoji[lock_with_ink_pen]='\xF0\x9F\x94\x8F' -emoji[closed_lock_with_key]='\xF0\x9F\x94\x90' -emoji[key]='\xF0\x9F\x94\x91' -emoji[lock]='\xF0\x9F\x94\x92' -emoji[open_lock]='\xF0\x9F\x94\x93' -emoji[bell]='\xF0\x9F\x94\x94' -emoji[bookmark]='\xF0\x9F\x94\x96' -emoji[link_symbol]='\xF0\x9F\x94\x97' -emoji[radio_button]='\xF0\x9F\x94\x98' -emoji[back_with_leftwards_arrow_above]='\xF0\x9F\x94\x99' -emoji[end_with_leftwards_arrow_above]='\xF0\x9F\x94\x9A' -emoji[on_with_exclamation_mark_with_left_right_arrow_above]='\xF0\x9F\x94\x9B' -emoji[soon_with_rightwards_arrow_above]='\xF0\x9F\x94\x9C' -emoji[top_with_upwards_arrow_above]='\xF0\x9F\x94\x9D' -emoji[no_one_under_eighteen_symbol]='\xF0\x9F\x94\x9E' -emoji[keycap_ten]='\xF0\x9F\x94\x9F' -emoji[input_symbol_for_latin_capital_letters]='\xF0\x9F\x94\xA0' -emoji[input_symbol_for_latin_small_letters]='\xF0\x9F\x94\xA1' -emoji[input_symbol_for_numbers]='\xF0\x9F\x94\xA2' -emoji[input_symbol_for_symbols]='\xF0\x9F\x94\xA3' -emoji[input_symbol_for_latin_letters]='\xF0\x9F\x94\xA4' -emoji[fire]='\xF0\x9F\x94\xA5' -emoji[electric_torch]='\xF0\x9F\x94\xA6' -emoji[wrench]='\xF0\x9F\x94\xA7' -emoji[hammer]='\xF0\x9F\x94\xA8' -emoji[nut_and_bolt]='\xF0\x9F\x94\xA9' -emoji[hocho]='\xF0\x9F\x94\xAA' -emoji[pistol]='\xF0\x9F\x94\xAB' -emoji[crystal_ball]='\xF0\x9F\x94\xAE' -emoji[six_pointed_star_with_middle_dot]='\xF0\x9F\x94\xAF' -emoji[japanese_symbol_for_beginner]='\xF0\x9F\x94\xB0' -emoji[trident_emblem]='\xF0\x9F\x94\xB1' -emoji[black_square_button]='\xF0\x9F\x94\xB2' -emoji[white_square_button]='\xF0\x9F\x94\xB3' -emoji[large_red_circle]='\xF0\x9F\x94\xB4' -emoji[large_blue_circle]='\xF0\x9F\x94\xB5' -emoji[large_orange_diamond]='\xF0\x9F\x94\xB6' -emoji[large_blue_diamond]='\xF0\x9F\x94\xB7' -emoji[small_orange_diamond]='\xF0\x9F\x94\xB8' -emoji[small_blue_diamond]='\xF0\x9F\x94\xB9' -emoji[up_pointing_red_triangle]='\xF0\x9F\x94\xBA' -emoji[down_pointing_red_triangle]='\xF0\x9F\x94\xBB' -emoji[up_pointing_small_red_triangle]='\xF0\x9F\x94\xBC' -emoji[down_pointing_small_red_triangle]='\xF0\x9F\x94\xBD' -emoji[clock_face_one_oclock]='\xF0\x9F\x95\x90' -emoji[clock_face_two_oclock]='\xF0\x9F\x95\x91' -emoji[clock_face_three_oclock]='\xF0\x9F\x95\x92' -emoji[clock_face_four_oclock]='\xF0\x9F\x95\x93' -emoji[clock_face_five_oclock]='\xF0\x9F\x95\x94' -emoji[clock_face_six_oclock]='\xF0\x9F\x95\x95' -emoji[clock_face_seven_oclock]='\xF0\x9F\x95\x96' -emoji[clock_face_eight_oclock]='\xF0\x9F\x95\x97' -emoji[clock_face_nine_oclock]='\xF0\x9F\x95\x98' -emoji[clock_face_ten_oclock]='\xF0\x9F\x95\x99' -emoji[clock_face_eleven_oclock]='\xF0\x9F\x95\x9A' -emoji[clock_face_twelve_oclock]='\xF0\x9F\x95\x9B' -emoji[mount_fuji]='\xF0\x9F\x97\xBB' -emoji[tokyo_tower]='\xF0\x9F\x97\xBC' -emoji[statue_of_liberty]='\xF0\x9F\x97\xBD' -emoji[silhouette_of_japan]='\xF0\x9F\x97\xBE' -emoji[moyai]='\xF0\x9F\x97\xBF' -emoji[grinning_face]='\xF0\x9F\x98\x80' -emoji[smiling_face_with_halo]='\xF0\x9F\x98\x87' -emoji[smiling_face_with_horns]='\xF0\x9F\x98\x88' -emoji[smiling_face_with_sunglasses]='\xF0\x9F\x98\x8E' -emoji[neutral_face]='\xF0\x9F\x98\x90' -emoji[expressionless_face]='\xF0\x9F\x98\x91' -emoji[confused_face]='\xF0\x9F\x98\x95' -emoji[kissing_face]='\xF0\x9F\x98\x97' -emoji[kissing_face_with_smiling_eyes]='\xF0\x9F\x98\x99' -emoji[face_with_stuck_out_tongue]='\xF0\x9F\x98\x9B' -emoji[worried_face]='\xF0\x9F\x98\x9F' -emoji[frowning_face_with_open_mouth]='\xF0\x9F\x98\xA6' -emoji[anguished_face]='\xF0\x9F\x98\xA7' -emoji[grimacing_face]='\xF0\x9F\x98\xAC' -emoji[face_with_open_mouth]='\xF0\x9F\x98\xAE' -emoji[hushed_face]='\xF0\x9F\x98\xAF' -emoji[sleeping_face]='\xF0\x9F\x98\xB4' -emoji[face_without_mouth]='\xF0\x9F\x98\xB6' -emoji[helicopter]='\xF0\x9F\x9A\x81' -emoji[steam_locomotive]='\xF0\x9F\x9A\x82' -emoji[train]='\xF0\x9F\x9A\x86' -emoji[light_rail]='\xF0\x9F\x9A\x88' -emoji[tram]='\xF0\x9F\x9A\x8A' -emoji[oncoming_bus]='\xF0\x9F\x9A\x8D' -emoji[trolleybus]='\xF0\x9F\x9A\x8E' -emoji[minibus]='\xF0\x9F\x9A\x90' -emoji[oncoming_police_car]='\xF0\x9F\x9A\x94' -emoji[oncoming_taxi]='\xF0\x9F\x9A\x96' -emoji[oncoming_automobile]='\xF0\x9F\x9A\x98' -emoji[articulated_lorry]='\xF0\x9F\x9A\x9B' -emoji[tractor]='\xF0\x9F\x9A\x9C' -emoji[monorail]='\xF0\x9F\x9A\x9D' -emoji[mountain_railway]='\xF0\x9F\x9A\x9E' -emoji[suspension_railway]='\xF0\x9F\x9A\x9F' -emoji[mountain_cableway]='\xF0\x9F\x9A\xA0' -emoji[aerial_tramway]='\xF0\x9F\x9A\xA1' -emoji[rowboat]='\xF0\x9F\x9A\xA3' -emoji[vertical_traffic_light]='\xF0\x9F\x9A\xA6' -emoji[put_litter_in_its_place_symbol]='\xF0\x9F\x9A\xAE' -emoji[do_not_litter_symbol]='\xF0\x9F\x9A\xAF' -emoji[potable_water_symbol]='\xF0\x9F\x9A\xB0' -emoji[non_potable_water_symbol]='\xF0\x9F\x9A\xB1' -emoji[no_bicycles]='\xF0\x9F\x9A\xB3' -emoji[bicyclist]='\xF0\x9F\x9A\xB4' -emoji[mountain_bicyclist]='\xF0\x9F\x9A\xB5' -emoji[no_pedestrians]='\xF0\x9F\x9A\xB7' -emoji[children_crossing]='\xF0\x9F\x9A\xB8' -emoji[shower]='\xF0\x9F\x9A\xBF' -emoji[bathtub]='\xF0\x9F\x9B\x81' -emoji[passport_control]='\xF0\x9F\x9B\x82' -emoji[customs]='\xF0\x9F\x9B\x83' -emoji[baggage_claim]='\xF0\x9F\x9B\x84' -emoji[left_luggage]='\xF0\x9F\x9B\x85' -emoji[earth_globe_europe_africa]='\xF0\x9F\x8C\x8D' -emoji[earth_globe_americas]='\xF0\x9F\x8C\x8E' -emoji[globe_with_meridians]='\xF0\x9F\x8C\x90' -emoji[waxing_crescent_moon_symbol]='\xF0\x9F\x8C\x92' -emoji[waning_gibbous_moon_symbol]='\xF0\x9F\x8C\x96' -emoji[last_quarter_moon_symbol]='\xF0\x9F\x8C\x97' -emoji[waning_crescent_moon_symbol]='\xF0\x9F\x8C\x98' -emoji[new_moon_with_face]='\xF0\x9F\x8C\x9A' -emoji[last_quarter_moon_with_face]='\xF0\x9F\x8C\x9C' -emoji[full_moon_with_face]='\xF0\x9F\x8C\x9D' -emoji[sun_with_face]='\xF0\x9F\x8C\x9E' -emoji[evergreen_tree]='\xF0\x9F\x8C\xB2' -emoji[deciduous_tree]='\xF0\x9F\x8C\xB3' -emoji[lemon]='\xF0\x9F\x8D\x8B' -emoji[pear]='\xF0\x9F\x8D\x90' -emoji[baby_bottle]='\xF0\x9F\x8D\xBC' -emoji[horse_racing]='\xF0\x9F\x8F\x87' -emoji[rugby_football]='\xF0\x9F\x8F\x89' -emoji[european_post_office]='\xF0\x9F\x8F\xA4' -emoji[rat]='\xF0\x9F\x90\x80' -emoji[mouse]='\xF0\x9F\x90\x81' -emoji[ox]='\xF0\x9F\x90\x82' -emoji[water_buffalo]='\xF0\x9F\x90\x83' -emoji[cow]='\xF0\x9F\x90\x84' -emoji[tiger]='\xF0\x9F\x90\x85' -emoji[leopard]='\xF0\x9F\x90\x86' -emoji[rabbit]='\xF0\x9F\x90\x87' -emoji[cat]='\xF0\x9F\x90\x88' -emoji[dragon]='\xF0\x9F\x90\x89' -emoji[crocodile]='\xF0\x9F\x90\x8A' -emoji[whale]='\xF0\x9F\x90\x8B' -emoji[ram]='\xF0\x9F\x90\x8F' -emoji[goat]='\xF0\x9F\x90\x90' -emoji[rooster]='\xF0\x9F\x90\x93' -emoji[dog]='\xF0\x9F\x90\x95' -emoji[pig]='\xF0\x9F\x90\x96' -emoji[dromedary_camel]='\xF0\x9F\x90\xAA' -emoji[busts_in_silhouette]='\xF0\x9F\x91\xA5' -emoji[two_men_holding_hands]='\xF0\x9F\x91\xAC' -emoji[two_women_holding_hands]='\xF0\x9F\x91\xAD' -emoji[thought_balloon]='\xF0\x9F\x92\xAD' -emoji[banknote_with_euro_sign]='\xF0\x9F\x92\xB6' -emoji[banknote_with_pound_sign]='\xF0\x9F\x92\xB7' -emoji[open_mailbox_with_raised_flag]='\xF0\x9F\x93\xAC' -emoji[open_mailbox_with_lowered_flag]='\xF0\x9F\x93\xAD' -emoji[postal_horn]='\xF0\x9F\x93\xAF' -emoji[no_mobile_phones]='\xF0\x9F\x93\xB5' -emoji[twisted_rightwards_arrows]='\xF0\x9F\x94\x80' -emoji[clockwise_rightwards_and_leftwards_open_circle_arrows]='\xF0\x9F\x94\x81' -emoji[clockwise_rightwards_and_leftwards_open_circle_arrows_with_circled_one_overlay]='\xF0\x9F\x94\x82' -emoji[anticlockwise_downwards_and_upwards_open_circle_arrows]='\xF0\x9F\x94\x84' -emoji[low_brightness_symbol]='\xF0\x9F\x94\x85' -emoji[high_brightness_symbol]='\xF0\x9F\x94\x86' -emoji[speaker_with_cancellation_stroke]='\xF0\x9F\x94\x87' -emoji[speaker_with_one_sound_wave]='\xF0\x9F\x94\x89' -emoji[bell_with_cancellation_stroke]='\xF0\x9F\x94\x95' -emoji[microscope]='\xF0\x9F\x94\xAC' -emoji[telescope]='\xF0\x9F\x94\xAD' -emoji[clock_face_one_thirty]='\xF0\x9F\x95\x9C' -emoji[clock_face_two_thirty]='\xF0\x9F\x95\x9D' -emoji[clock_face_three_thirty]='\xF0\x9F\x95\x9E' -emoji[clock_face_four_thirty]='\xF0\x9F\x95\x9F' -emoji[clock_face_five_thirty]='\xF0\x9F\x95\xA0' -emoji[clock_face_six_thirty]='\xF0\x9F\x95\xA1' -emoji[clock_face_seven_thirty]='\xF0\x9F\x95\xA2' -emoji[clock_face_eight_thirty]='\xF0\x9F\x95\xA3' -emoji[clock_face_nine_thirty]='\xF0\x9F\x95\xA4' -emoji[clock_face_ten_thirty]='\xF0\x9F\x95\xA5' -emoji[clock_face_eleven_thirty]='\xF0\x9F\x95\xA6' -emoji[clock_face_twelve_thirty]='\xF0\x9F\x95\xA7' +_omz_emoji_plugin_dir="${0:h}" -emoji_fruits=( +() { + +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. +# +# These extra local arrays are used to allow more convenient formatting of the source code. + +emoji_groups[fruits]=" tomato aubergine grapes @@ -886,9 +159,9 @@ emoji_fruits=( strawberry lemon pear -) +" -emoji_vehicles=( +emoji_groups[vehicles]=" airplane rocket railway_car @@ -927,9 +200,9 @@ emoji_vehicles=( bicyclist mountain_bicyclist sailboat -) +" -emoji_animals=( +emoji_groups[animals]=" snail snake horse @@ -991,9 +264,9 @@ emoji_animals=( dog pig dromedary_camel -) +" -emoji_faces=( +emoji_groups[faces]=" grinning_face_with_smiling_eyes face_with_tears_of_joy smiling_face_with_open_mouth @@ -1032,66 +305,49 @@ emoji_faces=( flushed_face dizzy_face face_with_medical_mask -) +" -function random_emoji(){ - local emoji_array_size=${#emoji[@]} - local random_element_index=$(( ( RANDOM % $emoji_array_size ) + 1 )) - echo ${emoji[@][$random_element_index]} } -function random_emoji_from_list(){ - local array_name=$1 - local list_size=${#${(P)array_name}[@]} +# 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_name]}) + fi + local list_size=$#names local random_index=$(( ( RANDOM % $list_size ) + 1 )) - local key=${${(P)array_name}[@][$random_index]} - echo ${emoji[$key]} + local name=${names[$random_index]} + echo ${emoji[$name]} } -function display_emoji_list(){ - local array_name=$1 - for i in ${${(P)array_name}[@]}; do +# 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 } -function random_emoji_fruit(){ - random_emoji_from_list 'emoji_fruits' -} - -function random_emoji_vehicle(){ - random_emoji_from_list 'emoji_vehicles' -} - -function random_emoji_animal(){ - random_emoji_from_list 'emoji_animals' -} - -function random_emoji_face(){ - random_emoji_from_list 'emoji_faces' -} - -function display_emoji_fruits(){ - display_emoji_list 'emoji_fruits' -} - -function display_emoji_vehicles(){ - display_emoji_list 'emoji_vehicles' -} - -function display_emoji_animals(){ - display_emoji_list 'emoji_animals' -} - -function display_emoji_faces(){ - display_emoji_list 'emoji_faces' -} - -function display_all_emoji(){ - echo $emoji[@] - echo - for k in ${(k)emoji}; do - echo "${emoji[$k]} = $k" - done -} diff --git a/plugins/emoji/update_emoji.pl b/plugins/emoji/update_emoji.pl new file mode 100644 index 000000000..d90c6e316 --- /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 == "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"; + + + From 9a397254dacca687bf7d204ac9d31f02ca2af242 Mon Sep 17 00:00:00 2001 From: Andrew Janke <andrew@apjanke.net> Date: Wed, 15 Jul 2015 17:16:59 -0400 Subject: [PATCH 470/488] Remove redundant comments from the .zsh file (since they're in README now). --- plugins/emoji/emoji.plugin.zsh | 66 +--------------------------------- 1 file changed, 1 insertion(+), 65 deletions(-) diff --git a/plugins/emoji/emoji.plugin.zsh b/plugins/emoji/emoji.plugin.zsh index dbaf2bb9e..a98d0b714 100644 --- a/plugins/emoji/emoji.plugin.zsh +++ b/plugins/emoji/emoji.plugin.zsh @@ -2,71 +2,7 @@ # # Makes emoji support available within ZSH # -# This plugin provides support for working with emoji characters in zsh using human-readable -# identifiers. It provides global variables which map emoji names to the actual -# characters, and some anmed groupings of emoji. It also provides associated functions -# for displaying them. -# -# Global variables: -# $emoji - Maps emoji names to characters -# $emoji2 - Auxiliary and combining characters -# $emoji_flags - Maps country names to flag characters (using region-indicators) -# $emoji_skintone - Skin tone modifiers (from Unicode 8.0) -# $emoji_groups - Named groups of emoji. Keys are group names; values are whitespace-separated -# lists of character names -# -# Functions: -# random_emoji - Prints a random emoji character -# display_emoji - Displays emoji, along with their names -# -# 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. -# -# The emoji in the main $emoji map are standalone character sequences which can all be output on their -# own, without worrying about combining effects. 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. -# -# 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 valid 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 > " -# -# -# TODO: Move doco to a README -# TODO: Factor out parsing from generation in update_emoji.pl -# TODO: Incorporate CLDR data for ordering and groupings -# TODO: Short :bracket: style names (from gemoji) -# TODO: Country codes for flags -# TODO: ZWJ combining function? +# See the README for documentation. _omz_emoji_plugin_dir="${0:h}" From a3f0439de34ac2ce083c3d9f09b4e4f5379c158c Mon Sep 17 00:00:00 2001 From: Alex Talker <alextalker@openmailbox.org> Date: Sun, 19 Jul 2015 13:56:10 +0300 Subject: [PATCH 471/488] Fix little typo that makes the statement useless. --- themes/candy-kingdom.zsh-theme | 2 +- themes/fino-time.zsh-theme | 2 +- themes/fino.zsh-theme | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/candy-kingdom.zsh-theme b/themes/candy-kingdom.zsh-theme index adba1ad39..9d2103926 100644 --- a/themes/candy-kingdom.zsh-theme +++ b/themes/candy-kingdom.zsh-theme @@ -13,7 +13,7 @@ patches: <patches|join( → )|pre_applied(%{$fg[yellow]%})|post_applied(%{$reset } function box_name { - [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-HOST} + [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-$HOST} } PROMPT=' diff --git a/themes/fino-time.zsh-theme b/themes/fino-time.zsh-theme index 6e7e654ff..9b1db3a08 100644 --- a/themes/fino-time.zsh-theme +++ b/themes/fino-time.zsh-theme @@ -21,7 +21,7 @@ function prompt_char { } function box_name { - [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-HOST} + [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-$HOST} } diff --git a/themes/fino.zsh-theme b/themes/fino.zsh-theme index e4477589e..6eec097f5 100644 --- a/themes/fino.zsh-theme +++ b/themes/fino.zsh-theme @@ -17,7 +17,7 @@ function prompt_char { } function box_name { - [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-HOST} + [ -f ~/.box-name ] && cat ~/.box-name || echo ${SHORT_HOST:-$HOST} } local ruby_env='' From b3ce0f36d61a1585c018d2d3602fae1d72e4b024 Mon Sep 17 00:00:00 2001 From: Qix <Qix-@users.noreply.github.com> Date: Sun, 1 Mar 2015 00:36:33 -0500 Subject: [PATCH 472/488] Update README.markdown A few spelling fixes, grammatical fixes (what's with all the ellipses?), some standardization of capitalization, and a few other tweaks. As well, I changed all standalone code fragments into proper code blocks. I also added a missing theme image! --- README.markdown | 70 +++++++++++++++++++++++++++++++++---------------- 1 file changed, 47 insertions(+), 23 deletions(-) diff --git a/README.markdown b/README.markdown index 3805d1eb4..d4d3fdbaf 100644 --- a/README.markdown +++ b/README.markdown @@ -3,9 +3,9 @@ Oh My Zsh is an open source, community-driven framework for managing your [zsh](http://www.zsh.org/) configuration. That sounds boring. Let's try this again. -__Oh My Zsh is a way of life!__ Once installed, your terminal prompt will become the talk of the town _or your money back!_ Each time you interface with your command prompt, you'll be able take advantage of the hundreds of bundled plugins and pretty themes. Strangers will come up to you in cafés and ask you, _"that is amazing. are you some sort of genius?"_ Finally, you'll begin to get the sort of attention that you always felt that you deserved. ...or maybe you'll just use the time that you saved to start flossing more often. +__Oh My Zsh is a way of life!__ Once installed, your terminal prompt will become the talk of the town _or your money back!_ Each time you interact with your command prompt, you'll be able take advantage of the hundreds of bundled plugins and pretty themes. Strangers will come up to you in cafés and ask you, _"that is amazing. are you some sort of genius?"_ Finally, you'll begin to get the sort of attention that you always felt that you deserved. ...or maybe you'll just use the time that you saved to start flossing more often. -To learn more, visit http://ohmyz.sh and/or follow [ohmyzsh](https://twitter.com/ohmyzsh) on twitter. +To learn more, visit http://ohmyz.sh and/or follow [ohmyzsh](https://twitter.com/ohmyzsh) on Twitter. ## Getting Started @@ -43,7 +43,9 @@ If you spot a plugin (or several) that you would like to use with Oh My Zsh, you For example, this line might begin to look like... -`plugins=(git bundler osx rake ruby)` +```shell +plugins=(git bundler osx rake ruby) +``` #### Using Plugins @@ -51,7 +53,7 @@ Most plugins (should! we're working on this) include a __README__, which documen ### Themes -We'll admit it. Early in the Oh My Zsh world... we may have gotten far too theme happy. We have over one hundred themes now bundled. Most of them have [screenshots](https://wiki.github.com/robbyrussell/oh-my-zsh/themes) on the wiki. Check them out! +We'll admit it. Early in the Oh My Zsh world, we may have gotten a bit too theme happy. We have over one hundred themes now bundled. Most of them have [screenshots](https://wiki.github.com/robbyrussell/oh-my-zsh/themes) on the wiki. Check them out! #### Selecting a Theme @@ -59,23 +61,29 @@ _Robby's theme is the default one. It's not the fanciest one. It's not the simpl Once you find a theme that you want to use, you will need to edit the `~/.zshrc` file. You'll see an environment variable (all caps) in there that looks like: -`ZSH_THEME="robbyrussell"` +```shell +ZSH_THEME="robbyrussell" +``` To use a different theme, simple change the value to match the name of your desired theme. For example: -`ZSH_THEME="agnoster"` (this is one of the fancy ones) +```shell +ZSH_THEME="agnoster" # (this is one of the fancy ones) +``` Open up a new terminal window and your prompt should look something like... -In case you did not find a suitable theme for your needs, please have a look at the wiki for [more themes](https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes). + + +In case you did not find a suitable theme for your needs, please have a look at the wiki for [more of them](https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes). ## Advanced Topics -If you're the type that likes to get their hands dirty... these sections might resonate. +If you're the type that likes to get their hands dirty, these sections might resonate. ### Advanced Installation -For those who want to install this manually and/or set custom paths. +Some users may want to change the default path, or manually install Oh My Zsh. #### Custom Directory @@ -83,27 +91,37 @@ The default location is `~/.oh-my-zsh` (hidden in your home directory) If you'd like to change the install directory with the `ZSH` environment variable, either by running `export ZSH=/your/path` before installing, or by setting it before the end of the install pipeline like this: -`curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | ZSH=~/.dotfiles/zsh sh` +```shell +curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | ZSH=~/.dotfiles/zsh sh +``` #### Manual Installation ##### 1. Clone the repository: -`git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh` +```shell +git clone git://github.com/robbyrussell/oh-my-zsh.git ~/.oh-my-zsh +``` -##### 2. *Optionally*, backup your existing @~/.zshrc@ file: +##### 2. *Optionally*, backup your existing `~/.zshrc` file: -`cp ~/.zshrc ~/.zshrc.orig` +```shell +cp ~/.zshrc ~/.zshrc.orig +``` ##### 3. Create a new zsh configuration file You can create a new zsh config file by copying the template that we included for you. -`cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc` +```shell +cp ~/.oh-my-zsh/templates/zshrc.zsh-template ~/.zshrc +``` ##### 4. Change your default shell -`chsh -s /bin/zsh` +```shell +chsh -s /bin/zsh +``` ##### 5. Initialize your new zsh configuration @@ -120,7 +138,7 @@ If you have any hiccups installing, here are a few common fixes. If you want to override any of the default behaviors, just add a new file (ending in `.zsh`) in the `custom/` directory. -If you have many functions that go well together, you can put them as a `abcyzeae.plugin.zsh` file in the `custom/plugins/` directory and then enable this plugin. +If you have many functions that go well together, you can put them as a `XYZ.plugin.zsh` file in the `custom/plugins/` directory and then enable this plugin. If you would like to override the functionality of a plugin distributed with Oh My Zsh, create a plugin of the same name in the `custom/plugins/` directory and it will be loaded instead of the one in `plugins/`. @@ -128,17 +146,23 @@ If you would like to override the functionality of a plugin distributed with Oh By default, you will be prompted to check for upgrades every few weeks. If you would like `oh-my-zsh` to automatically upgrade itself without prompting you, set the following in your `~/.zshrc`: -`DISABLE_UPDATE_PROMPT=true` +```shell +DISABLE_UPDATE_PROMPT=true +``` To disable automatic upgrades, set the following in your `~/.zshrc`: -`DISABLE_AUTO_UPDATE=true` +```shell +DISABLE_AUTO_UPDATE=true +``` ### Manual Updates -If you'd like to upgrade at any point in time (maybe someone just released a new plugin and you don't want to wait a week?)... you just need to run: +If you'd like to upgrade at any point in time (maybe someone just released a new plugin and you don't want to wait a week?) you just need to run: -`upgrade_oh_my_zsh` +```shell +upgrade_oh_my_zsh +``` Magic! @@ -154,7 +178,7 @@ I'm far from being a [Zsh](http://www.zsh.org/) expert and suspect there are man We also need people to test out pull-requests. So take a look through [the open issues](https://github.com/robbyrussell/oh-my-zsh/issues) and help where you can. -### Do NOT Send Us Themes +### Do NOT send us themes We have (more than) enough themes for the time being. Please add your theme to the [external themes](https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes) wiki page. @@ -166,12 +190,12 @@ Thank you so much! ## Follow Us -We have an [ohmyzsh](https://twitter.com/ohmyzsh) account. You should follow it. +We have an [@ohmyzsh](https://twitter.com/ohmyzsh) Twitter account. You should follow it. ## Merchandise We have [stickers](http://shop.planetargon.com/products/ohmyzsh-stickers-set-of-3-stickers) and [shirts](http://shop.planetargon.com/products/ohmyzsh-t-shirts) for you to show off your love of Oh My Zsh. Again, this will help you become the talk of the town! -## LICENSE +## License Oh My Zsh is released under the [MIT license](https://github.com/robbyrussell/oh-my-zsh/blob/master/MIT-LICENSE.txt). From 5554207279809b8232970361257ec1903f5c422d Mon Sep 17 00:00:00 2001 From: Boris Avdeev <elephant@lislon.ru> Date: Fri, 31 Jul 2015 14:58:02 +0300 Subject: [PATCH 473/488] Add alias for "systemctl cat" and "systemctl edit" --- plugins/systemd/systemd.plugin.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/plugins/systemd/systemd.plugin.zsh b/plugins/systemd/systemd.plugin.zsh index 7d3db0f8e..07eb595a6 100644 --- a/plugins/systemd/systemd.plugin.zsh +++ b/plugins/systemd/systemd.plugin.zsh @@ -1,11 +1,12 @@ 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 From 90ea67edf0982923f82905d87bda5b685089f219 Mon Sep 17 00:00:00 2001 From: Andrew Janke <andrew@apjanke.net> Date: Fri, 31 Jul 2015 22:23:12 -0400 Subject: [PATCH 474/488] termsupport: protect title() with `emulate -L zsh` This prevents it from malfunctioning when `setopt prompt_subst` is off. --- lib/termsupport.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index e1c2e2f93..973c4dcf6 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -7,6 +7,9 @@ # (In screen, only short_tab_title is used) # Limited support for Apple Terminal (Terminal can't set window and tab separately) function title { + emulate -L zsh + setopt prompt_subst + [[ "$EMACS" == *term* ]] && return # if $2 is unset use $1 as default From 084792b829657cdf516799e43f89c0b8c22f4ab8 Mon Sep 17 00:00:00 2001 From: xiao <xiao.h.fan@gmail.com> Date: Mon, 3 Aug 2015 22:10:24 -0700 Subject: [PATCH 475/488] Don't clobber chpwd --- plugins/dirhistory/dirhistory.plugin.zsh | 4 +++- plugins/last-working-dir/last-working-dir.plugin.zsh | 4 +++- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/dirhistory/dirhistory.plugin.zsh b/plugins/dirhistory/dirhistory.plugin.zsh index d101cfcae..a2faa9ee4 100644 --- a/plugins/dirhistory/dirhistory.plugin.zsh +++ b/plugins/dirhistory/dirhistory.plugin.zsh @@ -49,7 +49,9 @@ function push_future() { } # Called by zsh when directory changes -function chpwd() { +typeset -ga chpwd_functions +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/last-working-dir/last-working-dir.plugin.zsh b/plugins/last-working-dir/last-working-dir.plugin.zsh index 75041f08e..708ae4f74 100644 --- a/plugins/last-working-dir/last-working-dir.plugin.zsh +++ b/plugins/last-working-dir/last-working-dir.plugin.zsh @@ -8,7 +8,9 @@ mkdir -p $ZSH_CACHE_DIR cache_file="$ZSH_CACHE_DIR/last-working-dir" # Updates the last directory once directory is changed. -function chpwd() { +typeset -ga chpwd_functions +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" } From aac552362917fc729c80d191dd387016e39f97a0 Mon Sep 17 00:00:00 2001 From: xiao <xiao.h.fan@gmail.com> Date: Mon, 3 Aug 2015 22:58:29 -0700 Subject: [PATCH 476/488] Additional chpwd clobbering fix for dirpersist --- plugins/dirpersist/dirpersist.plugin.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/dirpersist/dirpersist.plugin.zsh b/plugins/dirpersist/dirpersist.plugin.zsh index 88d1129d4..e4590afc6 100644 --- a/plugins/dirpersist/dirpersist.plugin.zsh +++ b/plugins/dirpersist/dirpersist.plugin.zsh @@ -11,7 +11,9 @@ if [[ -f ${dirstack_file} ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then [[ -d $dirstack[1] ]] && cd $dirstack[1] && cd $OLDPWD fi -chpwd() { +typeset -ga chpwd_functions +chpwd_functions+='chpwd_dirpersist' +chpwd_dirpersist() { if (( $DIRSTACKSIZE <= 0 )) || [[ -z $dirstack_file ]]; then return; fi local -ax my_stack my_stack=( ${PWD} ${dirstack} ) From 7f3e6143ec03fd0b2558027783b375d42ceb3e4d Mon Sep 17 00:00:00 2001 From: gkze <george.kontridze@gmail.com> Date: Tue, 4 Aug 2015 11:42:28 -0700 Subject: [PATCH 477/488] Add terraform completion --- plugins/terraform/README.md | 11 +++ plugins/terraform/_terraform | 161 +++++++++++++++++++++++++++++++++++ 2 files changed, 172 insertions(+) create mode 100644 plugins/terraform/README.md create mode 100644 plugins/terraform/_terraform diff --git a/plugins/terraform/README.md b/plugins/terraform/README.md new file mode 100644 index 000000000..3f357b183 --- /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://teraform.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..1252bb961 --- /dev/null +++ b/plugins/terraform/_terraform @@ -0,0 +1,161 @@ +#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' + 'taint:Manually forcing a destroy and recreate on the next plan/apply' + 'show:Inspect Terraform state or plan' + '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.]' \ + '-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[Do not ask for input for destroy confirmation.]' \ + '-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 to read and save state (unless state-out is specified). Defaults to "terraform.tfstate".]' \ + '-state-out=[Path to write state to that is different than "-state". This can be used to preserve the old state.]' \ + '-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 \ + '-module-depth=[(n) The maximum depth to expand modules. By default this is zero, which will not expand modules at all.]' +} + +__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".]' +} + +__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.]' \ + '-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.]' \ + '-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 \ + '-force[Forces the upload of the local state, ignoring any conflicts. This should be used carefully, as force pushing can cause remote state information to be lost.]' +} + +__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.]' \ + '-input=[(true) Ask for input for variables if not directly set.]' \ + '-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.]' \ + '-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.]' +} + +__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.]' +} + +__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.]' +} + +_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 From cf78586f15fc75fb82566fbc4abcdb405d61588b Mon Sep 17 00:00:00 2001 From: Florin Patan <florinpatan@gmail.com> Date: Tue, 4 Aug 2015 21:54:01 +0200 Subject: [PATCH 478/488] Update to latest Terraform release 0.6.1 --- plugins/terraform/README.md | 2 +- plugins/terraform/_terraform | 52 +++++++++++++++++++++++------------- 2 files changed, 35 insertions(+), 19 deletions(-) diff --git a/plugins/terraform/README.md b/plugins/terraform/README.md index 3f357b183..44e38a1c0 100644 --- a/plugins/terraform/README.md +++ b/plugins/terraform/README.md @@ -4,7 +4,7 @@ Plugin for Terraform, a tool from Hashicorp for managing infrastructure safely a ### Requirements - * [Terraform](https://teraform.io/) + * [Terraform](https://terraform.io/) ### Usage diff --git a/plugins/terraform/_terraform b/plugins/terraform/_terraform index 1252bb961..11740dc48 100644 --- a/plugins/terraform/_terraform +++ b/plugins/terraform/_terraform @@ -13,8 +13,8 @@ _terraform_cmds=( 'push:Uploads the local state to the remote server' 'refresh:Update local state file against real resources' 'remote:Configures remote state management' - 'taint:Manually forcing a destroy and recreate on the next plan/apply' 'show:Inspect Terraform state or plan' + 'taint:Manually forcing a destroy and recreate on the next plan/apply' 'version:Prints the Terraform version' ) @@ -26,6 +26,7 @@ __apply() { '-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.]' } @@ -33,11 +34,13 @@ __apply() { __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[Do not ask for input for destroy confirmation.]' \ + '-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 to read and save state (unless state-out is specified). Defaults to "terraform.tfstate".]' \ - '-state-out=[Path to write state to that is different than "-state". This can be used to preserve the old state.]' \ + '-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.]' } @@ -49,7 +52,9 @@ __get() { __graph() { _arguments \ - '-module-depth=[(n) The maximum depth to expand modules. By default this is zero, which will not expand modules at all.]' + '-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() { @@ -63,49 +68,50 @@ __init() { __output() { _arguments \ - '-state=[(path) Path to the state file to read. Defaults to "terraform.tfstate".]' + '-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 \ - '-force[Forces the upload of the local state, ignoring any conflicts. This should be used carefully, as force pushing can cause remote state information to be lost.]' + '-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.]' \ - '-input=[(true) Ask for input for variables if not directly set.]' \ '-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.]' } -__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.]' -} - __remote() { _arguments \ '-address=[(url) URL of the remote storage server. Required for HTTP backend, optional for Atlas and Consul.]' \ @@ -125,6 +131,16 @@ __show() { '-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 From cddfc3b038d821ddb6d0e81410675ffaeb11cac9 Mon Sep 17 00:00:00 2001 From: "xiao.fan" <xiao.fan@workday.com> Date: Tue, 4 Aug 2015 15:07:47 -0700 Subject: [PATCH 479/488] style fixes --- plugins/dirhistory/dirhistory.plugin.zsh | 3 +-- plugins/dirpersist/dirpersist.plugin.zsh | 3 +-- plugins/last-working-dir/last-working-dir.plugin.zsh | 3 +-- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/dirhistory/dirhistory.plugin.zsh b/plugins/dirhistory/dirhistory.plugin.zsh index a2faa9ee4..0209981e3 100644 --- a/plugins/dirhistory/dirhistory.plugin.zsh +++ b/plugins/dirhistory/dirhistory.plugin.zsh @@ -49,8 +49,7 @@ function push_future() { } # Called by zsh when directory changes -typeset -ga chpwd_functions -chpwd_functions+='chpwd_dirhistory' +chpwd_functions+=(chpwd_dirhistory) function chpwd_dirhistory() { push_past $PWD # If DIRHISTORY_CD is not set... diff --git a/plugins/dirpersist/dirpersist.plugin.zsh b/plugins/dirpersist/dirpersist.plugin.zsh index e4590afc6..616e2c3c6 100644 --- a/plugins/dirpersist/dirpersist.plugin.zsh +++ b/plugins/dirpersist/dirpersist.plugin.zsh @@ -11,8 +11,7 @@ if [[ -f ${dirstack_file} ]] && [[ ${#dirstack[*]} -eq 0 ]] ; then [[ -d $dirstack[1] ]] && cd $dirstack[1] && cd $OLDPWD fi -typeset -ga chpwd_functions -chpwd_functions+='chpwd_dirpersist' +chpwd_functions+=(chpwd_dirpersist) chpwd_dirpersist() { if (( $DIRSTACKSIZE <= 0 )) || [[ -z $dirstack_file ]]; then return; fi local -ax my_stack diff --git a/plugins/last-working-dir/last-working-dir.plugin.zsh b/plugins/last-working-dir/last-working-dir.plugin.zsh index 708ae4f74..c458464ce 100644 --- a/plugins/last-working-dir/last-working-dir.plugin.zsh +++ b/plugins/last-working-dir/last-working-dir.plugin.zsh @@ -8,8 +8,7 @@ mkdir -p $ZSH_CACHE_DIR cache_file="$ZSH_CACHE_DIR/last-working-dir" # Updates the last directory once directory is changed. -typeset -ga chpwd_functions -chpwd_functions+='chpwd_last_working_dir' +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" From 2d0bfcf81846ea4cb0fe2a42f3dac7f2c60e77b7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Wed, 5 Aug 2015 00:27:51 +0200 Subject: [PATCH 480/488] Implement cross-platform open function open_command() For now this supports: - Mac OS X - Linux (presumably works on all versions) - Cygwin (Windows) --- lib/functions.zsh | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/lib/functions.zsh b/lib/functions.zsh index 17f5f9cbf..0d632a268 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -15,6 +15,22 @@ function take() { cd $1 } +function open_command() { + local open_cmd + + # 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 + + nohup $open_cmd "$@" &>/dev/null +} + # # Get the value of an alias. # From d1d06b5675bebbe54f3d876eb993b6e89d8963c7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Wed, 5 Aug 2015 00:32:57 +0200 Subject: [PATCH 481/488] Use standard open command in current plugins Substitutes the current duplicate logic for the standard and cross-platform function open_command in plugins: frontend-search, jira, node, web-search --- .../frontend-search/frontend-search.plugin.zsh | 10 +--------- plugins/jira/jira.plugin.zsh | 15 ++++----------- plugins/node/node.plugin.zsh | 10 +--------- plugins/web-search/web-search.plugin.zsh | 12 +----------- 4 files changed, 7 insertions(+), 40 deletions(-) diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh index b9fb8634c..f7485621b 100644 --- a/plugins/frontend-search/frontend-search.plugin.zsh +++ b/plugins/frontend-search/frontend-search.plugin.zsh @@ -2,14 +2,6 @@ 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" @@ -113,7 +105,7 @@ function frontend() { echo "$url" - $open_cmd "$url" + open_command "$url" } diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index ca540c84c..9a8932702 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -11,13 +11,6 @@ # 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 - if [ -f .jira-url ]; then jira_url=$(cat .jira-url) elif [ -f ~/.jira-url ]; then @@ -39,7 +32,7 @@ open_jira_issue () { if [ -z "$1" ]; then echo "Opening new issue" - $open_cmd "${jira_url}/secure/CreateIssue!default.jspa" + open_command "${jira_url}/secure/CreateIssue!default.jspa" elif [[ "$1" = "assigned" || "$1" = "reported" ]]; then jira_query $@ else @@ -52,9 +45,9 @@ open_jira_issue () { fi if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then - $open_cmd "$jira_url/issues/$jira_prefix$1$addcomment" + open_command "$jira_url/issues/$jira_prefix$1$addcomment" else - $open_cmd "$jira_url/browse/$jira_prefix$1$addcomment" + open_command "$jira_url/browse/$jira_prefix$1$addcomment" fi fi } @@ -90,7 +83,7 @@ jira_query () { 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" + open_command "${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" } alias jira='open_jira_issue' 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/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index d407edb96..7c3ad9046 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -14,16 +14,6 @@ function web_search() { github "https://github.com/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." @@ -41,7 +31,7 @@ function web_search() { url="${(j://:)${(s:/:)urls[$1]}[1,2]}" fi - nohup $open_cmd "$url" &>/dev/null + open_command "$url" } From b760a10cb27e5e17ad32e51ffac3374334fa4888 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Wed, 5 Aug 2015 01:02:17 +0200 Subject: [PATCH 482/488] Use standard open command in fasd and lighthouse plugins --- plugins/fasd/fasd.plugin.zsh | 6 +++--- plugins/lighthouse/lighthouse.plugin.zsh | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/plugins/fasd/fasd.plugin.zsh b/plugins/fasd/fasd.plugin.zsh index 472ab2b0f..b11f0b511 100644 --- a/plugins/fasd/fasd.plugin.zsh +++ b/plugins/fasd/fasd.plugin.zsh @@ -5,7 +5,7 @@ if [ $commands[fasd] ]; then # check if fasd is installed fi source "$fasd_cache" unset fasd_cache - alias v='f -e vim' - alias o='a -e open' -fi + alias v='f -e vim' + alias o='a -e open_command' +fi 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 } From ccb0ae57207b1701c3187faf49c417fb0a902f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Fri, 7 Aug 2015 22:45:46 +0200 Subject: [PATCH 483/488] Add quotes to support folders with whitespace --- plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh index c40ca86ac..6cd30732e 100644 --- a/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh +++ b/plugins/virtualenvwrapper/virtualenvwrapper.plugin.zsh @@ -38,7 +38,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then local WORKON_CWD=1 # Check if this is a Git repo local GIT_REPO_ROOT="" - local GIT_TOPLEVEL=$(git rev-parse --show-toplevel 2> /dev/null) + local GIT_TOPLEVEL="$(git rev-parse --show-toplevel 2> /dev/null)" if [[ $? == 0 ]]; then GIT_REPO_ROOT="$GIT_TOPLEVEL" fi @@ -53,7 +53,7 @@ if [[ ! $DISABLE_VENV_CD -eq 1 ]]; then 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 From 3fe3ce8bdc702d7e40917bf677b0dc34211e0a55 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Sat, 8 Aug 2015 01:31:02 +0200 Subject: [PATCH 484/488] Revert "Move custon *.zsh file sourcing up so that they can load plugins and other things that come after." This reverts commit a28dbc83937cbe624ec726199b4bbe7b65b2b2a0. --- oh-my-zsh.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index ec64c240f..4e5f77990 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -29,11 +29,6 @@ for config_file ($ZSH/lib/*.zsh); do source $config_file done -# Load all of your custom configurations from custom/ -for config_file ($ZSH_CUSTOM/*.zsh(N)); do - source $config_file -done -unset config_file is_plugin() { local base_dir=$1 @@ -77,6 +72,12 @@ for plugin ($plugins); do fi done +# Load all of your custom configurations from custom/ +for config_file ($ZSH_CUSTOM/*.zsh(N)); do + source $config_file +done +unset config_file + # Load the theme if [ "$ZSH_THEME" = "random" ]; then themes=($ZSH/themes/*zsh-theme) From 17da983442f8872e147381db215266735751abc8 Mon Sep 17 00:00:00 2001 From: Andrew Janke <andrew@apjanke.net> Date: Sun, 9 Aug 2015 15:15:12 -0400 Subject: [PATCH 485/488] termsupport: avoid repeated dir in window title in Terminal.app --- lib/termsupport.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index e1c2e2f93..ecca516f2 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -23,6 +23,10 @@ function title { ZSH_THEME_TERM_TAB_TITLE_IDLE="%15<..<%~%<<" #15 char left truncated PWD ZSH_THEME_TERM_TITLE_IDLE="%n@%m: %~" +# Avoid duplication of directory in terminals with independent dir display +if [[ $TERM_PROGRAM == Apple_Terminal ]]; then + ZSH_THEME_TERM_TITLE_IDLE="%n@%m" +fi # Runs before showing the prompt function omz_termsupport_precmd { From be5dcb8a59c795495318522522b92672886d4a58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Sun, 9 Aug 2015 21:55:10 +0200 Subject: [PATCH 486/488] Check if fbterm is installed and use $TTY variable --- plugins/fbterm/fbterm.plugin.zsh | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/plugins/fbterm/fbterm.plugin.zsh b/plugins/fbterm/fbterm.plugin.zsh index 4f0456016..d60f0e27d 100644 --- a/plugins/fbterm/fbterm.plugin.zsh +++ b/plugins/fbterm/fbterm.plugin.zsh @@ -1,6 +1,8 @@ # 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 From be10229659959a4ff455642e44fdaa5666e15ce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= <marc.cornella@live.com> Date: Sun, 9 Aug 2015 21:56:02 +0200 Subject: [PATCH 487/488] Exit only if the fbterm session closed correctly This prevents the previous behavior that exitted the zsh session even if fbterm didn't start correctly. --- plugins/fbterm/fbterm.plugin.zsh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/fbterm/fbterm.plugin.zsh b/plugins/fbterm/fbterm.plugin.zsh index d60f0e27d..bc2532092 100644 --- a/plugins/fbterm/fbterm.plugin.zsh +++ b/plugins/fbterm/fbterm.plugin.zsh @@ -2,7 +2,6 @@ if (( ${+commands[fbterm]} )); then if [[ "$TTY" = /dev/tty* ]] ; then - fbterm - exit + fbterm && exit fi fi From 9caa215a2f319b4af3369fb10a4e7ee16e03281d Mon Sep 17 00:00:00 2001 From: wubaiqing <wubaiqing@vip.qq.com> Date: Mon, 10 Aug 2015 11:41:48 +0800 Subject: [PATCH 488/488] Add Baidu support to web-search plugin --- plugins/web-search/web-search.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/web-search/web-search.plugin.zsh b/plugins/web-search/web-search.plugin.zsh index d407edb96..898eb2c3a 100644 --- a/plugins/web-search/web-search.plugin.zsh +++ b/plugins/web-search/web-search.plugin.zsh @@ -12,6 +12,7 @@ function web_search() { 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=" ) # define the open command @@ -51,6 +52,7 @@ 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' #add your own !bang searches here alias wiki='web_search duckduckgo \!w'