From 00b2cc653421c1465f7596f22c19d21f42aa0396 Mon Sep 17 00:00:00 2001 From: Andrew Dwyer Date: Sat, 21 Dec 2013 11:17:05 +1030 Subject: [PATCH 001/183] 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 00000000..e4b0d688 --- /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 16ae4e127f6af2f8f3332025ce46d45ab5bcadac Mon Sep 17 00:00:00 2001 From: Pablo Cantero Date: Sun, 26 Jan 2014 10:18:04 -0200 Subject: [PATCH 002/183] Adds support capistrano multistage completion --- plugins/capistrano/_capistrano | 53 ++++++++++++++++++++---- plugins/capistrano/capistrano.plugin.zsh | 11 +++++ 2 files changed, 57 insertions(+), 7 deletions(-) create mode 100644 plugins/capistrano/capistrano.plugin.zsh diff --git a/plugins/capistrano/_capistrano b/plugins/capistrano/_capistrano index 3cadf3d5..7a74b373 100644 --- a/plugins/capistrano/_capistrano +++ b/plugins/capistrano/_capistrano @@ -1,10 +1,49 @@ -#compdef cap +#compdef xcap cap #autoload -if [[ -f config/deploy.rb || -f Capfile ]]; then - if [[ ! -f .cap_tasks~ || config/deploy.rb -nt .cap_tasks~ ]]; then - echo "\nGenerating .cap_tasks~..." > /dev/stderr - cap -v --tasks | grep '#' | cut -d " " -f 2 > .cap_tasks~ +# Added `xcap` because `cap` is a reserved word. `cap` completion doesn't work. +# http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcap-Module + +local curcontext="$curcontext" state line ret=1 +local -a _configs + +_arguments -C \ + '1: :->cmds' \ + '2:: :->args' && ret=0 + +_cap_tasks() { + if [[ -f config/deploy.rb || -f Capfile ]]; then + if [[ ! -f .cap_tasks~ ]]; then + xcap -v --tasks | awk '{command=$2; $1=$2=$3=""; gsub(/^[ \t\r\n]+/, "", $0); gsub(":", "\\:", command); print command"["$0"]"}' > .cap_tasks~ + fi + + OLD_IFS=$IFS + IFS=$'\n' + _values 'cap commands' $(< .cap_tasks~) + IFS=$OLD_IFS + # zmodload zsh/mapfile + # _values ${(f)mapfile[.cap_tasks~]} fi - compadd `cat .cap_tasks~` -fi +} + +_cap_stages() { + compadd $(find config/deploy -name \*.rb | cut -d/ -f3 | sed s:.rb::g) +} + +case $state in + cmds) + # check if it uses multistage + if [[ -d config/deploy ]]; then + _cap_stages + else + _cap_tasks + fi + ret=0 + ;; + args) + _cap_tasks + ret=0 + ;; +esac + +return ret diff --git a/plugins/capistrano/capistrano.plugin.zsh b/plugins/capistrano/capistrano.plugin.zsh new file mode 100644 index 00000000..9a4a2cc3 --- /dev/null +++ b/plugins/capistrano/capistrano.plugin.zsh @@ -0,0 +1,11 @@ +# Added `xcap` because `cap` is a reserved word. `cap` completion doesn't work. +# http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcap-Module + +func xcap() { + if [ -f Gemfile ] + then + bundle exec cap $* + else + cap $* + fi +} From c9fbfc9f48b25c724265e06f0bce8d737c7ea13b Mon Sep 17 00:00:00 2001 From: Pablo Cantero Date: Fri, 4 Apr 2014 21:20:01 -0300 Subject: [PATCH 003/183] Uses `shipit` instead of `xcap` --- plugins/capistrano/_capistrano | 6 +++--- plugins/capistrano/capistrano.plugin.zsh | 4 ++-- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/capistrano/_capistrano b/plugins/capistrano/_capistrano index 7a74b373..c181b55c 100644 --- a/plugins/capistrano/_capistrano +++ b/plugins/capistrano/_capistrano @@ -1,7 +1,7 @@ -#compdef xcap cap +#compdef shipit #autoload -# Added `xcap` because `cap` is a reserved word. `cap` completion doesn't work. +# Added `shipit` because `cap` is a reserved word. `cap` completion doesn't work. # http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcap-Module local curcontext="$curcontext" state line ret=1 @@ -14,7 +14,7 @@ _arguments -C \ _cap_tasks() { if [[ -f config/deploy.rb || -f Capfile ]]; then if [[ ! -f .cap_tasks~ ]]; then - xcap -v --tasks | awk '{command=$2; $1=$2=$3=""; gsub(/^[ \t\r\n]+/, "", $0); gsub(":", "\\:", command); print command"["$0"]"}' > .cap_tasks~ + shipit -v --tasks | awk '{command=$2; $1=$2=$3=""; gsub(/^[ \t\r\n]+/, "", $0); gsub(":", "\\:", command); print command"["$0"]"}' > .cap_tasks~ fi OLD_IFS=$IFS diff --git a/plugins/capistrano/capistrano.plugin.zsh b/plugins/capistrano/capistrano.plugin.zsh index 9a4a2cc3..c85eb474 100644 --- a/plugins/capistrano/capistrano.plugin.zsh +++ b/plugins/capistrano/capistrano.plugin.zsh @@ -1,7 +1,7 @@ -# Added `xcap` because `cap` is a reserved word. `cap` completion doesn't work. +# Added `shipit` because `cap` is a reserved word. `cap` completion doesn't work. # http://zsh.sourceforge.net/Doc/Release/Zsh-Modules.html#The-zsh_002fcap-Module -func xcap() { +func shipit() { if [ -f Gemfile ] then bundle exec cap $* From f516b7c7f5e630ab04d31e5f7da5f443b21f173f Mon Sep 17 00:00:00 2001 From: drm00 Date: Fri, 25 Apr 2014 14:15:14 +0200 Subject: [PATCH 004/183] add check for colored ls on openbsd. (retry of #2225) --- lib/theme-and-appearance.zsh | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/theme-and-appearance.zsh b/lib/theme-and-appearance.zsh index 0353f9db..2c6d4912 100644 --- a/lib/theme-and-appearance.zsh +++ b/lib/theme-and-appearance.zsh @@ -12,8 +12,11 @@ then # 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 - # On OpenBSD, test if "colorls" is installed (this one supports colors); - # otherwise, leave ls as is, because OpenBSD's ls doesn't support -G + # On OpenBSD, "gls" (ls from GNU coreutils) and "colorls" (ls from base, + # with color and multibyte support) are available from ports. "colorls" + # will be installed on purpose and can't be pulled in by installing + # coreutils, so prefer it to "gls". + gls --color -d . &>/dev/null 2>&1 && alias ls='gls --color=tty' colorls -G -d . &>/dev/null 2>&1 && alias ls='colorls -G' else ls --color -d . &>/dev/null 2>&1 && alias ls='ls --color=tty' || alias ls='ls -G' From 12324856c6645c2e71c4dfcf5ef12313c989b387 Mon Sep 17 00:00:00 2001 From: Andrea De Pasquale Date: Tue, 24 Sep 2013 11:11:35 +0200 Subject: [PATCH 005/183] 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 9c0a430f..30410c1f 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 eb06484d4f3124a4fa922c25540fa80885fc35b5 Mon Sep 17 00:00:00 2001 From: fallwith Date: Sat, 18 Jan 2014 20:26:21 -0800 Subject: [PATCH 006/183] 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 00000000..be761871 --- /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[] +# 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 20edd5f6de221dcf4ae818c0fa91c5121afbbf0f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20K=C3=B6nig?= Date: Mon, 1 Sep 2014 15:12:36 +0200 Subject: [PATCH 007/183] gulp.js plugin --- gulp/gulp.plugin.zsh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 gulp/gulp.plugin.zsh diff --git a/gulp/gulp.plugin.zsh b/gulp/gulp.plugin.zsh new file mode 100644 index 00000000..6017c7b6 --- /dev/null +++ b/gulp/gulp.plugin.zsh @@ -0,0 +1,29 @@ +#!/usr/bin/env zsh + +# +# gulp-autocompletion-zsh +# +# Autocompletion for your gulp.js tasks +# +# Copyright(c) 2014 André König +# MIT Licensed +# + +# +# André König +# Github: https://github.com/akoenig +# Twitter: https://twitter.com/caiifr +# + +# +# Grabs all available tasks from the `gulpfile.js` +# in the current directory. +# +function $$gulp_completion() { + compls=$(grep -Eo "gulp.task\(('(([a-zA-Z0-9]|-)*)',)" gulpfile.js 2>/dev/null | grep -Eo "'(([a-zA-Z0-9]|-)*)'" | sed s/"'"//g | sort) + + completions=(${=compls}) + compadd -- $completions +} + +compdef $$gulp_completion gulp \ No newline at end of file From 8f9a72aa7b6d23f82b027a28ffe3f3f6cec8c863 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9=20K=C3=B6nig?= Date: Thu, 18 Sep 2014 19:55:44 +0200 Subject: [PATCH 008/183] Moved plugin. --- {gulp => plugins/gulp}/gulp.plugin.zsh | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename {gulp => plugins/gulp}/gulp.plugin.zsh (100%) diff --git a/gulp/gulp.plugin.zsh b/plugins/gulp/gulp.plugin.zsh similarity index 100% rename from gulp/gulp.plugin.zsh rename to plugins/gulp/gulp.plugin.zsh From 0c77e4ba6f52642d7f94e6cd72c869ad2e47c62f Mon Sep 17 00:00:00 2001 From: spacewander Date: Mon, 15 Dec 2014 12:41:22 +0800 Subject: [PATCH 009/183] update git-extras plugin --- plugins/git-extras/git-extras.plugin.zsh | 198 ++++++++++++++--------- 1 file changed, 122 insertions(+), 76 deletions(-) diff --git a/plugins/git-extras/git-extras.plugin.zsh b/plugins/git-extras/git-extras.plugin.zsh index 8419166a..d91c1af8 100644 --- a/plugins/git-extras/git-extras.plugin.zsh +++ b/plugins/git-extras/git-extras.plugin.zsh @@ -3,19 +3,20 @@ # Description # ----------- # -# Completion script for git-extras (http://github.com/visionmedia/git-extras). +# Completion script for git-extras (http://github.com/tj/git-extras). # # ------------------------------------------------------------------------------ # Authors # ------- # # * Alexis GRIMALDI (https://github.com/agrimaldi) +# * spacewander (https://github.com/spacewander) # # ------------------------------------------------------------------------------ # Inspirations # ----------- # -# * git-extras (http://github.com/visionmedia/git-extras) +# * git-extras (http://github.com/tj/git-extras) # * git-flow-completion (http://github.com/bobthecow/git-flow-completion) # # ------------------------------------------------------------------------------ @@ -30,10 +31,21 @@ __git_command_successful () { } +__git_commits() { + declare -A commits + git log --oneline -15 | sed 's/\([[:alnum:]]\{7\}\) /\1:/' | while read commit + do + hash=$(echo $commit | cut -d':' -f1) + commits[$hash]="$commit" + done + local ret=1 + _describe -t commits commit commits && ret=0 +} + __git_tag_names() { local expl declare -a tag_names - tag_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/tags 2>/dev/null)"}#refs/tags/}) + tag_names=(${${(f)"$(_call_program tags git for-each-ref --format='"%(refname)"' refs/tags 2>/dev/null)"}#refs/tags/}) __git_command_successful || return _wanted tag-names expl tag-name compadd $* - $tag_names } @@ -47,31 +59,27 @@ __git_branch_names() { _wanted branch-names expl branch-name compadd $* - $branch_names } - -__git_feature_branch_names() { +__git_specific_branch_names() { local expl declare -a branch_names - branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads/feature 2>/dev/null)"}#refs/heads/feature/}) + branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads/"$1" 2>/dev/null)"}#refs/heads/$1/}) __git_command_successful || return _wanted branch-names expl branch-name compadd $* - $branch_names } +__git_feature_branch_names() { + __git_specific_branch_names 'feature' +} + + __git_refactor_branch_names() { - local expl - declare -a branch_names - branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads/refactor 2>/dev/null)"}#refs/heads/refactor/}) - __git_command_successful || return - _wanted branch-names expl branch-name compadd $* - $branch_names + __git_specific_branch_names 'refactor' } __git_bug_branch_names() { - local expl - declare -a branch_names - branch_names=(${${(f)"$(_call_program branchrefs git for-each-ref --format='"%(refname)"' refs/heads/bug 2>/dev/null)"}#refs/heads/bug/}) - __git_command_successful || return - _wanted branch-names expl branch-name compadd $* - $branch_names + __git_specific_branch_names 'bug' } @@ -92,6 +100,35 @@ __git_author_names() { _wanted author-names expl author-name compadd $* - $author_names } +# subcommands + +_git-bug() { + local curcontext=$curcontext state line ret=1 + declare -A opt_args + + _arguments -C \ + ': :->command' \ + '*:: :->option-or-argument' && ret=0 + + case $state in + (command) + declare -a commands + commands=( + 'finish:merge bug into the current branch' + ) + _describe -t commands command commands && ret=0 + ;; + (option-or-argument) + curcontext=${curcontext%:*}-$line[1]: + case $line[1] in + (finish) + _arguments -C \ + ':branch-name:__git_bug_branch_names' + ;; + esac + esac +} + _git-changelog() { _arguments \ @@ -99,11 +136,6 @@ _git-changelog() { } -_git-effort() { - _arguments \ - '--above[ignore file with less than x commits]' \ -} - _git-contrib() { _arguments \ @@ -135,6 +167,11 @@ _git-delete-tag() { } +_git-effort() { + _arguments \ + '--above[ignore file with less than x commits]' +} + _git-extras() { local curcontext=$curcontext state line ret=1 declare -A opt_args @@ -154,20 +191,7 @@ _git-extras() { esac _arguments \ - '(-v --version)'{-v,--version}'[show current version]' \ -} - - -_git-graft() { - _arguments \ - ':src-branch-name:__git_branch_names' \ - ':dest-branch-name:__git_branch_names' -} - - -_git-squash() { - _arguments \ - ':branch-name:__git_branch_names' + '(-v --version)'{-v,--version}'[show current version]' } @@ -199,6 +223,25 @@ _git-feature() { } +_git-graft() { + _arguments \ + ':src-branch-name:__git_branch_names' \ + ':dest-branch-name:__git_branch_names' +} + + +_git-ignore() { + _arguments -C \ + '(--local -l)'{--local,-l}'[show local gitignore]' \ + '(--global -g)'{--global,-g}'[show global gitignore]' +} + +_git-missing() { + _arguments \ + ':first-branch-name:__git_branch_names' \ + ':second-branch-name:__git_branch_names' +} + _git-refactor() { local curcontext=$curcontext state line ret=1 declare -A opt_args @@ -227,59 +270,62 @@ _git-refactor() { } -_git-bug() { - local curcontext=$curcontext state line ret=1 - declare -A opt_args +_git-squash() { + _arguments \ + ':branch-name:__git_branch_names' +} - _arguments -C \ - ': :->command' \ - '*:: :->option-or-argument' && ret=0 - - case $state in - (command) - declare -a commands - commands=( - 'finish:merge bug into the current branch' - ) - _describe -t commands command commands && ret=0 - ;; - (option-or-argument) - curcontext=${curcontext%:*}-$line[1]: - case $line[1] in - (finish) - _arguments -C \ - ':branch-name:__git_bug_branch_names' - ;; - esac - esac +_git-summary() { + _arguments '--line[summarize with lines other than commits]' + __git_commits } +_git-undo(){ + _arguments -C \ + '(--soft -s)'{--soft,-s}'[only rolls back the commit but changes remain un-staged]' \ + '(--hard -h)'{--hard,-h}'[wipes your commit(s)]' +} + zstyle ':completion:*:*:git:*' user-commands \ + alias:'define, search and show aliases' \ + archive-file:'export the current HEAD of the git repository to a archive' \ + back:'undo and stage latest commits' \ + bug:'create a bug branch' \ changelog:'populate changelog file with commits since the previous tag' \ + commits-since:'list commits since a given date' \ contrib:'display author contributions' \ count:'count commits' \ + create-branch:'create local and remote branch' \ delete-branch:'delete local and remote branch' \ + delete-merged-brancees:'delete merged branches'\ delete-submodule:'delete submodule' \ delete-tag:'delete local and remote tag' \ - extras:'git-extras' \ - graft:'merge commits from source branch to destination branch' \ - squash:'merge commits from source branch into the current one as a single commit' \ - feature:'create a feature branch' \ - refactor:'create a refactor branch' \ - bug:'create a bug branch' \ - summary:'repository summary' \ effort:'display effort statistics' \ - repl:'read-eval-print-loop' \ - commits-since:'list commits since a given date' \ - release:'release commit with the given tag' \ - alias:'define, search and show aliases' \ + extras:'git-extras' \ + feature:'create a feature branch' \ + fork:'fork a repo on github' \ + fresh-branch:'create empty local branch' \ + gh-pages:'create the GitHub Pages branch' \ + graft:'merge commits from source branch to destination branch' \ ignore:'add patterns to .gitignore' \ info:'show info about the repository' \ - create-branch:'create local and remote branch' \ - fresh-branch:'create empty local branch' \ - undo:'remove the latest commit' \ - setup:'setup a git repository' \ - touch:'one step creation of new files' \ - obliterate:'Completely remove a file from the repository, including past commits and tags' \ local-commits:'list unpushed commits on the local branch' \ + lock:'lock a file excluded from version control' \ + locked:'ls files that have been locked' \ + missing:'show commits missing from another branch' \ + pr:'checks out a pull request locally' \ + rebase-patch:'rebases a patch' \ + refactor:'create a refactor branch' \ + release:'commit, tag and push changes to the repository' \ + rename-tag:'rename a tag' \ + repl:'read-eval-print-loop' \ + reset-file:'reset one file' \ + root:'show path of root' \ + setup:'setup a git repository' \ + show-tree:'show branch tree of commit history' \ + squash:'merge commits from source branch into the current one as a single commit' \ + summary:'repository summary' \ + touch:'one step creation of new files' \ + undo:'remove the latest commit' \ + unlock:'unlock a file excluded from version control' From a9e97e5d2da90cf3e2b4575888fe585972ebcc74 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Sat, 14 Feb 2015 19:05:27 -0500 Subject: [PATCH 010/183] Remove terminalapp plugin and fold its implementation in to lib/termsupport.zsh. Replaces the redundant Terminal.app support that was recently added to termsupport. --- lib/termsupport.zsh | 43 +++++++++++++++++----- plugins/terminalapp/terminalapp.plugin.zsh | 39 -------------------- 2 files changed, 33 insertions(+), 49 deletions(-) delete mode 100644 plugins/terminalapp/terminalapp.plugin.zsh diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index e1c2e2f9..da74dfdb 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -53,14 +53,37 @@ 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 -} +# Keep Apple Terminal.app's current working directory updated +# Based on this answer: http://superuser.com/a/315029 -precmd_functions+=(omz_termsupport_cwd) +if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then + # Emits the control sequence to notify Terminal.app of the cwd + function update_terminalapp_cwd() { + # Identify the directory using a "file:" scheme URL, including + # the host name to disambiguate local vs. remote paths. + + # Percent-encode the pathname. + local URL_PATH='' + { + # Use LANG=C to process text byte-by-byte. + local i ch hexch LANG=C + for ((i = 1; i <= ${#PWD}; ++i)); do + ch="$PWD[i]" + if [[ "$ch" =~ [/._~A-Za-z0-9-] ]]; then + URL_PATH+="$ch" + else + hexch=$(printf "%02X" "'$ch") + URL_PATH+="%$hexch" + fi + done + } + + local PWD_URL="file://$HOST$URL_PATH" + printf '\e]7;%s\a' "$PWD_URL" + } + + # Use a precmd hook instead of a chpwd hook to avoid contaminating output + precmd_functions+=(update_terminalapp_cwd) + # Run once to get initial cwd set + update_terminalapp_cwd +fi diff --git a/plugins/terminalapp/terminalapp.plugin.zsh b/plugins/terminalapp/terminalapp.plugin.zsh deleted file mode 100644 index 6e47ee18..00000000 --- a/plugins/terminalapp/terminalapp.plugin.zsh +++ /dev/null @@ -1,39 +0,0 @@ -# Set Apple Terminal.app resume directory -# based on this answer: http://superuser.com/a/315029 -# 2012-10-26: (javageek) Changed code using the updated answer - -# Tell the terminal about the working directory whenever it changes. -if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then - update_terminal_cwd() { - # Identify the directory using a "file:" scheme URL, including - # the host name to disambiguate local vs. remote paths. - - # Percent-encode the pathname. - local URL_PATH='' - { - # Use LANG=C to process text byte-by-byte. - local i ch hexch LANG=C - for ((i = 1; i <= ${#PWD}; ++i)); do - ch="$PWD[i]" - if [[ "$ch" =~ [/._~A-Za-z0-9-] ]]; then - URL_PATH+="$ch" - else - hexch=$(printf "%02X" "'$ch") - URL_PATH+="%$hexch" - fi - done - } - - local PWD_URL="file://$HOST$URL_PATH" - #echo "$PWD_URL" # testing - printf '\e]7;%s\a' "$PWD_URL" - } - - # Register the function so it is called whenever the working - # directory changes. - autoload add-zsh-hook - add-zsh-hook precmd update_terminal_cwd - - # Tell the terminal about the initial directory. - update_terminal_cwd -fi From 3a18c33f17fb73ead87f3c532b3f5c21ea192e10 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Sat, 14 Feb 2015 20:30:03 -0500 Subject: [PATCH 011/183] In termsupport, use LC_CTYPE instead of LANG to enable byte-by-byte text processing. LANG doesn't seem to actually work. --- lib/termsupport.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index da74dfdb..9ff8a811 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -65,8 +65,8 @@ if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then # Percent-encode the pathname. local URL_PATH='' { - # Use LANG=C to process text byte-by-byte. - local i ch hexch LANG=C + # Use LC_CTYPE=C to process text byte-by-byte. + local i ch hexch LC_CTYPE=C for ((i = 1; i <= ${#PWD}; ++i)); do ch="$PWD[i]" if [[ "$ch" =~ [/._~A-Za-z0-9-] ]]; then From 702ff1ca9167455d2df385790e9023f758d5fc33 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Tue, 17 Feb 2015 00:49:53 -0500 Subject: [PATCH 012/183] Add support for non-UTF-8 encodings in caller's locale. --- lib/termsupport.zsh | 73 +++++++++++++++++++++++++++++---------------- 1 file changed, 48 insertions(+), 25 deletions(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 9ff8a811..70b54301 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -55,35 +55,58 @@ preexec_functions+=(omz_termsupport_preexec) # Keep Apple Terminal.app's current working directory updated # Based on this answer: http://superuser.com/a/315029 +# With extra fixes to handle multibyte chars and non-UTF-8 locales if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then + + # URL-encodes a string + # Outputs the encoded string on stdout + # Returns nonzero if encoding failed + function _omz_urlencode() { + local url_str='' + { + local str=$1 + + # URLs must use UTF-8 encoding; convert if required + local encoding=${LC_CTYPE/*./} + if [[ $encoding != UTF-8 ]]; then + str=$(iconv -f $encoding -t UTF-8) + if [[ $? != 0 ]]; then + echo "Error converting string from $encoding to UTF-8" >&2 + return 1 + fi + fi + + # Use LC_CTYPE=C to process text byte-by-byte + local i ch hexch LC_CTYPE=C + for ((i = 1; i <= ${#str}; ++i)); do + ch="$str[i]" + if [[ "$ch" =~ [/._~A-Za-z0-9-] ]]; then + url_str+="$ch" + else + hexch=$(printf "%02X" "'$ch") + url_str+="%$hexch" + fi + done + echo $url_str + } + } + # Emits the control sequence to notify Terminal.app of the cwd function update_terminalapp_cwd() { - # Identify the directory using a "file:" scheme URL, including - # the host name to disambiguate local vs. remote paths. + # Identify the directory using a "file:" scheme URL, including + # the host name to disambiguate local vs. remote paths. - # Percent-encode the pathname. - local URL_PATH='' - { - # Use LC_CTYPE=C to process text byte-by-byte. - local i ch hexch LC_CTYPE=C - for ((i = 1; i <= ${#PWD}; ++i)); do - ch="$PWD[i]" - if [[ "$ch" =~ [/._~A-Za-z0-9-] ]]; then - URL_PATH+="$ch" - else - hexch=$(printf "%02X" "'$ch") - URL_PATH+="%$hexch" - fi - done - } + # Percent-encode the pathname. + local URL_PATH=$(_omz_urlencode $PWD) + [[ $? != 0 ]] && return 1 + local PWD_URL="file://$HOST$URL_PATH" + # Undocumented Terminal.app-specific control sequence + printf '\e]7;%s\a' $PWD_URL + } - local PWD_URL="file://$HOST$URL_PATH" - printf '\e]7;%s\a' "$PWD_URL" - } - - # Use a precmd hook instead of a chpwd hook to avoid contaminating output - precmd_functions+=(update_terminalapp_cwd) - # Run once to get initial cwd set - update_terminalapp_cwd + # Use a precmd hook instead of a chpwd hook to avoid contaminating output + precmd_functions+=(update_terminalapp_cwd) + # Run once to get initial cwd set + update_terminalapp_cwd fi From 187cf07c9148d5d6dda9b8ac1b453bd6e39ea550 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Tue, 17 Feb 2015 00:54:54 -0500 Subject: [PATCH 013/183] For unspecified encodings, assume it's UTF-8 or compatible (e.g. ASCII) and muddle through without character encoding conversion. --- lib/termsupport.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 70b54301..ef9f0e5f 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -69,7 +69,7 @@ if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then # URLs must use UTF-8 encoding; convert if required local encoding=${LC_CTYPE/*./} - if [[ $encoding != UTF-8 ]]; then + if [[ -n $encoding && $encoding != UTF-8 ]]; then str=$(iconv -f $encoding -t UTF-8) if [[ $? != 0 ]]; then echo "Error converting string from $encoding to UTF-8" >&2 From 1246c3e08bfb7d999bac2ae3e9933084cffbc4eb Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Fri, 20 Feb 2015 02:34:54 -0500 Subject: [PATCH 014/183] install.sh: Replace nonstandard "sed -i" with sed + mv commands. Makes portable to systems whose sed lacks "-i", like OpenBSD. --- tools/install.sh | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index bd4c5574..49619936 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -23,14 +23,16 @@ 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 "/^export ZSH=/ c\\ +sed "/^export ZSH=/ c\\ export ZSH=$ZSH -" ~/.zshrc +" ~/.zshrc > ~/.zshrc-omztemp +mv -f ~/.zshrc-omztemp ~/.zshrc echo "\033[0;34mCopying your current PATH and adding it to the end of ~/.zshrc for you.\033[0m" -sed -i -e "/export PATH=/ c\\ +sed "/export PATH=/ c\\ export PATH=\"$PATH\" -" ~/.zshrc +" ~/.zshrc > ~/.zshrc-omztemp +mv -f ~/.zshrc-omztemp ~/.zshrc if [ "$SHELL" != "$(which zsh)" ]; then echo "\033[0;34mTime to change your default shell to zsh!\033[0m" From cb37c934c0e1083897b501e5b8a85340e3b7e470 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Sat, 21 Feb 2015 16:00:40 -0500 Subject: [PATCH 015/183] Remove unnecessary braces. --- lib/termsupport.zsh | 44 +++++++++++++++++++++----------------------- 1 file changed, 21 insertions(+), 23 deletions(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index ef9f0e5f..7cb3791e 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -63,33 +63,31 @@ if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then # Outputs the encoded string on stdout # Returns nonzero if encoding failed function _omz_urlencode() { + local str=$1 local url_str='' - { - local str=$1 - # URLs must use UTF-8 encoding; convert if required - local encoding=${LC_CTYPE/*./} - if [[ -n $encoding && $encoding != UTF-8 ]]; then - str=$(iconv -f $encoding -t UTF-8) - if [[ $? != 0 ]]; then - echo "Error converting string from $encoding to UTF-8" >&2 - return 1 - fi + # URLs must use UTF-8 encoding; convert if required + local encoding=${LC_CTYPE/*./} + if [[ -n $encoding && $encoding != UTF-8 ]]; then + str=$(iconv -f $encoding -t UTF-8) + if [[ $? != 0 ]]; then + echo "Error converting string from $encoding to UTF-8" >&2 + return 1 fi + fi - # Use LC_CTYPE=C to process text byte-by-byte - local i ch hexch LC_CTYPE=C - for ((i = 1; i <= ${#str}; ++i)); do - ch="$str[i]" - if [[ "$ch" =~ [/._~A-Za-z0-9-] ]]; then - url_str+="$ch" - else - hexch=$(printf "%02X" "'$ch") - url_str+="%$hexch" - fi - done - echo $url_str - } + # Use LC_CTYPE=C to process text byte-by-byte + local i ch hexch LC_CTYPE=C + for ((i = 1; i <= ${#str}; ++i)); do + ch="$str[i]" + if [[ "$ch" =~ [/._~A-Za-z0-9-] ]]; then + url_str+="$ch" + else + hexch=$(printf "%02X" "'$ch") + url_str+="%$hexch" + fi + done + echo $url_str } # Emits the control sequence to notify Terminal.app of the cwd From 88f42b6132adedff7557170168416d575569b56e Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Sat, 21 Feb 2015 16:25:28 -0500 Subject: [PATCH 016/183] Add support for variant "utf8" locale suffix spelling. Fix dumb bug in iconv call that would cause it to hang. --- lib/termsupport.zsh | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 7cb3791e..52622f5a 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -64,12 +64,12 @@ if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then # Returns nonzero if encoding failed function _omz_urlencode() { local str=$1 - local url_str='' + local url_str="" # URLs must use UTF-8 encoding; convert if required local encoding=${LC_CTYPE/*./} - if [[ -n $encoding && $encoding != UTF-8 ]]; then - str=$(iconv -f $encoding -t UTF-8) + if [[ -n $encoding && $encoding != UTF-8 && $encoding != utf8 ]]; then + str=$(echo $str | iconv -f $encoding -t UTF-8) if [[ $? != 0 ]]; then echo "Error converting string from $encoding to UTF-8" >&2 return 1 From de769058b9bb846cdbda8eadfde7ebc1bad3993d Mon Sep 17 00:00:00 2001 From: Andrew Dwyer Date: Sat, 9 May 2015 14:33:01 +0930 Subject: [PATCH 017/183] 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 e4b0d688..3a29f39b 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 Date: Sat, 9 May 2015 15:43:30 +0930 Subject: [PATCH 018/183] 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 3a29f39b..bfcf27b9 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 ea6adc5a0a3332e541a812a2da0e94c73e2102da Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Fri, 29 May 2015 22:59:07 -0400 Subject: [PATCH 019/183] Add omz_diagnostic_dump() to help with bug reports. --- lib/diagnostics.zsh | 280 ++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 280 insertions(+) create mode 100644 lib/diagnostics.zsh diff --git a/lib/diagnostics.zsh b/lib/diagnostics.zsh new file mode 100644 index 00000000..cca13f4e --- /dev/null +++ b/lib/diagnostics.zsh @@ -0,0 +1,280 @@ +# diagnostics.zsh +# +# Diagnostic and debugging support for oh-my-zsh + +# omz_diagnostic_dump() +# +# Author: Andrew Janke +# +# Usage: +# +# omz_diagnostic_dump [-v] [-V] [file] +# +# NOTE: This is a work in progress. Its interface and behavior are going to change, +# and probably in non-back-compatible ways. +# +# Outputs a bunch of information about the state and configuration of +# oh-my-zsh, zsh, and the user's system. This is intended to provide a +# bunch of context for diagnosing your own or a third party's problems, and to +# be suitable for posting to public bug reports. +# +# The output is human-readable and its format may change over time. It is not +# suitable for parsing. All the output is in one single file so it can be posted +# as a gist or bug comment on GitHub. GitHub doesn't support attaching tarballs +# or other files to bugs; otherwise, this would probably have an option to produce +# tarballs that contain copies of the config and customization files instead of +# catting them all in to one file. +# +# This is intended to be widely portable, and run anywhere that oh-my-zsh does. +# Feel free to report any portability issues as bugs. +# +# This is written in a defensive style so it still works (and can detect) cases when +# basic functionality like echo and which have been redefined. In particular, almost +# everything is invoked with "builtin" or "command", to work in the face of user +# redefinitions. +# +# OPTIONS +# +# [file] Specifies the output file. If not given, a file in the current directory +# is selected automatically. +# +# -v Increase the verbosity of the dump output. May be specified multiple times. +# Verbosity levels: +# 0 - Basic info, shell state, omz configuration, git state +# 1 - (default) Adds key binding info and configuration file contents +# 2 - Adds zcompdump file contents +# +# -V Reduce the verbosity of the dump output. May be specified multiple times. +# +# TODO: +# * Multi-file capture +# * Add automatic gist uploading +# * Consider whether to move default output file location to TMPDIR. More robust +# but less user friendly. +# +function omz_diagnostic_dump() { + emulate -L zsh + + local thisfcn=omz_diagnostic_dump + local -A opts + local opt_verbose opt_noverbose opt_outfile + local timestamp=$(date +%Y%m%d-%H%M%S) + local outfile=omz_diagdump_$timestamp.txt + builtin zparseopts -A opts -D -- "v+=opt_verbose" "V+=opt_noverbose" + local verbose n_verbose=${#opt_verbose} n_noverbose=${#opt_noverbose} + (( verbose = 1 + n_verbose - n_noverbose )) + + if [[ ${#*} > 0 ]]; then + opt_outfile=$1 + fi + if [[ ${#*} > 1 ]]; then + builtin echo "$thisfcn: error: too many arguments" >&2 + return 1 + fi + if [[ -n "$opt_outfile" ]]; then + outfile="$opt_outfile" + fi + + # Always write directly to a file so terminal escape sequences are + # captured cleanly + _omz_diag_dump_one_big_text &> "$outfile" + if [[ $? != 0 ]]; then + builtin echo "$thisfcn: error while creating diagnostic dump; see $outfile for details" + fi + + builtin echo + builtin echo Diagnostic dump file created at: "$outfile" + builtin echo + builtin echo To share this with OMZ developers, post it as a gist on GitHub + builtin echo at "https://gist.github.com" and share the link to the gist. + builtin echo + builtin echo "WARNING: This dump file contains all your zsh and omz configuration files," + builtin echo "so don't share it publicly if there's sensitive information in them." + builtin echo + +} + +function _omz_diag_dump_one_big_text() { + local program programs progfile md5 + + builtin echo oh-my-zsh diagnostic dump + builtin echo + + # Basic system and zsh information + command date + command uname -a + builtin echo OSTYPE=$OSTYPE + command zsh --version + builtin echo User: $USER + builtin echo + + # Installed programs + programs=(sh zsh ksh bash sed cat grep find git posh) + for program in $programs; do + local md5_str="" md5="" link_str="" extra_str="" + progfile=$(builtin which $program) + if [[ $? == 0 ]]; then + if [[ -e $progfile ]]; then + if builtin whence md5 &>/dev/null; then + extra_str+=" $(md5 -q $progfile)" + fi + if [[ -h "$progfile" ]]; then + extra_str+=" ( -> ${file:A} )" + fi + fi + builtin printf '%-9s %-20s %s\n' "$program is" "$progfile" "$extra_str" + else + builtin echo "$program: not found" + fi + done + builtin echo + builtin echo Versions: + builtin echo "zsh: $(zsh --version)" + builtin echo "bash: $(bash --version | command grep bash)" + builtin echo "git: $(git --version)" + builtin echo "grep: $(grep --version)" + builtin echo + + # Core command definitions + _omz_diag_dump_check_core_commands || return 1 + builtin echo + + # ZSH Process state + builtin echo Process state: + builtin echo pwd: $PWD + if builtin whence pstree &>/dev/null; then + builtin echo Process tree for this shell: + pstree -p $$ + else + ps -fT + fi + builtin set | command grep -a '^\(ZSH\|plugins\|TERM\|LC_\|LANG\|precmd\|chpwd\|preexec\|FPATH\|TTY\|DISPLAY\|PATH\)\|OMZ' + builtin echo + #TODO: Should this include `env` instead of or in addition to `export`? + builtin echo Exported: + builtin echo $(builtin export | command sed 's/=.*//') + builtin echo + builtin echo Locale: + command locale + builtin echo + + # Zsh configuration + builtin echo Zsh configuration: + builtin echo setopt: $(builtin setopt) + builtin echo + + # Oh-my-zsh installation + builtin echo oh-my-zsh installation: + command ls -ld ~/.z* + command ls -ld ~/.oh* + builtin echo + builtin echo oh-my-zsh git state: + (cd $ZSH && builtin echo "HEAD: $(git rev-parse HEAD)" && git remote -v && git status | command grep "[^[:space:]]") + if [[ $verbose -ge 1 ]]; then + (cd $ZSH && git reflog --date=default | command grep pull) + fi + builtin echo + if [[ -e $ZSH_CUSTOM ]]; then + local custom_dir=$ZSH_CUSTOM + if [[ -h $custom_dir ]]; then + custom_dir=$(cd $custom_dir && pwd -P) + fi + builtin echo "oh-my-zsh custom dir:" + builtin echo " $ZSH_CUSTOM ($custom_dir)" + (cd ${custom_dir:h} && command find ${custom_dir:t} -name .git -prune -o -print) + builtin echo + fi + + # Key binding and terminal info + if [[ $verbose -ge 1 ]]; then + builtin echo "bindkey:" + builtin bindkey + builtin echo + builtin echo "infocmp:" + command infocmp + builtin echo + fi + + # Configuration file info + local zdotdir=${ZDOTDIR:-$HOME} + builtin echo "Zsh configuration files:" + local cfgfile cfgfiles + cfgfiles=( /etc/zshenv /etc/zprofile /etc/zshrc /etc/zlogin /etc/zlogout + $zdotdir/.zshenv $zdotdir/.zprofile $zdotdir/.zshrc $zdotdir/.zlogin $zdotdir/.zlogout ) + command ls -lad $cfgfiles 2>&1 + builtin echo + if [[ $verbose -ge 1 ]]; then + for cfgfile in $cfgfiles; do + _omz_diag_dump_echo_file_w_header $cfgfile + done + fi + builtin echo "Zsh compdump files:" + local dumpfile dumpfiles + command ls -lad $zdotdir/.zcompdump* + dumpfiles=( $zdotdir/.zcompdump*(N) ) + if [[ $verbose -ge 2 ]]; then + for dumpfile in $dumpfiles; do + _omz_diag_dump_echo_file_w_header $dumpfile + done + fi + +} + +function _omz_diag_dump_check_core_commands() { + builtin echo "Core command check:" + local redefined name builtins externals + redefined=() + # All the zsh non-module builtin commands + # These are taken from the zsh reference manual for 5.0.2 + # Commands from modules should not be included. + # (For back-compatibility, if any of these are newish, they should be removed, + # or at least made conditional on the version of the current running zsh.) + # "history" is also excluded because OMZ is known to redefine that + builtins=( alias autoload bg bindkey break builtin bye cd chdir command + comparguments compcall compctl compdescribe compfiles compgroups compquote comptags + comptry compvalues continue declare dirs disable disown echo echotc echoti emulate + enable eval exec exit export false fc fg float functions getln getopts hash + integer jobs kill let limit local log logout noglob popd print printf + pushd pushln pwd r read readonly rehash return sched set setopt shift + source suspend test times trap true ttyctl type typeset ulimit umask unalias + unfunction unhash unlimit unset unsetopt vared wait whence where which zcompile + zle zmodload zparseopts zregexparse zstyle ) + builtins_fatal=( builtin command local ) + externals=( zsh ) + for name in $builtins; do + if [[ $(builtin whence -w $name) != "$name: builtin" ]]; then + builtin echo "builtin '$name' has been redefined" + builtin which $name + redefined+=$name + fi + done + for name in $externals; do + if [[ $(builtin whence -w $name) != "$name: command" ]]; then + builtin echo "command '$name' has been redefined" + builtin which $name + redefined+=$name + fi + done + + if [[ -n "$redefined" ]]; then + builtin echo "SOME CORE COMMANDS HAVE BEEN REDEFINED: $redefined" + else + builtin echo "All core commands are defined normally" + fi + +} + +function _omz_diag_dump_echo_file_w_header() { + local file=$1 + if [[ ( -f $file || -h $file ) ]]; then + builtin echo "========== $file ==========" + if [[ -h $file ]]; then + builtin echo "========== ( => ${file:A} ) ==========" + fi + command cat $file + builtin echo "========== end $file ==========" + builtin echo + fi +} + + From 82c1288cb25b1567b4d17f33a75192de1b9f4634 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Sat, 6 Jun 2015 01:19:29 -0400 Subject: [PATCH 020/183] Include some bash rc files; improve formatting; more version info --- lib/diagnostics.zsh | 22 +++++++++++++++++----- 1 file changed, 17 insertions(+), 5 deletions(-) diff --git a/lib/diagnostics.zsh b/lib/diagnostics.zsh index cca13f4e..7991b64c 100644 --- a/lib/diagnostics.zsh +++ b/lib/diagnostics.zsh @@ -104,12 +104,12 @@ function _omz_diag_dump_one_big_text() { command date command uname -a builtin echo OSTYPE=$OSTYPE - command zsh --version + builtin echo ZSH_VERSION=$ZSH_VERSION builtin echo User: $USER builtin echo # Installed programs - programs=(sh zsh ksh bash sed cat grep find git posh) + programs=(sh zsh ksh bash sed cat grep ls find git posh) for program in $programs; do local md5_str="" md5="" link_str="" extra_str="" progfile=$(builtin which $program) @@ -119,7 +119,7 @@ function _omz_diag_dump_one_big_text() { extra_str+=" $(md5 -q $progfile)" fi if [[ -h "$progfile" ]]; then - extra_str+=" ( -> ${file:A} )" + extra_str+=" ( -> ${progfile:A} )" fi fi builtin printf '%-9s %-20s %s\n' "$program is" "$progfile" "$extra_str" @@ -128,8 +128,9 @@ function _omz_diag_dump_one_big_text() { fi done builtin echo - builtin echo Versions: + builtin echo Command Versions: builtin echo "zsh: $(zsh --version)" + builtin echo "this zsh session: $ZSH_VERSION" builtin echo "bash: $(bash --version | command grep bash)" builtin echo "git: $(git --version)" builtin echo "grep: $(grep --version)" @@ -199,8 +200,12 @@ function _omz_diag_dump_one_big_text() { local zdotdir=${ZDOTDIR:-$HOME} builtin echo "Zsh configuration files:" local cfgfile cfgfiles + # Some files for bash that zsh does not use are intentionally included + # to help with diagnosing behavior differences between bash and zsh cfgfiles=( /etc/zshenv /etc/zprofile /etc/zshrc /etc/zlogin /etc/zlogout - $zdotdir/.zshenv $zdotdir/.zprofile $zdotdir/.zshrc $zdotdir/.zlogin $zdotdir/.zlogout ) + $zdotdir/.zshenv $zdotdir/.zprofile $zdotdir/.zshrc $zdotdir/.zlogin $zdotdir/.zlogout + ~/.zsh-pre-oh-my-zsh + /etc/bashrc /etc/profile ~/.bashrc ~/.profile ~/.bash_profile ~/.bash_logout ) command ls -lad $cfgfiles 2>&1 builtin echo if [[ $verbose -ge 1 ]]; then @@ -208,6 +213,7 @@ function _omz_diag_dump_one_big_text() { _omz_diag_dump_echo_file_w_header $cfgfile done fi + builtin echo builtin echo "Zsh compdump files:" local dumpfile dumpfiles command ls -lad $zdotdir/.zcompdump* @@ -274,6 +280,12 @@ function _omz_diag_dump_echo_file_w_header() { command cat $file builtin echo "========== end $file ==========" builtin echo + elif [[ -d $file ]]; then + builtin echo "File '$file' is a directory" + elif [[ ! -e $file ]]; then + builtin echo "File '$file' does not exist" + else + command ls -lad "$file" fi } From afadb5a7fba061bc1b6da1df3b00e20ede4a5cba Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Sat, 6 Jun 2015 11:04:14 -0400 Subject: [PATCH 021/183] diagnostics: add zstyle state to output --- lib/diagnostics.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/diagnostics.zsh b/lib/diagnostics.zsh index 7991b64c..6dede066 100644 --- a/lib/diagnostics.zsh +++ b/lib/diagnostics.zsh @@ -163,6 +163,9 @@ function _omz_diag_dump_one_big_text() { builtin echo Zsh configuration: builtin echo setopt: $(builtin setopt) builtin echo + builtin echo zstyle: + builtin zstyle + builtin echo # Oh-my-zsh installation builtin echo oh-my-zsh installation: From af68165207ea757e303fdbab365ac9e3f11c8530 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Sat, 6 Jun 2015 11:50:05 -0400 Subject: [PATCH 022/183] Fix name of backed-up zshrc --- lib/diagnostics.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/diagnostics.zsh b/lib/diagnostics.zsh index 6dede066..023ba42b 100644 --- a/lib/diagnostics.zsh +++ b/lib/diagnostics.zsh @@ -207,7 +207,7 @@ function _omz_diag_dump_one_big_text() { # to help with diagnosing behavior differences between bash and zsh cfgfiles=( /etc/zshenv /etc/zprofile /etc/zshrc /etc/zlogin /etc/zlogout $zdotdir/.zshenv $zdotdir/.zprofile $zdotdir/.zshrc $zdotdir/.zlogin $zdotdir/.zlogout - ~/.zsh-pre-oh-my-zsh + ~/.zsh.pre-oh-my-zsh /etc/bashrc /etc/profile ~/.bashrc ~/.profile ~/.bash_profile ~/.bash_logout ) command ls -lad $cfgfiles 2>&1 builtin echo From 10c92cc083203d757a257f8d13731e2556a99246 Mon Sep 17 00:00:00 2001 From: Eubene Sa Date: Thu, 11 Jun 2015 01:09:44 -0700 Subject: [PATCH 023/183] Updates to ember-cli plugin --- plugins/ember-cli/README.md | 31 ++++++++++++-------------- plugins/ember-cli/ember-cli.plugin.zsh | 7 ++---- 2 files changed, 16 insertions(+), 22 deletions(-) diff --git a/plugins/ember-cli/README.md b/plugins/ember-cli/README.md index d1dedf88..482c347d 100644 --- a/plugins/ember-cli/README.md +++ b/plugins/ember-cli/README.md @@ -1,22 +1,19 @@ -# Ember-cli +# Ember CLI -**Maintainer:** [BilalBudhani](http://www.github.com/BilalBudhani) +**Maintainers:** [BilalBudhani](http://www.github.com/BilalBudhani), [eubenesa](http://www.github.com/eubenesa) -Ember-cli (http://www.ember-cli.com/) +Ember CLI (http://www.ember-cli.com/) ### List of Aliases -alias es='ember serve' -alias ea='ember addon' -alias eb='ember build' -alias ed='ember destroy' -alias eg='ember generate' -alias eh='ember help' -alias ein='ember init' -alias eia='ember install:addon' -alias eib='ember install:bower' -alias ein='ember install:npm' -alias ei='ember install' -alias et='ember test' -alias eu='ember update' -alias ev='ember version' + alias 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 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 index 044a2c04..a0f34682 100644 --- a/plugins/ember-cli/ember-cli.plugin.zsh +++ b/plugins/ember-cli/ember-cli.plugin.zsh @@ -1,5 +1,5 @@ -# Ember ClI -# visit http://www.ember-cli.com/ to view user guid +# Ember CLI +# Visit http://www.ember-cli.com/ to view user guide alias es='ember serve' alias ea='ember addon' @@ -8,9 +8,6 @@ alias ed='ember destroy' alias eg='ember generate' alias eh='ember help' alias ein='ember init' -alias eia='ember install:addon' -alias eib='ember install:bower' -alias ein='ember install:npm' alias ei='ember install' alias et='ember test' alias eu='ember update' From 01e355fb1e5dc3982efeecee699a96254f3f44e6 Mon Sep 17 00:00:00 2001 From: Michele Bologna Date: Wed, 20 May 2015 17:36:46 +0200 Subject: [PATCH 024/183] In addition to the already existing variables ZSH_THEME_GIT_PROMPT for behind, ahead and diverged remote, I added ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE. --- lib/git.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/git.zsh b/lib/git.zsh index caa7e632..baf86371 100644 --- a/lib/git.zsh +++ b/lib/git.zsh @@ -36,7 +36,10 @@ 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 -gt 0 ] && [ $behind -eq 0 ] + if [ $ahead -eq 0 ] && [ $behind -eq 0 ] + then + echo "$ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE" + elif [ $ahead -gt 0 ] && [ $behind -eq 0 ] then 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%}" From 68b792bbb67958c726dd8ebe9cfe12f5e463d160 Mon Sep 17 00:00:00 2001 From: Michele Bologna Date: Tue, 16 Jun 2015 10:48:24 +0200 Subject: [PATCH 025/183] Change to use omz git_prompt* functions Removed references for official git __git_ps1() functions. Change to use omz function git_prompt* functions like: - git_prompt_info() -> branch name - git_prompt_status() -> check if untracked, modified, added, stashed file are in the current git repo - git_remote_status() -> check if current repo is ahead, behind, or diverged. These functions returns string automatically added to your PS1; these are customizable via exporting ZSH_THEME_GIT_PROMPT* --- themes/michelebologna.zsh-theme | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/themes/michelebologna.zsh-theme b/themes/michelebologna.zsh-theme index fec24387..110e3f20 100644 --- a/themes/michelebologna.zsh-theme +++ b/themes/michelebologna.zsh-theme @@ -59,16 +59,17 @@ ZSH_THEME_GIT_PROMPT_PREFIX="" ZSH_THEME_GIT_PROMPT_SUFFIX="" 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_UNTRACKED="$blue%%" +ZSH_THEME_GIT_PROMPT_MODIFIED="$red*" +ZSH_THEME_GIT_PROMPT_ADDED="$green+" +ZSH_THEME_GIT_PROMPT_STASHED="$blue$" +ZSH_THEME_GIT_PROMPT_EQUAL_REMOTE="$green=" ZSH_THEME_GIT_PROMPT_AHEAD_REMOTE=">" ZSH_THEME_GIT_PROMPT_BEHIND_REMOTE="<" -ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="<>" +ZSH_THEME_GIT_PROMPT_DIVERGED_REMOTE="$red<>" PROMPT='$username_output$hostname_output:$current_dir_output%1(j. [$jobs_bg].)' -PROMPT+='$(__git_ps1)' +GIT_PROMPT='$(out=$(git_prompt_info)$(git_prompt_status)$(git_remote_status);if [[ -n $out ]]; then printf %s " $white($green$out$white)$reset";fi)' +PROMPT+="$GIT_PROMPT" PROMPT+=" $last_command_output%#$reset " RPROMPT='' From 4cd281ba1be0d8a2e44f96bdb1f2a98b15f54c47 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Thu, 25 Jun 2015 20:13:59 -0400 Subject: [PATCH 026/183] agnoster: Define Powerline chars with escape sequence, and use same character on all platforms. Add clarifying comments. This makes everything consistent with the current Powerline-patched fonts definitions. --- themes/agnoster.zsh-theme | 25 ++++++++++++++++++------- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 3a0c58b8..3e454a0a 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -7,6 +7,9 @@ # # In order for this theme to render correctly, you will need a # [Powerline-patched font](https://github.com/Lokaltog/powerline-fonts). +# Make sure you have a recent version: the code points that Powerline +# uses changed in 2012, and older versions will display incorrectly, +# in confusing ways. # # In addition, I recommend the # [Solarized theme](https://github.com/altercation/solarized/) and, if you're @@ -27,12 +30,19 @@ CURRENT_BG='NONE' -# Fix odd char on mac -if [[ `uname` == 'Darwin' ]]; then - SEGMENT_SEPARATOR='\ue0b0' -else - SEGMENT_SEPARATOR='' -fi +# Special Powerline characters + +# NOTE: This segment separator character is correct. In 2012, Powerline changed +# the code points they use for their special characters. This is the new code point. +# If this is not working for you, you probably have an old version of the +# Powerline-patched fonts installed. Download and install the new version. +# Do not submit PRs to change this unless you have reviewed the Powerline code point +# history and have new information. +# This is defined using a Unicode escape sequence so it is unambiguously readable, regardless of +# what font the user is viewing this source code in. Do not replace the +# escape sequence with a single literal character. +SEGMENT_SEPARATOR='\ue0b0' #  + # Begin a segment # Takes two arguments, background and foreground. Both can be omitted, @@ -73,6 +83,7 @@ prompt_context() { # Git: branch/detached head, dirty status prompt_git() { + local PL_BRANCH_CHAR='\ue0a0' #  local ref dirty mode repo_path repo_path=$(git rev-parse --git-dir 2>/dev/null) @@ -104,7 +115,7 @@ prompt_git() { zstyle ':vcs_info:*' formats ' %u%c' zstyle ':vcs_info:*' actionformats ' %u%c' vcs_info - echo -n "${ref/refs\/heads\// }${vcs_info_msg_0_%% }${mode}" + echo -n "${ref/refs\/heads\//$PL_BRANCH_CHAR }${vcs_info_msg_0_%% }${mode}" fi } From 689b5ab3c8c8bf30ee63cafb8401d7d95e41f359 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Fri, 26 Jun 2015 01:48:17 -0400 Subject: [PATCH 027/183] osx: fix tab* functions so cd works in iTerm2, exit status is correct, and error messages are not discarded. --- plugins/osx/osx.plugin.zsh | 84 ++++++++++++++++++++------------------ 1 file changed, 45 insertions(+), 39 deletions(-) diff --git a/plugins/osx/osx.plugin.zsh b/plugins/osx/osx.plugin.zsh index a6e3a83e..2cbb9597 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -5,29 +5,35 @@ # VERSION: 1.1.0 # ------------------------------------------------------------------------------ -function tab() { - local command="cd \\\"$PWD\\\"; clear; " - (( $# > 0 )) && command="${command}; $*" - - the_app=$( +function _omz_osx_get_frontmost_app() { + local the_app=$( osascript 2>/dev/null </dev/null < 0 )) && command="${command}; $*" + + local the_app=$(_omz_osx_get_frontmost_app) + + if [[ "$the_app" == 'Terminal' ]]; then + # Discarding stdout to quash "tab N of window id XXX" output + osascript >/dev/null </dev/null < 0 )) && command="${command}; $*" - the_app=$( - osascript 2>/dev/null </dev/null <&2 + false + + fi } function split_tab() { - local command="cd \\\"$PWD\\\"" + local command="cd \\\"$PWD\\\"; clear" (( $# > 0 )) && command="${command}; $*" - the_app=$( - osascript 2>/dev/null </dev/null <&2 + false + + fi } function pfd() { From 546b99ad4c509c6a9a4933fce2c662553f790b86 Mon Sep 17 00:00:00 2001 From: Fredrik Strandin Date: Fri, 26 Jun 2015 15:47:00 +0200 Subject: [PATCH 028/183] 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 b5f1c0bb..fa191147 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 Date: Sun, 28 Jun 2015 11:16:17 +0200 Subject: [PATCH 029/183] 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 77b98f30..567b8214 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 00000000..19c06675 --- /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 +# ------------------------------------------------------------------------- +# 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 08500408..00000000 --- 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 9813ff5f24c6ce8409490d7ef8b8c4458f2a6a66 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Sun, 28 Jun 2015 16:54:04 -0400 Subject: [PATCH 030/183] omz_diagnostic_dump: Add umask and $fpath listing. This helps catch issues with compinit and insecure directories. --- lib/diagnostics.zsh | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/lib/diagnostics.zsh b/lib/diagnostics.zsh index 023ba42b..f5f15dea 100644 --- a/lib/diagnostics.zsh +++ b/lib/diagnostics.zsh @@ -106,6 +106,7 @@ function _omz_diag_dump_one_big_text() { builtin echo OSTYPE=$OSTYPE builtin echo ZSH_VERSION=$ZSH_VERSION builtin echo User: $USER + builtin echo umask: $(umask) builtin echo # Installed programs @@ -159,13 +160,19 @@ function _omz_diag_dump_one_big_text() { command locale builtin echo - # Zsh configuration + # Zsh installation and configuration builtin echo Zsh configuration: builtin echo setopt: $(builtin setopt) builtin echo builtin echo zstyle: builtin zstyle builtin echo + builtin echo 'compaudit output:' + compaudit + builtin echo + builtin echo '$fpath directories:' + command ls -lad $fpath + builtin echo # Oh-my-zsh installation builtin echo oh-my-zsh installation: @@ -195,7 +202,7 @@ function _omz_diag_dump_one_big_text() { builtin bindkey builtin echo builtin echo "infocmp:" - command infocmp + command infocmp -L builtin echo fi From efb04d66a0bc775dfb95f2bbc648935004212d48 Mon Sep 17 00:00:00 2001 From: Zhiye Li Date: Tue, 30 Jun 2015 17:50:01 -0500 Subject: [PATCH 031/183] add git alias `gcam` - git commit -am add git alias `gcam` - `git commit -am` --- 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 cc6eb103..ea651d12 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -68,6 +68,7 @@ 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 gcam='git commit -a -m' alias gcb='git checkout -b' alias gcf='git config --list' alias gcl='git clone --recursive' From 2e92ff8ae5e6ddbac5040bb235518a4337aeb983 Mon Sep 17 00:00:00 2001 From: nextgenthemes Date: Thu, 2 Jul 2015 17:33:30 +0200 Subject: [PATCH 032/183] Adds agar = apt-get autoremove Since #3902 lacks the auto-completion I made a PR for this as well. Also fixes some typos. --- plugins/ubuntu/ubuntu.plugin.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/plugins/ubuntu/ubuntu.plugin.zsh b/plugins/ubuntu/ubuntu.plugin.zsh index 0211d337..85db3ce1 100644 --- a/plugins/ubuntu/ubuntu.plugin.zsh +++ b/plugins/ubuntu/ubuntu.plugin.zsh @@ -28,6 +28,7 @@ compdef _ppap ppap='sudo ppa-purge' alias ag='sudo apt-get' # age - but without sudo alias aga='sudo apt-get autoclean' # aac +alias agar='sudo apt-get autoremove' alias agb='sudo apt-get build-dep' # abd alias agc='sudo apt-get clean' # adc alias agd='sudo apt-get dselect-upgrade' # ads @@ -41,6 +42,7 @@ 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 _agar agar='sudo apt-get autoremove' compdef _agb agb='sudo apt-get build-dep' compdef _agc agc='sudo apt-get clean' compdef _agd agd='sudo apt-get dselect-upgrade' @@ -65,7 +67,7 @@ alias mydeb='time dpkg-buildpackage -rfakeroot -us -uc' # apt-add-repository with automatic install/upgrade of the desired package # Usage: aar ppa:xxxxxx/xxxxxx [packagename] -# If packagename is not given as 2nd arument the function will ask for it and guess the defaupt by taking +# If packagename is not given as 2nd argument the function will ask for it and guess the default by taking # the part after the / from the ppa name wich is sometimes the right name for the package you want to install aar() { if [ -n "$2" ]; then From f73e642e2265601b705b6aa9d9f71878ca98644a Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Thu, 2 Jul 2015 21:42:32 -0400 Subject: [PATCH 033/183] 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 f5f37ff6..c40ca86a 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 c82deedc97f7578fa0a8a2dd3c8b598a166bfd04 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Fri, 3 Jul 2015 01:44:47 -0400 Subject: [PATCH 034/183] agnoster: Protect Unicode esape sequences with local LC_* settings --- themes/agnoster.zsh-theme | 31 +++++++++++++++++++------------ 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 3e454a0a..6444dfa6 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -32,17 +32,19 @@ CURRENT_BG='NONE' # Special Powerline characters -# NOTE: This segment separator character is correct. In 2012, Powerline changed -# the code points they use for their special characters. This is the new code point. -# If this is not working for you, you probably have an old version of the -# Powerline-patched fonts installed. Download and install the new version. -# Do not submit PRs to change this unless you have reviewed the Powerline code point -# history and have new information. -# This is defined using a Unicode escape sequence so it is unambiguously readable, regardless of -# what font the user is viewing this source code in. Do not replace the -# escape sequence with a single literal character. -SEGMENT_SEPARATOR='\ue0b0' #  - +() { + local LC_ALL="" LC_CTYPE="en_US.UTF-8" + # NOTE: This segment separator character is correct. In 2012, Powerline changed + # the code points they use for their special characters. This is the new code point. + # If this is not working for you, you probably have an old version of the + # Powerline-patched fonts installed. Download and install the new version. + # Do not submit PRs to change this unless you have reviewed the Powerline code point + # history and have new information. + # This is defined using a Unicode escape sequence so it is unambiguously readable, regardless of + # what font the user is viewing this source code in. Do not replace the + # escape sequence with a single literal character. + SEGMENT_SEPARATOR=$'\ue0b0' #  +} # Begin a segment # Takes two arguments, background and foreground. Both can be omitted, @@ -83,7 +85,12 @@ prompt_context() { # Git: branch/detached head, dirty status prompt_git() { - local PL_BRANCH_CHAR='\ue0a0' #  + + local PL_BRANCH_CHAR + () { + local LC_ALL="" LC_CTYPE="en_US.UTF-8" + PL_BRANCH_CHAR=$'\ue0a0' #  + } local ref dirty mode repo_path repo_path=$(git rev-parse --git-dir 2>/dev/null) From b1da3bbc6f5e26cd0b06cd858e696d4f47f340d2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Ma=C5=82ek?= Date: Mon, 6 Jul 2015 22:00:53 +0200 Subject: [PATCH 035/183] Adding ability to add JIRA_PREFIX as an env variable (e.g. in .zshrc) and minor refactor to bash curly variable braces --- plugins/jira/jira.plugin.zsh | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index ca540c84..a22e1936 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -1,6 +1,7 @@ # To use: add a .jira-url file in the base of your project # You can also set JIRA_URL in your .zshrc or put .jira-url in your home directory -# .jira-url in the current directory takes precedence +# .jira-url in the current directory takes precedence. The same goes with .jira-prefix +# and JIRA_PREFIX. # # If you use Rapid Board, set: #JIRA_RAPID_BOARD="true" @@ -22,8 +23,8 @@ open_jira_issue () { jira_url=$(cat .jira-url) elif [ -f ~/.jira-url ]; then jira_url=$(cat ~/.jira-url) - elif [[ "x$JIRA_URL" != "x" ]]; then - jira_url=$JIRA_URL + elif [[ "${JIRA_URL}" != "" ]]; then + jira_url=${JIRA_URL} else echo "JIRA url is not specified anywhere." return 1 @@ -33,6 +34,8 @@ open_jira_issue () { jira_prefix=$(cat .jira-prefix) elif [ -f ~/.jira-prefix ]; then jira_prefix=$(cat ~/.jira-prefix) + elif [[ "${JIRA_PREFIX}" != "" ]]; then + jira_prefix=${JIRA_PREFIX} else jira_prefix="" fi @@ -51,7 +54,7 @@ open_jira_issue () { echo "Opening issue #$1" fi - if [[ "x$JIRA_RAPID_BOARD" = "xtrue" ]]; then + if [[ "$JIRA_RAPID_BOARD" = "true" ]]; then $open_cmd "$jira_url/issues/$jira_prefix$1$addcomment" else $open_cmd "$jira_url/browse/$jira_prefix$1$addcomment" @@ -61,7 +64,7 @@ open_jira_issue () { jira_name () { if [[ -z "$1" ]]; then - if [[ "x${JIRA_NAME}" != "x" ]]; then + if [[ "${JIRA_NAME}" != "" ]]; then jira_name=${JIRA_NAME} else echo "JIRA_NAME not specified" From 19ea867a3a5cc118fd84560275db05354a4aed0b Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Tue, 3 Mar 2015 21:13:46 -0500 Subject: [PATCH 036/183] install.sh: use portable printf instead of echo --- tools/install.sh | 47 +++++++++++++++++++++++++++++------------------ 1 file changed, 29 insertions(+), 18 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index c83a6f23..ff2e3e91 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -1,52 +1,63 @@ set -e +BLUE="\033[0;34m" +GREEN="\033[0;32m" +YELLOW="\033[0;33m" +NOCOLOR="\033[0m" + if [ ! -n "$ZSH" ]; then ZSH=~/.oh-my-zsh fi if [ -d "$ZSH" ]; then - echo "\033[0;33mYou already have Oh My Zsh installed.\033[0m You'll need to remove $ZSH if you want to install" + printf "${YELLOW}You already have Oh My Zsh installed.${NOCOLOR} You'll need to remove $ZSH if you want to install\n" exit fi -echo "\033[0;34mCloning Oh My Zsh...\033[0m" +printf "${BLUE}Cloning Oh My Zsh...${NOCOLOR}\n" hash git >/dev/null 2>&1 && env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git $ZSH || { - echo "git not installed" + printf "git not installed\n" exit } -echo "\033[0;34mLooking for an existing zsh config...\033[0m" +printf "${BLUE}Looking for an existing zsh config...${NOCOLOR}\n" if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then - echo "\033[0;33mFound ~/.zshrc.\033[0m \033[0;32mBacking up to ~/.zshrc.pre-oh-my-zsh\033[0m"; + printf "${YELLOW}Found ~/.zshrc.${NOCOLOR} ${GREEN}Backing up to ~/.zshrc.pre-oh-my-zsh${NOCOLOR}\n"; mv ~/.zshrc ~/.zshrc.pre-oh-my-zsh; fi -echo "\033[0;34mUsing the Oh My Zsh template file and adding it to ~/.zshrc\033[0m" +printf "${BLUE}Using the Oh My Zsh template file and adding it to ~/.zshrc${NOCOLOR}\n" cp $ZSH/templates/zshrc.zsh-template ~/.zshrc 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" +printf "${BLUE}Copying your current PATH and adding it to the end of ~/.zshrc for you.${NOCOLOR}\n" sed -i -e "/export PATH=/ c\\ export PATH=\"$PATH\" " ~/.zshrc TEST_CURRENT_SHELL=$(expr "$SHELL" : '.*/\(.*\)') if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then - echo "\033[0;34mTime to change your default shell to zsh!\033[0m" + printf "${BLUE}Time to change your default shell to zsh!${NOCOLOR}\n" 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" -echo "\033[0;32m"' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ '"\033[0m" -echo "\033[0;32m"'/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / '"\033[0m" -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" +printf "${GREEN}" +echo ' __ __ ' +echo ' ____ / /_ ____ ___ __ __ ____ _____/ /_ ' +echo ' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ ' +echo '/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / ' +echo '\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ ' +echo ' /____/ ....is now installed!' +echo '' +echo '' +echo 'Please look over the ~/.zshrc file to select plugins, themes, and options.' +echo '' +echo 'p.s. Follow us at http://twitter.com/ohmyzsh.' +echo '' +echo 'p.p.s. Get stickers and t-shirts at http://shop.planetargon.com.' +echo '' +printf "${NOCOLOR}" env zsh -. ~/.zshrc From 8cf610089d97cf1abbd5cf3e0fb28d63b4c25f51 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Mon, 6 Jul 2015 20:18:32 -0400 Subject: [PATCH 037/183] installer: use terminfo for portable escape sequences Do not use terminal visual effects if not connected to a terminal. --- tools/install.sh | 39 +++++++++++++++++++++++++++------------ tools/upgrade.sh | 43 ++++++++++++++++++++++++++++++++----------- 2 files changed, 59 insertions(+), 23 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index ff2e3e91..8ff1219b 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -1,45 +1,60 @@ set -e -BLUE="\033[0;34m" -GREEN="\033[0;32m" -YELLOW="\033[0;33m" -NOCOLOR="\033[0m" +# Use colors, but only if connected to a terminal, and that terminal +# supports them. +ncolors=$(tput colors) +if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then + RED=="$(tput setaf 1)" + GREEN="$(tput setaf 2)" + YELLOW="$(tput setaf 3)" + BLUE="$(tput setaf 4)" + BOLD="$(tput bold)" + NORMAL="$(tput sgr0)" +else + RED="" + GREEN="" + YELLOW="" + BLUE="" + BOLD="" + NORMAL="" +fi if [ ! -n "$ZSH" ]; then ZSH=~/.oh-my-zsh fi if [ -d "$ZSH" ]; then - printf "${YELLOW}You already have Oh My Zsh installed.${NOCOLOR} You'll need to remove $ZSH if you want to install\n" + printf "${YELLOW}You already have Oh My Zsh installed.${NORMAL}\n" + printf "You'll need to remove $ZSH if you want to re-install.\n" exit fi -printf "${BLUE}Cloning Oh My Zsh...${NOCOLOR}\n" +printf "${BLUE}Cloning Oh My Zsh...${NORMAL}\n" hash git >/dev/null 2>&1 && env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git $ZSH || { printf "git not installed\n" exit } -printf "${BLUE}Looking for an existing zsh config...${NOCOLOR}\n" +printf "${BLUE}Looking for an existing zsh config...${NORMAL}\n" if [ -f ~/.zshrc ] || [ -h ~/.zshrc ]; then - printf "${YELLOW}Found ~/.zshrc.${NOCOLOR} ${GREEN}Backing up to ~/.zshrc.pre-oh-my-zsh${NOCOLOR}\n"; + printf "${YELLOW}Found ~/.zshrc.${NORMAL} ${GREEN}Backing up to ~/.zshrc.pre-oh-my-zsh${NORMAL}\n"; mv ~/.zshrc ~/.zshrc.pre-oh-my-zsh; fi -printf "${BLUE}Using the Oh My Zsh template file and adding it to ~/.zshrc${NOCOLOR}\n" +printf "${BLUE}Using the Oh My Zsh template file and adding it to ~/.zshrc${NORMAL}\n" cp $ZSH/templates/zshrc.zsh-template ~/.zshrc sed -i -e "/^export ZSH=/ c\\ export ZSH=$ZSH " ~/.zshrc -printf "${BLUE}Copying your current PATH and adding it to the end of ~/.zshrc for you.${NOCOLOR}\n" +printf "${BLUE}Copying your current PATH and adding it to the end of ~/.zshrc for you.${NORMAL}\n" sed -i -e "/export PATH=/ c\\ export PATH=\"$PATH\" " ~/.zshrc TEST_CURRENT_SHELL=$(expr "$SHELL" : '.*/\(.*\)') if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then - printf "${BLUE}Time to change your default shell to zsh!${NOCOLOR}\n" + printf "${BLUE}Time to change your default shell to zsh!${NORMAL}\n" chsh -s $(grep /zsh$ /etc/shells | tail -1) fi unset TEST_CURRENT_SHELL @@ -59,5 +74,5 @@ echo 'p.s. Follow us at http://twitter.com/ohmyzsh.' echo '' echo 'p.p.s. Get stickers and t-shirts at http://shop.planetargon.com.' echo '' -printf "${NOCOLOR}" +printf "${NORMAL}" env zsh diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 5f0a81f1..4929054c 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -1,16 +1,37 @@ -printf '\033[0;34m%s\033[0m\n' "Upgrading Oh My Zsh" + +# Use colors, but only if connected to a terminal, and that terminal +# supports them. +ncolors=$(tput colors) +if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then + RED=="$(tput setaf 1)" + GREEN="$(tput setaf 2)" + YELLOW="$(tput setaf 3)" + BLUE="$(tput setaf 4)" + BOLD="$(tput bold)" + NORMAL="$(tput sgr0)" +else + RED="" + GREEN="" + YELLOW="" + BLUE="" + BOLD="" + NORMAL="" +fi + +printf "${BLUE}%s${NORMAL}\n" "Upgrading Oh My Zsh" cd "$ZSH" if git pull --rebase --stat origin master then - printf '\033[0;32m%s\033[0m\n' ' __ __ ' - printf '\033[0;32m%s\033[0m\n' ' ____ / /_ ____ ___ __ __ ____ _____/ /_ ' - printf '\033[0;32m%s\033[0m\n' ' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ ' - printf '\033[0;32m%s\033[0m\n' '/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / ' - 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 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/' + printf '%s' "$GREEN" + printf '%s\n' ' __ __ ' + printf '%s\n' ' ____ / /_ ____ ___ __ __ ____ _____/ /_ ' + printf '%s\n' ' / __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \ ' + printf '%s\n' '/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / / ' + printf '%s\n' '\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ ' + printf '%s\n' ' /____/ ' + printf "${BLUE}%s\n" "Hooray! Oh My Zsh has been updated and/or is at the current version." + printf "${BLUE}${BOLD}%s${NORMAL}\n" "To keep up on the latest news and updates, follow us on twitter: http://twitter.com/ohmyzsh" + printf "${BLUE}${BOLD}%s${NORMAL}\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?' + printf "${RED}%s${NORMAL}\n" 'There was an error updating. Try again later?' fi From dff03743efa3f49f4ba4b1214d97f9746bb1a0d4 Mon Sep 17 00:00:00 2001 From: Mohnish Jadwani Date: Tue, 7 Jul 2015 09:47:49 +0530 Subject: [PATCH 038/183] adds an alias to search for the rails routes that pattern match a string --- 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 6824836f..097578e2 100644 --- a/plugins/rails/rails.plugin.zsh +++ b/plugins/rails/rails.plugin.zsh @@ -58,6 +58,7 @@ alias rdmtc='rake db:migrate db:test:clone' alias rlc='rake log:clear' alias rn='rake notes' alias rr='rake routes' +alias rrg='rake routes | grep ' # legacy stuff alias sstat='thin --stats "/thin/stats" start' From 750de22972bfa38003d38ce3a13f46bd7e41807d Mon Sep 17 00:00:00 2001 From: Headless Date: Tue, 7 Jul 2015 15:44:35 +0300 Subject: [PATCH 039/183] rails rake test --- 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 6824836f..4c250369 100644 --- a/plugins/rails/rails.plugin.zsh +++ b/plugins/rails/rails.plugin.zsh @@ -58,6 +58,7 @@ alias rdmtc='rake db:migrate db:test:clone' alias rlc='rake log:clear' alias rn='rake notes' alias rr='rake routes' +alias rt='rake test' # legacy stuff alias sstat='thin --stats "/thin/stats" start' From 88a30a3e2f3089556fe40c719f4cbed8426a144e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Ma=C5=82ek?= Date: Tue, 7 Jul 2015 18:50:23 +0200 Subject: [PATCH 040/183] Changing string comparison for more zsh-like --- plugins/jira/jira.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index a22e1936..042fcd7a 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -54,7 +54,7 @@ open_jira_issue () { echo "Opening issue #$1" fi - if [[ "$JIRA_RAPID_BOARD" = "true" ]]; then + if [[ "$JIRA_RAPID_BOARD" == "true" ]]; then $open_cmd "$jira_url/issues/$jira_prefix$1$addcomment" else $open_cmd "$jira_url/browse/$jira_prefix$1$addcomment" From 1e99168627eef4c61114cb0572047473b7cb56be Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Ma=C5=82ek?= Date: Tue, 7 Jul 2015 19:56:22 +0200 Subject: [PATCH 041/183] Changing indents to be more consistent (2 spaces) --- plugins/jira/jira.plugin.zsh | 36 ++++++++++++++++++------------------ 1 file changed, 18 insertions(+), 18 deletions(-) diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index 042fcd7a..769bf236 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -76,24 +76,24 @@ jira_name () { } 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" + 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 37f45eb621b04a1286ac1667b7474111e6e0b4ce Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Ma=C5=82ek?= Date: Tue, 7 Jul 2015 20:03:58 +0200 Subject: [PATCH 042/183] Making variables local in jira plugin --- plugins/jira/jira.plugin.zsh | 14 ++++++++++---- 1 file changed, 10 insertions(+), 4 deletions(-) diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index 769bf236..7839e2a8 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -19,6 +19,7 @@ open_jira_issue () { open_cmd='xdg-open' fi + local jira_url if [ -f .jira-url ]; then jira_url=$(cat .jira-url) elif [ -f ~/.jira-url ]; then @@ -30,6 +31,7 @@ open_jira_issue () { return 1 fi + local jira_prefix if [ -f .jira-prefix ]; then jira_prefix=$(cat .jira-prefix) elif [ -f ~/.jira-prefix ]; then @@ -45,7 +47,7 @@ open_jira_issue () { $open_cmd "${jira_url}/secure/CreateIssue!default.jspa" elif [[ "$1" = "assigned" || "$1" = "reported" ]]; then jira_query $@ - else + else local addcomment='' if [[ "$2" == "m" ]]; then addcomment="#add-comment" @@ -53,11 +55,11 @@ open_jira_issue () { else echo "Opening issue #$1" fi - + if [[ "$JIRA_RAPID_BOARD" == "true" ]]; then - $open_cmd "$jira_url/issues/$jira_prefix$1$addcomment" + $open_cmd "$jira_url/issues/$jira_prefix$1$addcomment" else - $open_cmd "$jira_url/browse/$jira_prefix$1$addcomment" + $open_cmd "$jira_url/browse/$jira_prefix$1$addcomment" fi fi } @@ -76,7 +78,11 @@ jira_name () { } jira_query () { + local jira_name + local verb verb="$1" + local lookup + local preposition if [[ "${verb}" = "reported" ]]; then lookup=reporter preposition=by From b1772c5333fcc43610ade75384d9cf87c8ccde61 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Ma=C5=82ek?= Date: Tue, 7 Jul 2015 20:07:13 +0200 Subject: [PATCH 043/183] More consistent curly braces variables --- plugins/jira/jira.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index 7839e2a8..566e1f1f 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -57,9 +57,9 @@ open_jira_issue () { fi if [[ "$JIRA_RAPID_BOARD" == "true" ]]; then - $open_cmd "$jira_url/issues/$jira_prefix$1$addcomment" + $open_cmd "${jira_url}/issues/${jira_prefix}${1}${addcomment}" else - $open_cmd "$jira_url/browse/$jira_prefix$1$addcomment" + $open_cmd "${jira_url}/browse/${jira_prefix}${1}${addcomment}" fi fi } From ad4675cb0a8f732abef7b9a2b3df2141afbf79aa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Patryk=20Ma=C5=82ek?= Date: Tue, 7 Jul 2015 20:26:00 +0200 Subject: [PATCH 044/183] Concise local variables declarations --- plugins/jira/jira.plugin.zsh | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index 566e1f1f..22984549 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -78,11 +78,8 @@ jira_name () { } jira_query () { - local jira_name - local verb - verb="$1" - local lookup - local preposition + local verb="$1" + local jira_name lookup preposition if [[ "${verb}" = "reported" ]]; then lookup=reporter preposition=by From 1e8196de8289a69268a9631ddf4d3b3519ade5c1 Mon Sep 17 00:00:00 2001 From: Takumi IINO Date: Wed, 8 Jul 2015 11:16:44 +0900 Subject: [PATCH 045/183] passing the first argument with double quote --- plugins/coffee/coffee.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/coffee/coffee.plugin.zsh b/plugins/coffee/coffee.plugin.zsh index 1a7bedd8..4e98e022 100644 --- a/plugins/coffee/coffee.plugin.zsh +++ b/plugins/coffee/coffee.plugin.zsh @@ -2,11 +2,11 @@ # compile a string of coffeescript and print to output cf () { - coffee -peb $1 + coffee -peb "$1" } # compile & copy to clipboard cfc () { - cf $1 | pbcopy + cf "$1" | pbcopy } # compile from pasteboard & print From bca720fa9549f7fe4687acd1aaf91720428657e9 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Thu, 9 Jul 2015 20:50:57 -0400 Subject: [PATCH 046/183] diagnostics: include detailed OS version info if possible --- lib/diagnostics.zsh | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) diff --git a/lib/diagnostics.zsh b/lib/diagnostics.zsh index f5f15dea..53c6548d 100644 --- a/lib/diagnostics.zsh +++ b/lib/diagnostics.zsh @@ -55,6 +55,8 @@ function omz_diagnostic_dump() { emulate -L zsh + builtin echo "Generating diagnostic dump; please be patient..." + local thisfcn=omz_diagnostic_dump local -A opts local opt_verbose opt_noverbose opt_outfile @@ -108,6 +110,8 @@ function _omz_diag_dump_one_big_text() { builtin echo User: $USER builtin echo umask: $(umask) builtin echo + _omz_diag_dump_os_specific_version + builtin echo # Installed programs programs=(sh zsh ksh bash sed cat grep ls find git posh) @@ -299,4 +303,28 @@ function _omz_diag_dump_echo_file_w_header() { fi } +function _omz_diag_dump_os_specific_version() { + local osname osver version_file version_files + case "$OSTYPE" in + darwin*) + osname=$(command sw_vers -productName) + osver=$(command sw_vers -productVersion) + builtin echo "OS Version: $osname $osver build $(sw_vers -buildVersion)" + ;; + cygwin) + command systeminfo | command grep "^OS Name\|^OS Version" + ;; + esac + + if builtin which lsb_release >/dev/null; then + builtin echo "OS Release: $(command lsb_release -s -d)" + fi + + version_files=( /etc/*-release(N) /etc/*-version(N) /etc/*_version(N) ) + for version_file in $version_files; do + builtin echo "$version_file:" + command cat "$version_file" + builtin echo + done +} From ffe8e5465cdf6b9c1bad34df3f826f34cfbb59f8 Mon Sep 17 00:00:00 2001 From: Paul Robertson Date: Thu, 9 Jul 2015 23:40:35 -0400 Subject: [PATCH 047/183] add '--help' to heroku commands --- plugins/heroku/_heroku | 1 + 1 file changed, 1 insertion(+) diff --git a/plugins/heroku/_heroku b/plugins/heroku/_heroku index bb2f7403..fd72e530 100644 --- a/plugins/heroku/_heroku +++ b/plugins/heroku/_heroku @@ -143,5 +143,6 @@ _arguments \ $_command_args \ '(--app)--app[the app name]' \ '(--remote)--remote[the remote name]' \ + '(--help)--help[help about the current command]' \ && return 0 From dcb175d4309a41723ebeb561a8089115d9e7126b Mon Sep 17 00:00:00 2001 From: leycec Date: Sat, 11 Jul 2015 01:20:23 -0400 Subject: [PATCH 048/183] Insecure completion handler added. A new "lib/compfix.zsh" script defining a new handle_completion_insecurities() function has been added, which handles insecure completion directories by notifying users of said insecurities and moving away all existing completion caches to a temporary directory. While intended to be called at startup, this function is generally callable at any time (e.g., for testing). --- lib/compfix.zsh | 60 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 60 insertions(+) create mode 100644 lib/compfix.zsh diff --git a/lib/compfix.zsh b/lib/compfix.zsh new file mode 100644 index 00000000..208aaadb --- /dev/null +++ b/lib/compfix.zsh @@ -0,0 +1,60 @@ +# Handle completions insecurities (i.e., completion-dependent directories with +# insecure ownership or permissions) by: +# +# * Human-readably notifying the user of these insecurities. +# * Moving away all existing completion caches to a temporary directory. Since +# any of these caches may have been generated from insecure directories, they +# are all suspect now. Failing to do so typically causes subsequent compinit() +# calls to fail with "command not found: compdef" errors. (That's bad.) +function handle_completion_insecurities() { + # List of the absolute paths of all unique insecure directories, split on + # newline from compaudit()'s output resembling: + # + # There are insecure directories: + # /usr/share/zsh/site-functions + # /usr/share/zsh/5.0.6/functions + # /usr/share/zsh + # /usr/share/zsh/5.0.6 + # + # Since the ignorable first line is printed to stderr and thus not captured, + # stderr is squelched to prevent this output from leaking to the user. + local -aU insecure_dirs + insecure_dirs=( ${(f@):-"$(compaudit 2>/dev/null)"} ) + + # If no such directories exist, get us out of here. + if (( ! ${#insecure_dirs} )); then + print "[oh-my-zsh] No insecure completion-dependent directories detected." + return + fi + + # List ownership and permissions of all insecure directories. + print "[oh-my-zsh] Insecure completion-dependent directories detected:" + ls -ld "${(@)insecure_dirs}" + print "[oh-my-zsh] For safety, completions will be disabled until you manually fix all" + print "[oh-my-zsh] insecure directory permissions and ownership and restart oh-my-zsh." + print "[oh-my-zsh] See the above list for directories with group or other writability.\n" + + # Locally enable the "NULL_GLOB" option, thus removing unmatched filename + # globs from argument lists *AND* printing no warning when doing so. Failing + # to do so prints an unreadable warning if no completion caches exist below. + setopt local_options null_glob + + # List of the absolute paths of all unique existing completion caches. + local -aU zcompdump_files + zcompdump_files=( "${ZSH_COMPDUMP}"(.) "${ZDOTDIR:-${HOME}}"/.zcompdump* ) + + # Move such caches to a temporary directory. + if (( ${#zcompdump_files} )); then + # Absolute path of the directory to which such files will be moved. + local ZSH_ZCOMPDUMP_BAD_DIR="${ZSH_CACHE_DIR}/zcompdump-bad" + + # List such files first. + print "[oh-my-zsh] Insecure completion caches also detected:" + ls -l "${(@)zcompdump_files}" + + # For safety, move rather than permanently remove such files. + print "[oh-my-zsh] Moving to \"${ZSH_ZCOMPDUMP_BAD_DIR}/\"...\n" + mkdir -p "${ZSH_ZCOMPDUMP_BAD_DIR}" + mv "${(@)zcompdump_files}" "${ZSH_ZCOMPDUMP_BAD_DIR}/" + fi +} From ff8d799594d0fd127058455b194b27d00a323d68 Mon Sep 17 00:00:00 2001 From: Fabio Strozzi Date: Sun, 12 Jul 2015 17:01:34 +0200 Subject: [PATCH 049/183] Esc-esc now toggles sudo. Press esc-esc once to add sudo (normal behaviour), press it twice to remove it from the beginning of the line. --- plugins/sudo/sudo.plugin.zsh | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/plugins/sudo/sudo.plugin.zsh b/plugins/sudo/sudo.plugin.zsh index e3ba3991..0ba8bed5 100644 --- a/plugins/sudo/sudo.plugin.zsh +++ b/plugins/sudo/sudo.plugin.zsh @@ -14,7 +14,11 @@ sudo-command-line() { [[ -z $BUFFER ]] && zle up-history - [[ $BUFFER != sudo\ * ]] && LBUFFER="sudo $LBUFFER" + if [[ $BUFFER == sudo\ * ]]; then + LBUFFER="${LBUFFER#sudo }" + else + LBUFFER="sudo $LBUFFER" + fi } zle -N sudo-command-line # Defined shortcut keys: [Esc] [Esc] From 46d13384db11634257aa803fc1e05f1ac6e10a1b Mon Sep 17 00:00:00 2001 From: Hongxin Liang Date: Mon, 13 Jul 2015 18:43:00 +0200 Subject: [PATCH 050/183] [theme] Fix color problem of steeef theme steeef theme sets colors depending on $TERM, however if %F is used, it must be closed by %f instead of %{$reset_color%}. Further on, all %f directives have been replaced by %F and color support of current TERM is checked more properly. --- themes/steeef.zsh-theme | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/themes/steeef.zsh-theme b/themes/steeef.zsh-theme index 13728ca9..13dc3ad2 100644 --- a/themes/steeef.zsh-theme +++ b/themes/steeef.zsh-theme @@ -10,7 +10,7 @@ export VIRTUAL_ENV_DISABLE_PROMPT=1 function virtualenv_info { - [ $VIRTUAL_ENV ] && echo '('$fg[blue]`basename $VIRTUAL_ENV`%{$reset_color%}') ' + [ $VIRTUAL_ENV ] && echo '('%F{blue}`basename $VIRTUAL_ENV`%f') ' } PR_GIT_UPDATE=1 @@ -20,18 +20,18 @@ autoload -U add-zsh-hook autoload -Uz vcs_info #use extended color pallete if available -if [[ $TERM = *256color* || $TERM = *rxvt* ]]; then +if [[ $terminfo[colors] -ge 256 ]]; then turquoise="%F{81}" orange="%F{166}" purple="%F{135}" hotpink="%F{161}" limegreen="%F{118}" else - turquoise="$fg[cyan]" - orange="$fg[yellow]" - purple="$fg[magenta]" - hotpink="$fg[red]" - limegreen="$fg[green]" + turquoise="%F{cyan}" + orange="%F{yellow}" + purple="%F{magenta}" + hotpink="%F{red}" + limegreen="%F{green}" fi # enable VCS systems you use @@ -48,7 +48,7 @@ zstyle ':vcs_info:*:prompt:*' check-for-changes true # %a - action (e.g. rebase-i) # %R - repository path # %S - path in the repository -PR_RST="%{${reset_color}%}" +PR_RST="%f" FMT_BRANCH="(%{$turquoise%}%b%u%c${PR_RST})" FMT_ACTION="(%{$limegreen%}%a${PR_RST})" FMT_UNSTAGED="%{$orange%}●" @@ -96,5 +96,5 @@ function steeef_precmd { add-zsh-hook precmd steeef_precmd PROMPT=$' -%{$purple%}%n%{$reset_color%} at %{$orange%}%m%{$reset_color%} in %{$limegreen%}%~%{$reset_color%} $vcs_info_msg_0_$(virtualenv_info)%{$reset_color%} +%{$purple%}%n${PR_RST} at %{$orange%}%m${PR_RST} in %{$limegreen%}%~${PR_RST} $vcs_info_msg_0_$(virtualenv_info) $ ' From afa30572f522969e07b0f85f0cf0fe0e32dd8831 Mon Sep 17 00:00:00 2001 From: Andrew Stuart Date: Mon, 13 Jul 2015 13:08:18 -0700 Subject: [PATCH 051/183] Add jira_url_help --- plugins/jira/jira.plugin.zsh | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index ca540c84..f624648a 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -25,7 +25,7 @@ open_jira_issue () { elif [[ "x$JIRA_URL" != "x" ]]; then jira_url=$JIRA_URL else - echo "JIRA url is not specified anywhere." + jira_url_help return 1 fi @@ -59,6 +59,16 @@ open_jira_issue () { fi } +jira_url_help() { + cat << EOF +JIRA url is not specified anywhere. +Valid options, in order of preference: + .jira-url file + $HOME/.jira-url file + JIRA_URL environment variable +EOF +} + jira_name () { if [[ -z "$1" ]]; then if [[ "x${JIRA_NAME}" != "x" ]]; then From 6d618ef70e5abfc5e18656ba8064ead0c8974386 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Wed, 15 Jul 2015 02:56:48 -0400 Subject: [PATCH 052/183] 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 00000000..889e567e --- /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[] +``` +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 +``` +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 00000000..7d110603 --- /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 00000000..7b4c015f --- /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 be761871..dbaf2bb9 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[] -# 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 +# 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_, 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 00000000..d90c6e31 --- /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 Date: Wed, 15 Jul 2015 17:16:59 -0400 Subject: [PATCH 053/183] 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 dbaf2bb9..a98d0b71 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[] -# 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 -# 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 7a13a407e92dc6780355f67018bb03da81a73b8f Mon Sep 17 00:00:00 2001 From: Roland Chernov Date: Sat, 18 Jul 2015 21:10:56 +0900 Subject: [PATCH 054/183] Added thefuck plugin https://github.com/nvbn/thefuck --- plugins/thefuck/thefuck.plugin.zsh | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 plugins/thefuck/thefuck.plugin.zsh diff --git a/plugins/thefuck/thefuck.plugin.zsh b/plugins/thefuck/thefuck.plugin.zsh new file mode 100644 index 00000000..81461d48 --- /dev/null +++ b/plugins/thefuck/thefuck.plugin.zsh @@ -0,0 +1,9 @@ +fuck-command-line() { + FUCK=$(thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null) + [ -z $FUCK ] && echo -n -e "\a" && return + BUFFER=$FUCK + zle end-of-line +} +zle -N fuck-command-line +# Defined shortcut keys: [Esc] [Esc] +bindkey "\e\e" fuck-command-line From cd2213a0304e7f0b8fdfbb02be96f57042e2744a Mon Sep 17 00:00:00 2001 From: Roland Chernov Date: Sat, 18 Jul 2015 21:17:51 +0900 Subject: [PATCH 055/183] Thefuck plugin README --- plugins/thefuck/README.md | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 plugins/thefuck/README.md diff --git a/plugins/thefuck/README.md b/plugins/thefuck/README.md new file mode 100644 index 00000000..981b5513 --- /dev/null +++ b/plugins/thefuck/README.md @@ -0,0 +1,6 @@ +# The Fuck + +[The Fuck](https://github.com/nvbn/thefuck) plugin — magnificent app which corrects your previous console command. + +## Usage +Press `ESC` twice to correct previous console command. From f838b56591691ad999c8ad1202f04f88350e2d73 Mon Sep 17 00:00:00 2001 From: linux_china Date: Sun, 19 Jul 2015 11:44:42 +0800 Subject: [PATCH 056/183] spring boot plugin readme --- plugins/spring/README.md | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 plugins/spring/README.md diff --git a/plugins/spring/README.md b/plugins/spring/README.md new file mode 100644 index 00000000..62bfd801 --- /dev/null +++ b/plugins/spring/README.md @@ -0,0 +1,25 @@ +# Spring Boot oh-my-zsh plugin +oh-my-zsh Spring Boot plugin + +## Spring Boot autocomplete plugin + +- Adds autocomplete options for all spring boot commands. + +## Manual Install + + $ cd ~/.oh-my-zsh/plugins + $ git clone git@github.com:linux-china/oh-my-zsh-spring-boot-plugin.git spring + +Adjust your .zshrc file and add spring to plugins=(...) + +## Tips + +* Install Spring Cloud plugin: spring install org.springframework.cloud:spring-cloud-cli:1.0.2.RELEASE + +## Reference + +* Spring Boot: http://projects.spring.io/spring-boot/ +* Spring Boot CLI: http://docs.spring.io/spring-boot/docs/current/reference/htmlsingle/#cli + +Maintainer : linux_china ([@linux_china](https://twitter.com/linux_china)) + From b4a8cbf6a589a57572832714f0284e487719004a Mon Sep 17 00:00:00 2001 From: linux_china Date: Sun, 19 Jul 2015 11:44:51 +0800 Subject: [PATCH 057/183] spring boot plugin --- plugins/spring/_spring | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 plugins/spring/_spring diff --git a/plugins/spring/_spring b/plugins/spring/_spring new file mode 100644 index 00000000..93f19517 --- /dev/null +++ b/plugins/spring/_spring @@ -0,0 +1,29 @@ +#compdef spring 'spring' +#autoload + +_spring() { + + local cword + let cword=CURRENT-1 + + local hints + hints=() + + local reply + while read -r line; do + reply=`echo "$line" | awk '{printf $1 ":"; for (i=2; i Date: Sun, 19 Jul 2015 12:57:50 +0900 Subject: [PATCH 058/183] Added conflict note (thefuck plugin) --- plugins/thefuck/README.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/thefuck/README.md b/plugins/thefuck/README.md index 981b5513..a9b7550d 100644 --- a/plugins/thefuck/README.md +++ b/plugins/thefuck/README.md @@ -4,3 +4,6 @@ ## Usage Press `ESC` twice to correct previous console command. + +## Notes +`Esc`-`Esc` key binding conflicts with [sudo](https://github.com/robbyrussell/oh-my-zsh/tree/master/plugins/sudo) plugin. From a3f0439de34ac2ce083c3d9f09b4e4f5379c158c Mon Sep 17 00:00:00 2001 From: Alex Talker Date: Sun, 19 Jul 2015 13:56:10 +0300 Subject: [PATCH 059/183] 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 adba1ad3..9d210392 100644 --- a/themes/candy-kingdom.zsh-theme +++ b/themes/candy-kingdom.zsh-theme @@ -13,7 +13,7 @@ patches: Date: Sun, 19 Jul 2015 11:50:43 -0500 Subject: [PATCH 060/183] removed incorrect Devanagari conjunct symbol at end of Om --- themes/dogenpunk.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/dogenpunk.zsh-theme b/themes/dogenpunk.zsh-theme index 0bd38acc..ea3f1b96 100644 --- a/themes/dogenpunk.zsh-theme +++ b/themes/dogenpunk.zsh-theme @@ -3,7 +3,7 @@ MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}" local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}" -PROMPT='%{$fg[blue]%}%m%{$reset_color%}%{$fg_bold[white]%} ओम् %{$reset_color%}%{$fg[cyan]%}%~:%{$reset_color%}$(git_time_since_commit)$(git_prompt_info) +PROMPT='%{$fg[blue]%}%m%{$reset_color%}%{$fg_bold[white]%} ओम %{$reset_color%}%{$fg[cyan]%}%~:%{$reset_color%}$(git_time_since_commit)$(git_prompt_info) %{$fg[red]%}%!%{$reset_color%} $(prompt_char) ' ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[green]%}git%{$reset_color%}@%{$bg[white]%}%{$fg[black]%}" From cacc6c34b72ecb4593d05b66d891cf4f075e69f2 Mon Sep 17 00:00:00 2001 From: Sharky Date: Sun, 19 Jul 2015 12:33:37 -0500 Subject: [PATCH 061/183] replaced Om spelling so letters would not overlap --- themes/dogenpunk.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/dogenpunk.zsh-theme b/themes/dogenpunk.zsh-theme index ea3f1b96..d6719281 100644 --- a/themes/dogenpunk.zsh-theme +++ b/themes/dogenpunk.zsh-theme @@ -3,7 +3,7 @@ MODE_INDICATOR="%{$fg_bold[red]%}❮%{$reset_color%}%{$fg[red]%}❮❮%{$reset_color%}" local return_status="%{$fg[red]%}%(?..⏎)%{$reset_color%}" -PROMPT='%{$fg[blue]%}%m%{$reset_color%}%{$fg_bold[white]%} ओम %{$reset_color%}%{$fg[cyan]%}%~:%{$reset_color%}$(git_time_since_commit)$(git_prompt_info) +PROMPT='%{$fg[blue]%}%m%{$reset_color%}%{$fg_bold[white]%} ॐ %{$reset_color%}%{$fg[cyan]%}%~:%{$reset_color%}$(git_time_since_commit)$(git_prompt_info) %{$fg[red]%}%!%{$reset_color%} $(prompt_char) ' ZSH_THEME_GIT_PROMPT_PREFIX="%{$fg_bold[green]%}git%{$reset_color%}@%{$bg[white]%}%{$fg[black]%}" From cb55161470e051e520bad388c20e32d43cfca973 Mon Sep 17 00:00:00 2001 From: leycec Date: Tue, 12 May 2015 19:27:51 -0400 Subject: [PATCH 062/183] Completion insecurities handled on startup. Completion-dependent directories with insecure permissions or ownership (e.g., group or other writability) are now detected, reported, and sanitized on OMZ startup rather than unsafely ignored -- which resulted in effectively empty completion caches and obscure compdef() errors resembling "compdef: unknown command or service: git". This fixes long-standing issues #630, #3356, and #3455 and related Babun issues 159, 281, and 322 -- and probably numerous other duplicates. --- oh-my-zsh.sh | 14 +++++++++++--- 1 file changed, 11 insertions(+), 3 deletions(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index ec64c240..9dde78ca 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -8,6 +8,9 @@ fi # add a function path fpath=($ZSH/functions $ZSH/completions $fpath) +# Load all stock functions (from $fpath files) called below. +autoload -U compaudit compinit + # 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 @@ -64,9 +67,14 @@ if [ -z "$ZSH_COMPDUMP" ]; then ZSH_COMPDUMP="${ZDOTDIR:-${HOME}}/.zcompdump-${SHORT_HOST}-${ZSH_VERSION}" fi -# Load and run compinit -autoload -U compinit -compinit -i -d "${ZSH_COMPDUMP}" +# If completion insecurities exist, warn the user without enabling completions. +if ! compaudit &>/dev/null; then + # This function resides in the "lib/compfix.zsh" script sourced above. + handle_completion_insecurities +# Else, enable and cache completions to the desired file. +else + compinit -d "${ZSH_COMPDUMP}" +fi # Load all of the plugins that were defined in ~/.zshrc for plugin ($plugins); do From da395c583770b466b5ba83c37d313a7b1c0024c9 Mon Sep 17 00:00:00 2001 From: leycec Date: Sat, 11 Jul 2015 00:52:54 -0400 Subject: [PATCH 063/183] Secure umask enforced during installation. For safety, a umask of 022 prohibiting both group and other writability is now enforced during OMZ installation. In theory, this should reduce the likelihood of subsequent compinit() failures due to insecure directory permissions under all platforms except for default Cygwin installations (in which Windows ACLs override POSIX umasks). --- tools/install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/install.sh b/tools/install.sh index c83a6f23..405f461e 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -9,6 +9,13 @@ if [ -d "$ZSH" ]; then exit fi +# Prevent the cloned repository from having insecure permissions. Failing to do +# so causes compinit() calls to fail with "command not found: compdef" errors +# for users with insecure umasks (e.g., "002", allowing group writability). Note +# that this will be ignored under Cygwin by default, as Windows ACLs take +# precedence over umasks except for filesystems mounted with option "noacl". +umask g-w,o-w + echo "\033[0;34mCloning Oh My Zsh...\033[0m" hash git >/dev/null 2>&1 && env git clone --depth=1 https://github.com/robbyrussell/oh-my-zsh.git $ZSH || { echo "git not installed" From e8caf22beb8cde69f097382a75f6d1a247625030 Mon Sep 17 00:00:00 2001 From: leycec Date: Sat, 11 Jul 2015 00:54:36 -0400 Subject: [PATCH 064/183] Cygwin-specific "chsh" installation issue fixed. Installation previously assumed the existence of a "chsh" command in the current ${PATH}. Since Cygwin does *NOT* provide this command, installation now tests for the existence of this command before attempting to run it. --- tools/install.sh | 11 ++++++++--- 1 file changed, 8 insertions(+), 3 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index 405f461e..f5836fdf 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -39,12 +39,17 @@ sed -i -e "/export PATH=/ c\\ export PATH=\"$PATH\" " ~/.zshrc -TEST_CURRENT_SHELL=$(expr "$SHELL" : '.*/\(.*\)') -if [ "$TEST_CURRENT_SHELL" != "zsh" ]; then +# If this user's login shell is not already "zsh", attempt to switch. +if [ "$(expr "$SHELL" : '.*/\(.*\)')" != "zsh" ]; then + # If this platform provides a "chsh" command (not Cygwin), do it, man! + if hash chsh >/dev/null 2>&1; then echo "\033[0;34mTime to change your default shell to zsh!\033[0m" chsh -s $(grep /zsh$ /etc/shells | tail -1) + # Else, suggest the user do so manually. + else + echo "\033[0;34mPlease manually change your default shell to zsh!\033[0m" + fi fi -unset TEST_CURRENT_SHELL echo "\033[0;32m"' __ __ '"\033[0m" echo "\033[0;32m"' ____ / /_ ____ ___ __ __ ____ _____/ /_ '"\033[0m" From 0da9a4be25d0feb968b21645a0654ea499f0cc9d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20M=C4=83gheru=C8=99an-Stanciu?= Date: Wed, 6 May 2015 18:40:03 +0200 Subject: [PATCH 065/183] fuck: added a basic plugin for https://github.com/nvbn/thefuck --- plugins/fuck/fuck.plugin.zsh | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 plugins/fuck/fuck.plugin.zsh diff --git a/plugins/fuck/fuck.plugin.zsh b/plugins/fuck/fuck.plugin.zsh new file mode 100644 index 00000000..1a3b474f --- /dev/null +++ b/plugins/fuck/fuck.plugin.zsh @@ -0,0 +1,6 @@ +if [ $commands[thefuck] ]; then + alias fuck='eval $(thefuck $(fc -ln -1 | tail -n 1)); fc -R' + alias FUCK='fuck' +else + echo 'thefuck is not installed, you should "pip install thefuck" first' +fi From 803e5dbb8464088a8d84509077bf6dce9ac26688 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Cristian=20M=C4=83gheru=C8=99an-Stanciu?= Date: Thu, 9 Jul 2015 17:41:43 +0200 Subject: [PATCH 066/183] improved the check for availability --- plugins/fuck/fuck.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/fuck/fuck.plugin.zsh b/plugins/fuck/fuck.plugin.zsh index 1a3b474f..cbf8c09c 100644 --- a/plugins/fuck/fuck.plugin.zsh +++ b/plugins/fuck/fuck.plugin.zsh @@ -1,4 +1,4 @@ -if [ $commands[thefuck] ]; then +if [[ -n $commands[thefuck] ]]; then alias fuck='eval $(thefuck $(fc -ln -1 | tail -n 1)); fc -R' alias FUCK='fuck' else From fa254458688acf0bede8567b2bb5793a9ed944d6 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Wed, 22 Jul 2015 12:59:39 -0400 Subject: [PATCH 067/183] diagnostics: include output file name in dump output --- lib/diagnostics.zsh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/lib/diagnostics.zsh b/lib/diagnostics.zsh index 53c6548d..f3823911 100644 --- a/lib/diagnostics.zsh +++ b/lib/diagnostics.zsh @@ -101,7 +101,9 @@ function _omz_diag_dump_one_big_text() { builtin echo oh-my-zsh diagnostic dump builtin echo - + builtin echo $outfile + builtin echo + # Basic system and zsh information command date command uname -a From b3ce0f36d61a1585c018d2d3602fae1d72e4b024 Mon Sep 17 00:00:00 2001 From: Qix Date: Sun, 1 Mar 2015 00:36:33 -0500 Subject: [PATCH 068/183] 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 3805d1eb..d4d3fdba 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). +![Agnoster theme](https://cloud.githubusercontent.com/assets/2618447/6316862/70f58fb6-ba03-11e4-82c9-c083bf9a6574.png) + +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 8e8a13398e71b969dc39189c0fedcc4733a911df Mon Sep 17 00:00:00 2001 From: Black Roland Date: Wed, 22 Jul 2015 17:20:52 +0900 Subject: [PATCH 069/183] Thefuck: combined with @cristim plugin. Code formating --- plugins/fuck/fuck.plugin.zsh | 6 ------ plugins/thefuck/thefuck.plugin.zsh | 12 ++++++++++-- 2 files changed, 10 insertions(+), 8 deletions(-) delete mode 100644 plugins/fuck/fuck.plugin.zsh diff --git a/plugins/fuck/fuck.plugin.zsh b/plugins/fuck/fuck.plugin.zsh deleted file mode 100644 index cbf8c09c..00000000 --- a/plugins/fuck/fuck.plugin.zsh +++ /dev/null @@ -1,6 +0,0 @@ -if [[ -n $commands[thefuck] ]]; then - alias fuck='eval $(thefuck $(fc -ln -1 | tail -n 1)); fc -R' - alias FUCK='fuck' -else - echo 'thefuck is not installed, you should "pip install thefuck" first' -fi diff --git a/plugins/thefuck/thefuck.plugin.zsh b/plugins/thefuck/thefuck.plugin.zsh index 81461d48..86ec9901 100644 --- a/plugins/thefuck/thefuck.plugin.zsh +++ b/plugins/thefuck/thefuck.plugin.zsh @@ -1,6 +1,14 @@ +if [[ -z $commands[thefuck] ]]; then + echo 'thefuck is not installed, you should "pip install thefuck" first' + return -1 +fi + +alias fuck='eval $(thefuck $(fc -ln -1 | tail -n 1)); fc -R' +alias FUCK='fuck' + fuck-command-line() { - FUCK=$(thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null) - [ -z $FUCK ] && echo -n -e "\a" && return + FUCK="$(thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)" + [[ -z $FUCK ]] && echo -n -e "\a" && return BUFFER=$FUCK zle end-of-line } From 54e27406dcc2fea55432595f9ec01502da8e4468 Mon Sep 17 00:00:00 2001 From: Roland Chernov Date: Thu, 23 Jul 2015 20:10:31 +0900 Subject: [PATCH 070/183] Thefuck: replaced static alias with `eval "$(thefuck-alias)"` --- plugins/thefuck/thefuck.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/thefuck/thefuck.plugin.zsh b/plugins/thefuck/thefuck.plugin.zsh index 86ec9901..10467d33 100644 --- a/plugins/thefuck/thefuck.plugin.zsh +++ b/plugins/thefuck/thefuck.plugin.zsh @@ -3,8 +3,8 @@ if [[ -z $commands[thefuck] ]]; then return -1 fi -alias fuck='eval $(thefuck $(fc -ln -1 | tail -n 1)); fc -R' -alias FUCK='fuck' +# Register alias +eval "$(thefuck-alias)" fuck-command-line() { FUCK="$(thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)" From f534b4b321d5db4b3d42d3e2cf1f2b2af5bd3c64 Mon Sep 17 00:00:00 2001 From: Roland Chernov Date: Thu, 23 Jul 2015 20:54:51 +0900 Subject: [PATCH 071/183] Thefuck: fixed compability with latest version --- plugins/thefuck/thefuck.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/thefuck/thefuck.plugin.zsh b/plugins/thefuck/thefuck.plugin.zsh index 10467d33..739bb0b9 100644 --- a/plugins/thefuck/thefuck.plugin.zsh +++ b/plugins/thefuck/thefuck.plugin.zsh @@ -7,7 +7,7 @@ fi eval "$(thefuck-alias)" fuck-command-line() { - FUCK="$(thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)" + FUCK="$(THEFUCK_REQUIRE_CONFIRMATION=0 thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)" [[ -z $FUCK ]] && echo -n -e "\a" && return BUFFER=$FUCK zle end-of-line From b875df8970a67d02eef74f1aad0b60f42fedb356 Mon Sep 17 00:00:00 2001 From: Brian Degenhardt Date: Mon, 27 Jul 2015 14:19:23 -0700 Subject: [PATCH 072/183] agnoster: speed up git prompt Problem On detached-refs, the git prompt is very slow because it uses a command to output all refs, which takes 32s on the twitter internal git repo. Solution Use git-rev-parse instead of git-show-ref to only output the head ref. Runtime drops to 0.03 seconds. Note Interestingly, git-rev-parse isn't slow without the --head arguement so I'll probably be cooking up a patch for the git team to speed this up eventually, but it's still pointless to sigpipe git as it walks the filesystem. --- 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 3a0c58b8..ee0c2afb 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -78,7 +78,7 @@ prompt_git() { if $(git rev-parse --is-inside-work-tree >/dev/null 2>&1); then dirty=$(parse_git_dirty) - ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git show-ref --head -s --abbrev |head -n1 2> /dev/null)" + ref=$(git symbolic-ref HEAD 2> /dev/null) || ref="➦ $(git rev-parse --short HEAD 2> /dev/null)" if [[ -n $dirty ]]; then prompt_segment yellow black else From c83575da3fb103af55215835c9e4add2665fbc86 Mon Sep 17 00:00:00 2001 From: Jerry Ling Date: Wed, 29 Jul 2015 20:05:44 +0800 Subject: [PATCH 073/183] Add 'man' plugin. Inspired by sudo. But we have man-preview! --- plugins/man/man.zsh | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 plugins/man/man.zsh diff --git a/plugins/man/man.zsh b/plugins/man/man.zsh new file mode 100644 index 00000000..3490b0b6 --- /dev/null +++ b/plugins/man/man.zsh @@ -0,0 +1,27 @@ +# ------------------------------------------------------------------------------ +# Author +# ------ +# +# * Jerry Ling +# +# ------------------------------------------------------------------------------ +# Usgae +# ----- +# +# man will be inserted before the command +# +# ------------------------------------------------------------------------------ + +man-command-line() { + [[ -z $BUFFER ]] && zle up-history + [[ $BUFFER != man\ * ]] && LBUFFER="man $LBUFFER" +} +zle -N man-command-line +# Defined shortcut keys: [Esc]man +bindkey "\e"man man-command-line + + +# ------------------------------------------------------------------------------ +# Also, you might want to use man-preview included in 'osx' plugin +# just substitute "man" in the function with "man-preview" after you included OS X in +# the .zshrc \ No newline at end of file From 2120b2e079dbcc887a13aaf976c04edaf10fb626 Mon Sep 17 00:00:00 2001 From: Andrew Stuart Date: Wed, 29 Jul 2015 13:58:22 -0700 Subject: [PATCH 074/183] Add escaped home --- plugins/jira/jira.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index f624648a..ed1a1f47 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -62,9 +62,9 @@ open_jira_issue () { jira_url_help() { cat << EOF JIRA url is not specified anywhere. -Valid options, in order of preference: +Valid options, in order of precedence: .jira-url file - $HOME/.jira-url file + \$HOME/.jira-url file JIRA_URL environment variable EOF } From a2b574bc9edc4f548ca7eb3a8116004be7252092 Mon Sep 17 00:00:00 2001 From: Matteo Giaccone Date: Thu, 30 Jul 2015 12:32:41 +0100 Subject: [PATCH 075/183] git plugin: make gclean safer, introduce gpristine --- plugins/git/git.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/git/git.plugin.zsh b/plugins/git/git.plugin.zsh index cc6eb103..52f8f751 100644 --- a/plugins/git/git.plugin.zsh +++ b/plugins/git/git.plugin.zsh @@ -71,7 +71,8 @@ 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 gclean='git clean -fd' +alias gpristine='git reset --hard && git clean -dfx' alias gcm='git checkout master' alias gcmsg='git commit -m' alias gco='git checkout' From fb8c446ea4317c391321a29dc97677bc6fdeb0cf Mon Sep 17 00:00:00 2001 From: Roland Chernov Date: Thu, 30 Jul 2015 21:04:58 +0900 Subject: [PATCH 076/183] Thefuck: fix global variable assignment --- plugins/thefuck/thefuck.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/thefuck/thefuck.plugin.zsh b/plugins/thefuck/thefuck.plugin.zsh index 739bb0b9..8b1746e8 100644 --- a/plugins/thefuck/thefuck.plugin.zsh +++ b/plugins/thefuck/thefuck.plugin.zsh @@ -7,7 +7,7 @@ fi eval "$(thefuck-alias)" fuck-command-line() { - FUCK="$(THEFUCK_REQUIRE_CONFIRMATION=0 thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)" + local FUCK="$(THEFUCK_REQUIRE_CONFIRMATION=0 thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)" [[ -z $FUCK ]] && echo -n -e "\a" && return BUFFER=$FUCK zle end-of-line From 5554207279809b8232970361257ec1903f5c422d Mon Sep 17 00:00:00 2001 From: Boris Avdeev Date: Fri, 31 Jul 2015 14:58:02 +0300 Subject: [PATCH 077/183] 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 7d3db0f8..07eb595a 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 daa04bae867a12fbe8256432c3590869d8f359ea Mon Sep 17 00:00:00 2001 From: Kentaro Wada Date: Sat, 1 Aug 2015 03:11:58 +0900 Subject: [PATCH 078/183] gnu-utils: add findutils (find,xargs,locate) --- plugins/gnu-utils/gnu-utils.plugin.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/plugins/gnu-utils/gnu-utils.plugin.zsh b/plugins/gnu-utils/gnu-utils.plugin.zsh index e59265d6..de95f7e6 100644 --- a/plugins/gnu-utils/gnu-utils.plugin.zsh +++ b/plugins/gnu-utils/gnu-utils.plugin.zsh @@ -29,7 +29,10 @@ if [[ -x "${commands[gwhoami]}" ]]; then 'gunexpand' 'guniq' 'gunlink' 'guptime' 'gusers' 'gvdir' 'gwc' 'gwho' 'gwhoami' 'gyes') - # Not part of coreutils, installed separately. + # findutils + gcmds+=('gfind' 'gxargs' 'glocate') + + # Not part of either coreutils or findutils, installed separately. gcmds+=('gsed' 'gtar' 'gtime') for gcmd in "${gcmds[@]}"; do From 90ea67edf0982923f82905d87bda5b685089f219 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Fri, 31 Jul 2015 22:23:12 -0400 Subject: [PATCH 079/183] 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 e1c2e2f9..973c4dcf 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 e1353fce3ccd88441f97b65adaa98e15a640ed33 Mon Sep 17 00:00:00 2001 From: Ahmed Hisham Ismail Date: Mon, 3 Aug 2015 22:06:33 +0200 Subject: [PATCH 080/183] Adds npmE alias Option to execute a command from node_modules folder --- plugins/npm/npm.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/npm/npm.plugin.zsh b/plugins/npm/npm.plugin.zsh index 68ec5fab..6d735762 100644 --- a/plugins/npm/npm.plugin.zsh +++ b/plugins/npm/npm.plugin.zsh @@ -12,3 +12,6 @@ alias npmS="npm i -S " # Install and save to dev-dependencies in your package.json # npmd is used by https://github.com/dominictarr/npmd alias npmD="npm i -D " +# Execute command from node_modules folder based on current directory +# i.e npmE gulp +alias npmE="'PATH=$(npm bin):$PATH'" From 084792b829657cdf516799e43f89c0b8c22f4ab8 Mon Sep 17 00:00:00 2001 From: xiao Date: Mon, 3 Aug 2015 22:10:24 -0700 Subject: [PATCH 081/183] 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 d101cfca..a2faa9ee 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 75041f08..708ae4f7 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 Date: Mon, 3 Aug 2015 22:58:29 -0700 Subject: [PATCH 082/183] 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 88d1129d..e4590afc 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 Date: Tue, 4 Aug 2015 11:42:28 -0700 Subject: [PATCH 083/183] 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 00000000..3f357b18 --- /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 00000000..1252bb96 --- /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 Date: Tue, 4 Aug 2015 21:54:01 +0200 Subject: [PATCH 084/183] 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 3f357b18..44e38a1c 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 1252bb96..11740dc4 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" Date: Tue, 4 Aug 2015 15:07:47 -0700 Subject: [PATCH 085/183] 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 a2faa9ee..0209981e 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 e4590afc..616e2c3c 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 708ae4f7..c458464c 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?= Date: Wed, 5 Aug 2015 00:27:51 +0200 Subject: [PATCH 086/183] 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 17f5f9cb..0d632a26 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?= Date: Wed, 5 Aug 2015 00:32:57 +0200 Subject: [PATCH 087/183] 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 b9fb8634..f7485621 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 \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 ca540c84..9a893270 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 39d8b10d..2463815a 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 d407edb9..7c3ad904 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?= Date: Wed, 5 Aug 2015 01:02:17 +0200 Subject: [PATCH 088/183] 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 472ab2b0..b11f0b51 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 7661c6ad..48cddbcc 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 269ae84c9b2e9b9bff2c8af6973ac03ba38c7e44 Mon Sep 17 00:00:00 2001 From: Ahmed Hisham Ismail Date: Wed, 5 Aug 2015 02:49:20 +0200 Subject: [PATCH 089/183] Removes unnecessary single quotes --- plugins/npm/npm.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/npm/npm.plugin.zsh b/plugins/npm/npm.plugin.zsh index 6d735762..64ba93a1 100644 --- a/plugins/npm/npm.plugin.zsh +++ b/plugins/npm/npm.plugin.zsh @@ -14,4 +14,4 @@ alias npmS="npm i -S " alias npmD="npm i -D " # Execute command from node_modules folder based on current directory # i.e npmE gulp -alias npmE="'PATH=$(npm bin):$PATH'" +alias npmE="PATH=$(npm bin):$PATH" From 720fb5b68e186feae24c48283ded7c41b41c73fb Mon Sep 17 00:00:00 2001 From: Manfred Touron Date: Tue, 9 Jun 2015 11:07:23 +0200 Subject: [PATCH 090/183] Support for 'scw' command (Scaleway CLI) --- plugins/scw/README.md | 7 + plugins/scw/_scw | 333 ++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 340 insertions(+) create mode 100644 plugins/scw/README.md create mode 100644 plugins/scw/_scw diff --git a/plugins/scw/README.md b/plugins/scw/README.md new file mode 100644 index 00000000..d2312c2e --- /dev/null +++ b/plugins/scw/README.md @@ -0,0 +1,7 @@ +## Scaleway CLI autocomplete plugin + +[scw](https://github.com/scaleway/scaleway-cli): Manage Bare Metal servers from Command Line (as easily as with Docker) + +- Adds autocomplete options for all `scw` commands. + +Maintainer : Manfred Touron ([@moul](https://github.com/moul)) diff --git a/plugins/scw/_scw b/plugins/scw/_scw new file mode 100644 index 00000000..f9fdf916 --- /dev/null +++ b/plugins/scw/_scw @@ -0,0 +1,333 @@ +#compdef scw +# +# zsh completion for scw (http://scaleway.com) +# +# Inspired by https://github.com/felixr/docker-zsh-completion + +__scw_get_servers() { + local expl + declare -a servers + servers=(${(f)"$(_call_program commands scw _completion servers-names)"}) + _describe -t servers "servers" servers +} + +__scw_stoppedservers() { + __scw_get_servers +} + +__scw_runningservers() { + __scw_get_servers +} + +__scw_servers () { + __scw_get_servers +} + +__scw_images () { + local expl + declare -a images + images=(${(f)"$(_call_program commands scw _completion images-names)"}) + _describe -t images "images" images +} + +__scw_images_and_snapshots () { + __scw_images + __scw_snapshots +} + +__scw_snapshots () { + local expl + declare -a snapshots + snapshots=(${(f)"$(_call_program commands scw _completion --prefix snapshots-names)"}) + _describe -t snapshots "snapshots" snapshots +} + +__scw_bootscripts () { + local expl + declare -a bootscripts + bootscripts=(${(f)"$(_call_program commands scw _completion bootscripts-names)"}) + _describe -t bootscripts "bootscripts" bootscripts +} + +__scw_tags() { + __scw_images +} + +__scw_repositories_with_tags() { + __scw_images +} + +__scw_search() { + # declare -a scwsearch + local cache_policy + zstyle -s ":completion:${curcontext}:" cache-policy cache_policy + if [[ -z "$cache_policy" ]]; then + zstyle ":completion:${curcontext}:" cache-policy __scw_caching_policy + fi + + local searchterm cachename + searchterm="${words[$CURRENT]%/}" + cachename=_scw-search-$searchterm + + local expl + local -a result + if ( [[ ${(P)+cachename} -eq 0 ]] || _cache_invalid ${cachename#_} ) \ + && ! _retrieve_cache ${cachename#_}; then + _message "Searching for ${searchterm}..." + result=(${${${(f)"$(_call_program commands scw search ${searchterm})"}%% *}[2,-1]}) + _store_cache ${cachename#_} result + fi + _wanted scwsearch expl 'available images' compadd -a result +} + +__scw_caching_policy() +{ + oldp=( "$1"(Nmh+1) ) # 1 hour + (( $#oldp )) +} + + +__scw_repositories () { + __scw_images +} + +__scw_commands () { + # local -a _scw_subcommands + local cache_policy + + zstyle -s ":completion:${curcontext}:" cache-policy cache_policy + if [[ -z "$cache_policy" ]]; then + zstyle ":completion:${curcontext}:" cache-policy __scw_caching_policy + fi + + if ( [[ ${+_scw_subcommands} -eq 0 ]] || _cache_invalid scw_subcommands) \ + && ! _retrieve_cache scw_subcommands; + then + local -a lines + lines=(${(f)"$(_call_program commands scw 2>&1)"}) + _scw_subcommands=(${${${lines[$((${lines[(i)Commands:]} + 1)),${lines[(I) *]}]}## #}/ ##/:}) + _scw_subcommands=($_scw_subcommands 'help:Show help for a command') + _store_cache scw_subcommands _scw_subcommands + fi + _describe -t scw-commands "scw command" _scw_subcommands +} + +__scw_subcommand () { + local -a _command_args + case "$words[1]" in + (attach) + _arguments \ + '--no-stdin[Do not attach stdin]' \ + ':servers:__scw_runningservers' + ;; + (commit) + _arguments \ + {-v,--volume=0}'[Volume slot]:volume: ' \ + ':server:__scw_servers' \ + ':repository:__scw_repositories_with_tags' + ;; + (cp) + _arguments \ + ':server:->server' \ + ':hostpath:_files' + case $state in + (server) + if compset -P '*:'; then + _files + else + __scw_servers -qS ":" + fi + ;; + esac + ;; + (exec) + local state ret + _arguments \ + {-T,--timeout=0}'[Set timeout values to seconds]' \ + {-w,--wait}'[Wait for SSH to be ready]' \ + ':servers:__scw_runningservers' \ + '*::command:->anycommand' && ret=0 + + case $state in + (anycommand) + shift 1 words + (( CURRENT-- )) + _normal + ;; + esac + + return ret + ;; + (history) + _arguments \ + '--no-trunc[Do not truncate output]' \ + {-q,--quiet}'[Only show numeric IDs]' \ + '*:images:__scw_images' + ;; + (images) + _arguments \ + {-a,--all}'[Show all images]' \ + '--no-trunc[Do not truncate output]' \ + {-q,--quiet}'[Only show numeric IDs]' \ + ':repository:__scw_repositories' + ;; + (info) + ;; + (inspect) + _arguments \ + {-f,--format=-}'[Format the output using the given go template]:template: ' \ + '*:servers:__scw_servers' + ;; + (kill) + _arguments \ + '*:servers:__scw_runningservers' + ;; + (login) + _arguments \ + {-o,--organization=-}'[Organization]:organization: ' \ + {-t,--token=-}'[Token]:token: ' \ + ':server: ' + ;; + (logout) + _arguments \ + ':server: ' + ;; + (logs) + _arguments \ + '*:servers:__scw_servers' + ;; + (port) + _arguments \ + '1:servers:__scw_runningservers' \ + '2:port:_ports' + ;; + (start) + _arguments \ + {-T,--timeout=0}'[Set timeout values to seconds]' \ + {-w,--wait}'[Wait for SSH to be ready]' \ + '*:servers:__scw_stoppedservers' + ;; + (rm) + _arguments \ + '*:servers:__scw_stoppedservers' + ;; + (rmi) + _arguments \ + '*:images:__scw_images' + ;; + (restart) + _arguments \ + '*:servers:__scw_runningservers' + ;; + (stop) + _arguments \ + {-t,--terminate}'[Stop and trash a server with its volumes]' \ + {-w,--wait}'[Synchronous stop. Wait for server to be stopped]' \ + '*:servers:__scw_runningservers' + ;; + (top) + _arguments \ + '1:servers:__scw_runningservers' \ + '(-)*:: :->ps-arguments' + case $state in + (ps-arguments) + _ps + ;; + esac + ;; + (ps) + _arguments \ + {-a,--all}'[Show all servers. Only running servers are shown by default]' \ + {-l,--latest}'[Show only the latest created server]' \ + '-n[Show n last created servers, include non-running one]:n:(1 5 10 25 50)' \ + '--no-trunc[Do not truncate output]' \ + {-q,--quiet}'[Only show numeric IDs]' + ;; + (tag) + _arguments \ + {-f,--force}'[force]'\ + ':image:__scw_images'\ + ':repository:__scw_repositories_with_tags' + ;; + (create|run) + _arguments \ + {-a,--attach}'[Attach to stdin, stdout or stderr]' \ + '*'{-e,--environment=-}'[Set environment variables]:environment variable: ' \ + '--name=-[Server name]:name: ' \ + '--bootscript=-[Assign a bootscript]:bootscript:__scw_bootscripts ' \ + '*-v[Bind mount a volume]:volume: '\ + '(-):images:__scw_images_and_snapshots' \ + '(-):command: _command_names -e' \ + '*::arguments: _normal' + + case $state in + (link) + if compset -P '*:'; then + _wanted alias expl 'Alias' compadd -E "" + else + __scw_runningservers -qS ":" + fi + ;; + esac + ;; + (rename) + _arguments \ + ':old name:__scw_servers' \ + ':new name: ' + ;; + (search) + _arguments \ + '--no-trunc[Do not truncate output]' \ + ':term: ' + ;; + (wait) + _arguments '*:servers:__scw_runningservers' + ;; + (help) + _arguments ':subcommand:__scw_commands' + ;; + (*) + _message 'Unknown sub command' + esac + +} + +_scw () { + # Support for subservices, which allows for `compdef _scw scw-shell=_scw_servers`. + # Based on /usr/share/zsh/functions/Completion/Unix/_git without support for `ret`. + if [[ $service != scw ]]; then + _call_function - _$service + return + fi + + local curcontext="$curcontext" state line + typeset -A opt_args + + _arguments -C \ + '-H[tcp://host:port to bind/connect to]:socket: ' \ + '(-): :->command' \ + '(-)*:: :->option-or-argument' + + if (( CURRENT == 1 )); then + + fi + case $state in + (command) + __scw_commands + ;; + (option-or-argument) + curcontext=${curcontext%:*:*}:scw-$words[1]: + __scw_subcommand + ;; + esac +} + +_scw "$@" + +# Local Variables: +# mode: Shell-Script +# sh-indentation: 4 +# indent-tabs-mode: nil +# sh-basic-offset: 4 +# End: +# vim: ft=zsh sw=4 ts=4 et From c3fbe4d121d9edb8b34bfbe1aad45a1d81e9899e Mon Sep 17 00:00:00 2001 From: Andrew Robertson Date: Wed, 5 Aug 2015 19:51:05 +0100 Subject: [PATCH 091/183] Add support for Docker images from custom registries --- plugins/docker/_docker | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/docker/_docker b/plugins/docker/_docker index 25f55bec..a82a31ad 100644 --- a/plugins/docker/_docker +++ b/plugins/docker/_docker @@ -27,7 +27,7 @@ __docker_all_containers() { # output a selectable list of all docker images __docker_images() { declare -a img_cmd - img_cmd=($(docker images | awk 'NR>1{print $1}')) + img_cmd=($(docker images | awk 'NR>1{print $1}'| sed 's/:/\\:/g')) _describe 'images' img_cmd } From ccb0ae57207b1701c3187faf49c417fb0a902f58 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Fri, 7 Aug 2015 22:45:46 +0200 Subject: [PATCH 092/183] 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 c40ca86a..6cd30732 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?= Date: Sat, 8 Aug 2015 01:31:02 +0200 Subject: [PATCH 093/183] 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 ec64c240..4e5f7799 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 Date: Sun, 9 Aug 2015 15:15:12 -0400 Subject: [PATCH 094/183] 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 e1c2e2f9..ecca516f 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?= Date: Sun, 9 Aug 2015 21:55:10 +0200 Subject: [PATCH 095/183] 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 4f045601..d60f0e27 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 14b4ba83c35c34f4a1f3a69c9967f502ee2d6528 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Sun, 9 Aug 2015 16:28:47 -0400 Subject: [PATCH 096/183] Move urlencode/urldecode functions to core lib --- lib/functions.zsh | 134 ++++++++++++++++++++++++++++++++++++++++++++ lib/termsupport.zsh | 33 +---------- 2 files changed, 135 insertions(+), 32 deletions(-) diff --git a/lib/functions.zsh b/lib/functions.zsh index 17f5f9cb..5c1a5a28 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -73,3 +73,137 @@ function env_default() { env | grep -q "^$1=" && return 0 export "$1=$2" && return 3 } + + +# Required for $langinfo +zmodload zsh/langinfo + +# URL-encode a string +# +# Encodes a string using RFC 2396 URL-encoding (%-escaped). +# See: https://www.ietf.org/rfc/rfc2396.txt +# +# By default, reserved characters and unreserved "mark" characters are +# not escaped by this function. This allows the common usage of passing +# an entire URL in, and encoding just special characters in it, with +# the expectation that reserved and mark characters are used appropriately. +# The -r and -m options turn on escaping of the reserved and mark characters, +# respectively, which allows arbitrary strings to be fully escaped for +# embedding inside URLs, where reserved characters might be misinterpreted. +# +# Prints the encoded string on stdout. +# Returns nonzero if encoding failed. +# +# Usage: +# omz_urlencode [-r] [-m] +# +# -r causes reserved characters (;/?:@&=+$,) to be escaped +# +# -m causes "mark" characters (_.!~*''()-) to be escaped +# +# -P causes spaces to be encoded as '%20' instead of '+' +function omz_urlencode() { + emulate -L zsh + zparseopts -D -E -a opts r m P + + local in_str=$1 + local url_str="" + local spaces_as_plus + if [[ -z $opts[(r)-P] ]]; then spaces_as_plus=1; fi + local str="$in_str" + + # URLs must use UTF-8 encoding; convert str to UTF-8 if required + local encoding=$langinfo[CODESET] + local safe_encodings + safe_encodings=(UTF-8 utf8 US-ASCII) + if [[ -z ${safe_encodings[(r)$encoding]} ]]; then + str=$(echo -E "$str" | iconv -f $encoding -t UTF-8) + if [[ $? != 0 ]]; then + echo "Error converting string from $encoding to UTF-8" >&2 + return 1 + fi + fi + + # Use LC_CTYPE=C to process text byte-by-byte + local i byte ord LC_ALL=C + export LC_ALL + local reserved=';/?:@&=+$,' + local mark='_.!~*''()-' + local dont_escape="[A-Za-z0-9" + if [[ -z $opts[(r)-r] ]]; then + dont_escape+=$reserved + fi + # $mark must be last because of the "-" + if [[ -z $opts[(r)-m] ]]; then + dont_escape+=$mark + fi + dont_escape+="]" + + # Implemented to use a single printf call and avoid subshells in the loop, + # for performance (primarily on Windows). + local url_str="" + for (( i = 1; i <= ${#str}; ++i )); do + byte="$str[i]" + if [[ "$byte" =~ "$dont_escape" ]]; then + url_str+="$byte" + else + if [[ "$byte" == " " && -n $spaces_as_plus ]]; then + url_str+="+" + else + ord=$(( [##16] #byte )) + url_str+="%$ord" + fi + fi + done + echo -E "$url_str" +} + +# URL-decode a string +# +# Decodes a RFC 2396 URL-encoded (%-escaped) string. +# This decodes the '+' and '%' escapes in the input string, and leaves +# other characters unchanged. Does not enforce that the input is a +# valid URL-encoded string. This is a convenience to allow callers to +# pass in a full URL or similar strings and decode them for human +# presentation. +# +# Outputs the encoded string on stdout. +# Returns nonzero if encoding failed. +# +# Usage: +# omz_urldecode - prints decoded string followed by a newline +function omz_urldecode { + emulate -L zsh + local encoded_url=$1 + + echo -e input $1 + # Work bytewise, since URLs escape UTF-8 octets + local caller_encoding=$langinfo[CODESET] + local LC_ALL=C + export LC_ALL + + # Change + back to ' ' + local tmp=${encoded_url:gs/+/ /} + # Protect other escapes to pass through the printf unchanged + tmp=${tmp:gs/\\/\\\\/} + # Handle %-escapes by turning them into `\xXX` printf escapes + tmp=${tmp:gs/%/\\x/} + echo -E "before decode $tmp" + local decoded + eval "decoded=\$'$tmp'" + + # Now we have a UTF-8 encoded string in the variable. We need to re-encode + # it if caller is in a non-UTF-8 locale. + local safe_encodings + safe_encodings=(UTF-8 utf8 US-ASCII) + if [[ -z ${safe_encodings[(r)$caller_encoding]} ]]; then + decoded=$(echo -E "$decoded" | iconv -f UTF-8 -t $caller_encoding) + if [[ $? != 0 ]]; then + echo "Error converting string from UTF-8 to $caller_encoding" >&2 + return 1 + fi + fi + + echo -E "$decoded" +} + diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 52622f5a..726cdce4 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -59,44 +59,13 @@ preexec_functions+=(omz_termsupport_preexec) if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then - # URL-encodes a string - # Outputs the encoded string on stdout - # Returns nonzero if encoding failed - function _omz_urlencode() { - local str=$1 - local url_str="" - - # URLs must use UTF-8 encoding; convert if required - local encoding=${LC_CTYPE/*./} - if [[ -n $encoding && $encoding != UTF-8 && $encoding != utf8 ]]; then - str=$(echo $str | iconv -f $encoding -t UTF-8) - if [[ $? != 0 ]]; then - echo "Error converting string from $encoding to UTF-8" >&2 - return 1 - fi - fi - - # Use LC_CTYPE=C to process text byte-by-byte - local i ch hexch LC_CTYPE=C - for ((i = 1; i <= ${#str}; ++i)); do - ch="$str[i]" - if [[ "$ch" =~ [/._~A-Za-z0-9-] ]]; then - url_str+="$ch" - else - hexch=$(printf "%02X" "'$ch") - url_str+="%$hexch" - fi - done - echo $url_str - } - # Emits the control sequence to notify Terminal.app of the cwd function update_terminalapp_cwd() { # Identify the directory using a "file:" scheme URL, including # the host name to disambiguate local vs. remote paths. # Percent-encode the pathname. - local URL_PATH=$(_omz_urlencode $PWD) + local URL_PATH=$(omz_urlencode -P $PWD) [[ $? != 0 ]] && return 1 local PWD_URL="file://$HOST$URL_PATH" # Undocumented Terminal.app-specific control sequence From be10229659959a4ff455642e44fdaa5666e15ce3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sun, 9 Aug 2015 21:56:02 +0200 Subject: [PATCH 097/183] 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 d60f0e27..bc253209 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 Date: Mon, 10 Aug 2015 11:41:48 +0800 Subject: [PATCH 098/183] 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 d407edb9..898eb2c3 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' From dcd95dd2238bc1b3203306a2f66acc09080cfee6 Mon Sep 17 00:00:00 2001 From: Ahmed Hisham Ismail Date: Tue, 11 Aug 2015 02:56:49 +0200 Subject: [PATCH 099/183] Changes quotes so that path will be set appropriately on multiple runs --- plugins/npm/npm.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/npm/npm.plugin.zsh b/plugins/npm/npm.plugin.zsh index 64ba93a1..595105d3 100644 --- a/plugins/npm/npm.plugin.zsh +++ b/plugins/npm/npm.plugin.zsh @@ -14,4 +14,4 @@ alias npmS="npm i -S " alias npmD="npm i -D " # Execute command from node_modules folder based on current directory # i.e npmE gulp -alias npmE="PATH=$(npm bin):$PATH" +alias npmE='PATH="$(npm bin)":"$PATH"' From 58d2f9335d21a30a85d47c820203e00c1f3d5be7 Mon Sep 17 00:00:00 2001 From: Chang Hyun Park Date: Wed, 12 Aug 2015 16:47:37 +0900 Subject: [PATCH 100/183] Check if Zsh is installed prior to installing Oh My Zsh Check if Zsh is installed before installing anything else. New-commers, or people who don't read the disclaimers(ex. me) will go straight to stack overflow if chsh -s returns an error. --- tools/install.sh | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/tools/install.sh b/tools/install.sh index c83a6f23..95173775 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -1,5 +1,12 @@ set -e +CHECK_ZSH_INSTALLED=$(grep /zsh$ /etc/shells | wc -l) +if [ ! $CHECK_ZSH_INSTALLED -ge 1 ]; then + echo "\033[0;33m Zsh is not installed!\033[0m Please install zsh first!" + exit +fi +unset CHECK_ZSH_INSTALLED + if [ ! -n "$ZSH" ]; then ZSH=~/.oh-my-zsh fi From 02383017268004c4873797c16a667389bead1b83 Mon Sep 17 00:00:00 2001 From: LE Manh Cuong Date: Fri, 14 Aug 2015 09:55:46 +0700 Subject: [PATCH 101/183] Emoji plugin - Fix wrong string comparison --- plugins/emoji/emoji-char-definitions.zsh | 9 +++++++++ plugins/emoji/update_emoji.pl | 2 +- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/plugins/emoji/emoji-char-definitions.zsh b/plugins/emoji/emoji-char-definitions.zsh index 7d110603..04693da0 100644 --- a/plugins/emoji/emoji-char-definitions.zsh +++ b/plugins/emoji/emoji-char-definitions.zsh @@ -7,8 +7,12 @@ # $emoji - which maps character names to Unicode characters # $emoji_flags - maps country names to Unicode flag characters using region indicators +# Main emoji typeset -gAH emoji +# National flags typeset -gAH emoji_flags +# Combining modifiers +typeset -gAH emoji_mod emoji[copyright_sign]=$'\U00A9' emoji[registered_sign]=$'\U00AE' @@ -448,10 +452,15 @@ emoji[badminton_racquet_and_shuttlecock]=$'\U1F3F8' emoji[bow_and_arrow]=$'\U1F3F9' emoji[amphora]=$'\U1F3FA' emoji[emoji_modifier_fitzpatrick_type_1_2]=$'\U1F3FB' +emoji_mod[emoji_modifier_fitzpatrick_type_1_2]=$'\U1F3FB' emoji[emoji_modifier_fitzpatrick_type_3]=$'\U1F3FC' +emoji_mod[emoji_modifier_fitzpatrick_type_3]=$'\U1F3FC' emoji[emoji_modifier_fitzpatrick_type_4]=$'\U1F3FD' +emoji_mod[emoji_modifier_fitzpatrick_type_4]=$'\U1F3FD' emoji[emoji_modifier_fitzpatrick_type_5]=$'\U1F3FE' +emoji_mod[emoji_modifier_fitzpatrick_type_5]=$'\U1F3FE' emoji[emoji_modifier_fitzpatrick_type_6]=$'\U1F3FF' +emoji_mod[emoji_modifier_fitzpatrick_type_6]=$'\U1F3FF' emoji[rat]=$'\U1F400' emoji[mouse]=$'\U1F401' emoji[ox]=$'\U1F402' diff --git a/plugins/emoji/update_emoji.pl b/plugins/emoji/update_emoji.pl index d90c6e31..04f3ce8e 100644 --- a/plugins/emoji/update_emoji.pl +++ b/plugins/emoji/update_emoji.pl @@ -88,7 +88,7 @@ typeset -gAH emoji_mod } # 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" ) { + if ( $modifier_status eq "modifier" ) { $outfh->print("emoji_mod[$omz_name]=\$'$zsh_code'\n"); } } else { From d20c111d78f52dfe81bc632532774d3715feb4e3 Mon Sep 17 00:00:00 2001 From: Chayoung You Date: Sat, 15 Aug 2015 15:19:02 +0900 Subject: [PATCH 102/183] rvm plugin: Fix `gems` to work with GNU sed Fix #1579. --- plugins/rvm/rvm.plugin.zsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/rvm/rvm.plugin.zsh b/plugins/rvm/rvm.plugin.zsh index 234ac164..53e809aa 100644 --- a/plugins/rvm/rvm.plugin.zsh +++ b/plugins/rvm/rvm.plugin.zsh @@ -61,11 +61,11 @@ function gems { local current_ruby=`rvm-prompt i v p` local current_gemset=`rvm-prompt g` - gem list $@ | sed \ - -Ee "s/\([0-9, \.]+( .+)?\)/$fg[blue]&$reset_color/g" \ - -Ee "s|$(echo $rvm_path)|$fg[magenta]\$rvm_path$reset_color|g" \ - -Ee "s/$current_ruby@global/$fg[yellow]&$reset_color/g" \ - -Ee "s/$current_ruby$current_gemset$/$fg[green]&$reset_color/g" + gem list $@ | sed -E \ + -e "s/\([0-9, \.]+( .+)?\)/$fg[blue]&$reset_color/g" \ + -e "s|$(echo $rvm_path)|$fg[magenta]\$rvm_path$reset_color|g" \ + -e "s/$current_ruby@global/$fg[yellow]&$reset_color/g" \ + -e "s/$current_ruby$current_gemset$/$fg[green]&$reset_color/g" } function _rvm_completion { From daedfcab510b01d566a2dff6bc94a9e91a563a18 Mon Sep 17 00:00:00 2001 From: Gabe Martin-Dempesy Date: Sat, 15 Aug 2015 12:54:46 -0700 Subject: [PATCH 103/183] reduce rbenv plugin load time by 150ms by removing additional brew call --- plugins/rbenv/rbenv.plugin.zsh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/rbenv/rbenv.plugin.zsh b/plugins/rbenv/rbenv.plugin.zsh index 213e1beb..ef5106f2 100644 --- a/plugins/rbenv/rbenv.plugin.zsh +++ b/plugins/rbenv/rbenv.plugin.zsh @@ -2,14 +2,11 @@ _homebrew-installed() { type brew &> /dev/null } -_rbenv-from-homebrew-installed() { - brew --prefix rbenv &> /dev/null -} - FOUND_RBENV=0 rbenvdirs=("$HOME/.rbenv" "/usr/local/rbenv" "/opt/rbenv" "/usr/local/opt/rbenv") -if _homebrew-installed && _rbenv-from-homebrew-installed ; then - rbenvdirs=($(brew --prefix rbenv) "${rbenvdirs[@]}") +if _homebrew-installed && rbenv_homebrew_path=$(brew --prefix rbenv 2>/dev/null); then + rbenvdirs=($rbenv_homebrew_path "${rbenvdirs[@]}") + unset rbenv_homebrew_path fi for rbenvdir in "${rbenvdirs[@]}" ; do From de47e2df69fd4ac29fd887f5ab593f2f738f982a Mon Sep 17 00:00:00 2001 From: Felix Krause Date: Sun, 16 Aug 2015 19:29:58 +0200 Subject: [PATCH 104/183] Use https instead of http --- tools/upgrade.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 5f0a81f1..e06e4f33 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -9,7 +9,7 @@ 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 news and updates, follow us 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: ' 'https://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?' From 88243b846adc61c3e34a60f4c0ae53e3eb8b9e93 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sun, 16 Aug 2015 22:26:33 +0200 Subject: [PATCH 105/183] Use right variable name to avoid zero-length array This fixes the typographic error that always assigned an undefined array to `$names`, which made `$list_size` = 0 and triggered a divide by zero error on the next line. --- plugins/emoji/emoji.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/emoji/emoji.plugin.zsh b/plugins/emoji/emoji.plugin.zsh index a98d0b71..adb11bb5 100644 --- a/plugins/emoji/emoji.plugin.zsh +++ b/plugins/emoji/emoji.plugin.zsh @@ -255,7 +255,7 @@ function random_emoji() { if [[ -z "$group" || "$group" == "all" ]]; then names=(${(k)emoji}) else - names=(${=emoji_groups[$group_name]}) + names=(${=emoji_groups[$group]}) fi local list_size=$#names local random_index=$(( ( RANDOM % $list_size ) + 1 )) From c6a5f6efb434fa64f31b40f366e7fecae80758e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sun, 16 Aug 2015 22:30:56 +0200 Subject: [PATCH 106/183] Check that list_size value is not zero before division --- plugins/emoji/emoji.plugin.zsh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/plugins/emoji/emoji.plugin.zsh b/plugins/emoji/emoji.plugin.zsh index adb11bb5..f2d169bf 100644 --- a/plugins/emoji/emoji.plugin.zsh +++ b/plugins/emoji/emoji.plugin.zsh @@ -257,7 +257,8 @@ function random_emoji() { else names=(${=emoji_groups[$group]}) fi - local list_size=$#names + local list_size=${#names} + [[ $list_size -eq 0 ]] && return 1 local random_index=$(( ( RANDOM % $list_size ) + 1 )) local name=${names[$random_index]} echo ${emoji[$name]} From 6443626a6beedc1135402e0fdd4646ba1e7ae35a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sat, 1 Aug 2015 18:06:36 +0200 Subject: [PATCH 107/183] Pull in latest version from olivierverdier/zsh-git-prompt --- plugins/git-prompt/git-prompt.plugin.zsh | 95 +++++++++++++---- plugins/git-prompt/gitstatus.py | 125 ++++++++++------------- 2 files changed, 127 insertions(+), 93 deletions(-) diff --git a/plugins/git-prompt/git-prompt.plugin.zsh b/plugins/git-prompt/git-prompt.plugin.zsh index d868a5fe..ccba22dc 100644 --- a/plugins/git-prompt/git-prompt.plugin.zsh +++ b/plugins/git-prompt/git-prompt.plugin.zsh @@ -1,32 +1,34 @@ # ZSH Git Prompt Plugin from: # http://github.com/olivierverdier/zsh-git-prompt -# -export __GIT_PROMPT_DIR=$ZSH/plugins/git-prompt + +export __GIT_PROMPT_DIR=${0:A:h} + +export GIT_PROMPT_EXECUTABLE=${GIT_PROMPT_USE_PYTHON:-"python"} + +# Initialize colors. +autoload -U colors +colors # Allow for functions in the prompt. setopt PROMPT_SUBST -## Enable auto-execution of functions. -typeset -ga preexec_functions -typeset -ga precmd_functions -typeset -ga chpwd_functions +autoload -U add-zsh-hook -# Append git functions needed for prompt. -preexec_functions+='preexec_update_git_vars' -precmd_functions+='precmd_update_git_vars' -chpwd_functions+='chpwd_update_git_vars' +add-zsh-hook chpwd chpwd_update_git_vars +add-zsh-hook preexec preexec_update_git_vars +add-zsh-hook precmd precmd_update_git_vars ## Function definitions function preexec_update_git_vars() { case "$2" in - git*) + git*|hub*|gh*|stg*) __EXECUTED_GIT_COMMAND=1 ;; esac } function precmd_update_git_vars() { - if [ -n "$__EXECUTED_GIT_COMMAND" ]; then + if [ -n "$__EXECUTED_GIT_COMMAND" ] || [ ! -n "$ZSH_THEME_GIT_PROMPT_CACHE" ]; then update_current_git_vars unset __EXECUTED_GIT_COMMAND fi @@ -39,19 +41,68 @@ function chpwd_update_git_vars() { function update_current_git_vars() { unset __CURRENT_GIT_STATUS - local gitstatus="$__GIT_PROMPT_DIR/gitstatus.py" - _GIT_STATUS=`python ${gitstatus}` - __CURRENT_GIT_STATUS=("${(f)_GIT_STATUS}") + if [[ "$GIT_PROMPT_EXECUTABLE" == "python" ]]; then + local gitstatus="$__GIT_PROMPT_DIR/gitstatus.py" + _GIT_STATUS=`python ${gitstatus} 2>/dev/null` + fi + if [[ "$GIT_PROMPT_EXECUTABLE" == "haskell" ]]; then + local gitstatus="$__GIT_PROMPT_DIR/dist/build/gitstatus/gitstatus" + _GIT_STATUS=`${gitstatus}` + fi + __CURRENT_GIT_STATUS=("${(@s: :)_GIT_STATUS}") + GIT_BRANCH=$__CURRENT_GIT_STATUS[1] + GIT_AHEAD=$__CURRENT_GIT_STATUS[2] + GIT_BEHIND=$__CURRENT_GIT_STATUS[3] + GIT_STAGED=$__CURRENT_GIT_STATUS[4] + GIT_CONFLICTS=$__CURRENT_GIT_STATUS[5] + GIT_CHANGED=$__CURRENT_GIT_STATUS[6] + GIT_UNTRACKED=$__CURRENT_GIT_STATUS[7] } -function prompt_git_info() { + +git_super_status() { + precmd_update_git_vars if [ -n "$__CURRENT_GIT_STATUS" ]; then - echo "(%{${fg[red]}%}$__CURRENT_GIT_STATUS[1]%{${fg[default]}%}$__CURRENT_GIT_STATUS[2]%{${fg[magenta]}%}$__CURRENT_GIT_STATUS[3]%{${fg[default]}%})" - fi + STATUS="$ZSH_THEME_GIT_PROMPT_PREFIX$ZSH_THEME_GIT_PROMPT_BRANCH$GIT_BRANCH%{${reset_color}%}" + if [ "$GIT_BEHIND" -ne "0" ]; then + STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_BEHIND$GIT_BEHIND%{${reset_color}%}" + fi + if [ "$GIT_AHEAD" -ne "0" ]; then + STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_AHEAD$GIT_AHEAD%{${reset_color}%}" + fi + STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_SEPARATOR" + if [ "$GIT_STAGED" -ne "0" ]; then + STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_STAGED$GIT_STAGED%{${reset_color}%}" + fi + if [ "$GIT_CONFLICTS" -ne "0" ]; then + STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_CONFLICTS$GIT_CONFLICTS%{${reset_color}%}" + fi + if [ "$GIT_CHANGED" -ne "0" ]; then + STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_CHANGED$GIT_CHANGED%{${reset_color}%}" + fi + if [ "$GIT_UNTRACKED" -ne "0" ]; then + STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED%{${reset_color}%}" + fi + if [ "$GIT_CHANGED" -eq "0" ] && [ "$GIT_CONFLICTS" -eq "0" ] && [ "$GIT_STAGED" -eq "0" ] && [ "$GIT_UNTRACKED" -eq "0" ]; then + STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_CLEAN" + fi + STATUS="$STATUS%{${reset_color}%}$ZSH_THEME_GIT_PROMPT_SUFFIX" + echo "$STATUS" + fi } +# Default values for the appearance of the prompt. Configure at will. +ZSH_THEME_GIT_PROMPT_PREFIX="(" +ZSH_THEME_GIT_PROMPT_SUFFIX=")" +ZSH_THEME_GIT_PROMPT_SEPARATOR="|" +ZSH_THEME_GIT_PROMPT_BRANCH="%{$fg_bold[magenta]%}" +ZSH_THEME_GIT_PROMPT_STAGED="%{$fg[red]%}%{●%G%}" +ZSH_THEME_GIT_PROMPT_CONFLICTS="%{$fg[red]%}%{✖%G%}" +ZSH_THEME_GIT_PROMPT_CHANGED="%{$fg[blue]%}%{✚%G%}" +ZSH_THEME_GIT_PROMPT_BEHIND="%{↓%G%}" +ZSH_THEME_GIT_PROMPT_AHEAD="%{↑%G%}" +ZSH_THEME_GIT_PROMPT_UNTRACKED="%{…%G%}" +ZSH_THEME_GIT_PROMPT_CLEAN="%{$fg_bold[green]%}%{✔%G%}" + # Set the prompt. -#PROMPT='%B%m%~%b$(prompt_git_info) %# ' -# for a right prompt: -#RPROMPT='%b$(prompt_git_info)' -RPROMPT='$(prompt_git_info)' +RPROMPT='$(git_super_status)' diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py index 25684143..d944fd4e 100644 --- a/plugins/git-prompt/gitstatus.py +++ b/plugins/git-prompt/gitstatus.py @@ -1,82 +1,65 @@ #!/usr/bin/env python -# -*- coding: UTF-8 -*- +from __future__ import print_function + +# change this symbol to whatever you prefer +prehash = ':' + from subprocess import Popen, PIPE -import re -# change those symbols to whatever you prefer -symbols = { - 'ahead of': '↑', - 'behind': '↓', - 'staged': '♦', - 'changed': '‣', - 'untracked': '…', - 'clean': '⚡', - 'unmerged': '≠', - 'sha1': ':' -} +import sys +gitsym = Popen(['git', 'symbolic-ref', 'HEAD'], stdout=PIPE, stderr=PIPE) +branch, error = gitsym.communicate() -output, error = Popen( - ['git', 'status'], stdout=PIPE, stderr=PIPE, universal_newlines=True).communicate() +error_string = error.decode('utf-8') -if error: - import sys - sys.exit(0) -lines = output.splitlines() +if 'fatal: Not a git repository' in error_string: + sys.exit(0) -behead_re = re.compile( - r"^# Your branch is (ahead of|behind) '(.*)' by (\d+) commit") -diverge_re = re.compile(r"^# and have (\d+) and (\d+) different") +branch = branch.decode("utf-8").strip()[11:] -status = '' -staged = re.compile(r'^# Changes to be committed:$', re.MULTILINE) -changed = re.compile(r'^# Changed but not updated:$', re.MULTILINE) -untracked = re.compile(r'^# Untracked files:$', re.MULTILINE) -unmerged = re.compile(r'^# Unmerged paths:$', re.MULTILINE) +res, err = Popen(['git','diff','--name-status'], stdout=PIPE, stderr=PIPE).communicate() +err_string = err.decode('utf-8') +if 'fatal' in err_string: + sys.exit(0) +changed_files = [namestat[0] for namestat in res.decode("utf-8").splitlines()] +staged_files = [namestat[0] for namestat in Popen(['git','diff', '--staged','--name-status'], stdout=PIPE).communicate()[0].splitlines()] +nb_changed = len(changed_files) - changed_files.count('U') +nb_U = staged_files.count('U') +nb_staged = len(staged_files) - nb_U +staged = str(nb_staged) +conflicts = str(nb_U) +changed = str(nb_changed) +nb_untracked = len([0 for status in Popen(['git','status','--porcelain',],stdout=PIPE).communicate()[0].decode("utf-8").splitlines() if status.startswith('??')]) +untracked = str(nb_untracked) +ahead, behind = 0,0 -def execute(*command): - out, err = Popen(stdout=PIPE, stderr=PIPE, *command).communicate() - if not err: - nb = len(out.splitlines()) - else: - nb = '?' - return nb - -if staged.search(output): - nb = execute( - ['git', 'diff', '--staged', '--name-only', '--diff-filter=ACDMRT']) - status += '%s%s' % (symbols['staged'], nb) -if unmerged.search(output): - nb = execute(['git', 'diff', '--staged', '--name-only', '--diff-filter=U']) - status += '%s%s' % (symbols['unmerged'], nb) -if changed.search(output): - nb = execute(['git', 'diff', '--name-only', '--diff-filter=ACDMRT']) - status += '%s%s' % (symbols['changed'], nb) -if untracked.search(output): - status += symbols['untracked'] -if status == '': - status = symbols['clean'] - -remote = '' - -bline = lines[0] -if bline.find('Not currently on any branch') != -1: - branch = symbols['sha1'] + Popen([ - 'git', - 'rev-parse', - '--short', - 'HEAD'], stdout=PIPE).communicate()[0][:-1] +if not branch: # not on any branch + branch = prehash + Popen(['git','rev-parse','--short','HEAD'], stdout=PIPE).communicate()[0].decode("utf-8")[:-1] else: - branch = bline.split(' ')[-1] - bstatusline = lines[1] - match = behead_re.match(bstatusline) - if match: - remote = symbols[match.groups()[0]] - remote += match.groups()[2] - elif lines[2:]: - div_match = diverge_re.match(lines[2]) - if div_match: - remote = "{behind}{1}{ahead of}{0}".format( - *div_match.groups(), **symbols) + remote_name = Popen(['git','config','branch.%s.remote' % branch], stdout=PIPE).communicate()[0].decode("utf-8").strip() + if remote_name: + merge_name = Popen(['git','config','branch.%s.merge' % branch], stdout=PIPE).communicate()[0].decode("utf-8").strip() + if remote_name == '.': # local + remote_ref = merge_name + else: + remote_ref = 'refs/remotes/%s/%s' % (remote_name, merge_name[11:]) + revgit = Popen(['git', 'rev-list', '--left-right', '%s...HEAD' % remote_ref],stdout=PIPE, stderr=PIPE) + revlist = revgit.communicate()[0] + if revgit.poll(): # fallback to local + revlist = Popen(['git', 'rev-list', '--left-right', '%s...HEAD' % merge_name],stdout=PIPE, stderr=PIPE).communicate()[0] + behead = revlist.decode("utf-8").splitlines() + ahead = len([x for x in behead if x[0]=='>']) + behind = len(behead) - ahead + +out = ' '.join([ + branch, + str(ahead), + str(behind), + staged, + conflicts, + changed, + untracked, + ]) +print(out, end='') -print('\n'.join([branch, remote, status])) From 5642014ff1b718df04d803b7b0457b9872b2b4f2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sat, 1 Aug 2015 18:13:46 +0200 Subject: [PATCH 108/183] Pull in simplified version from @wkentaro This version uses `git status --porcelain` instead of making multiple calls to `git status`. --- plugins/git-prompt/gitstatus.py | 80 +++++++++++++++++---------------- 1 file changed, 42 insertions(+), 38 deletions(-) diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py index d944fd4e..1065b3cb 100644 --- a/plugins/git-prompt/gitstatus.py +++ b/plugins/git-prompt/gitstatus.py @@ -4,6 +4,7 @@ from __future__ import print_function # change this symbol to whatever you prefer prehash = ':' +import subprocess from subprocess import Popen, PIPE import sys @@ -13,53 +14,56 @@ branch, error = gitsym.communicate() error_string = error.decode('utf-8') if 'fatal: Not a git repository' in error_string: - sys.exit(0) + sys.exit(0) branch = branch.decode("utf-8").strip()[11:] -res, err = Popen(['git','diff','--name-status'], stdout=PIPE, stderr=PIPE).communicate() -err_string = err.decode('utf-8') -if 'fatal' in err_string: - sys.exit(0) -changed_files = [namestat[0] for namestat in res.decode("utf-8").splitlines()] -staged_files = [namestat[0] for namestat in Popen(['git','diff', '--staged','--name-status'], stdout=PIPE).communicate()[0].splitlines()] -nb_changed = len(changed_files) - changed_files.count('U') -nb_U = staged_files.count('U') -nb_staged = len(staged_files) - nb_U -staged = str(nb_staged) -conflicts = str(nb_U) -changed = str(nb_changed) -nb_untracked = len([0 for status in Popen(['git','status','--porcelain',],stdout=PIPE).communicate()[0].decode("utf-8").splitlines() if status.startswith('??')]) -untracked = str(nb_untracked) +# Get git status (staged, change, conflicts and untracked) +try: + res = subprocess.check_output(['git', 'status', '--porcelain']) +except subprocess.CalledProcessError: + sys.exit(0) +status = [(st[0], st[1], st[2:]) for st in res.splitlines()] +untracked, staged, changed, conflicts = [], [], [], [] +for st in status: + if st[0] == '?' and st[1] == '?': + untracked.append(st) + else: + if st[1] == 'M': + changed.append(st) + if st[0] == 'U': + conflicts.append(st) + elif st[0] != ' ': + staged.append(st) ahead, behind = 0,0 if not branch: # not on any branch - branch = prehash + Popen(['git','rev-parse','--short','HEAD'], stdout=PIPE).communicate()[0].decode("utf-8")[:-1] + branch = prehash + Popen(['git','rev-parse','--short','HEAD'], stdout=PIPE).communicate()[0].decode("utf-8")[:-1] else: - remote_name = Popen(['git','config','branch.%s.remote' % branch], stdout=PIPE).communicate()[0].decode("utf-8").strip() - if remote_name: - merge_name = Popen(['git','config','branch.%s.merge' % branch], stdout=PIPE).communicate()[0].decode("utf-8").strip() - if remote_name == '.': # local - remote_ref = merge_name - else: - remote_ref = 'refs/remotes/%s/%s' % (remote_name, merge_name[11:]) - revgit = Popen(['git', 'rev-list', '--left-right', '%s...HEAD' % remote_ref],stdout=PIPE, stderr=PIPE) - revlist = revgit.communicate()[0] - if revgit.poll(): # fallback to local - revlist = Popen(['git', 'rev-list', '--left-right', '%s...HEAD' % merge_name],stdout=PIPE, stderr=PIPE).communicate()[0] - behead = revlist.decode("utf-8").splitlines() - ahead = len([x for x in behead if x[0]=='>']) - behind = len(behead) - ahead + remote_name = Popen(['git','config','branch.%s.remote' % branch], stdout=PIPE).communicate()[0].decode("utf-8").strip() + if remote_name: + merge_name = Popen(['git','config','branch.%s.merge' % branch], stdout=PIPE).communicate()[0].decode("utf-8").strip() + if remote_name == '.': # local + remote_ref = merge_name + else: + remote_ref = 'refs/remotes/%s/%s' % (remote_name, merge_name[11:]) + revgit = Popen(['git', 'rev-list', '--left-right', '%s...HEAD' % remote_ref],stdout=PIPE, stderr=PIPE) + revlist = revgit.communicate()[0] + if revgit.poll(): # fallback to local + revlist = Popen(['git', 'rev-list', '--left-right', '%s...HEAD' % merge_name],stdout=PIPE, stderr=PIPE).communicate()[0] + behead = revlist.decode("utf-8").splitlines() + ahead = len([x for x in behead if x[0]=='>']) + behind = len(behead) - ahead out = ' '.join([ - branch, - str(ahead), - str(behind), - staged, - conflicts, - changed, - untracked, - ]) + branch, + str(ahead), + str(behind), + str(len(staged)), + str(len(conflicts)), + str(len(changed)), + str(len(untracked)), +]) print(out, end='') From 1d133ff11fe187ee7255637d51165013b4e6a738 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sat, 1 Aug 2015 18:26:18 +0200 Subject: [PATCH 109/183] Cleanup the rest of gitstatus.py --- plugins/git-prompt/gitstatus.py | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py index 1065b3cb..903ad474 100644 --- a/plugins/git-prompt/gitstatus.py +++ b/plugins/git-prompt/gitstatus.py @@ -4,16 +4,13 @@ from __future__ import print_function # change this symbol to whatever you prefer prehash = ':' +import sys import subprocess from subprocess import Popen, PIPE -import sys -gitsym = Popen(['git', 'symbolic-ref', 'HEAD'], stdout=PIPE, stderr=PIPE) -branch, error = gitsym.communicate() +branch, error = Popen(['git', 'symbolic-ref', 'HEAD'], stdout=PIPE, stderr=PIPE).communicate() -error_string = error.decode('utf-8') - -if 'fatal: Not a git repository' in error_string: +if 'fatal: Not a git repository' in error.decode('utf-8'): sys.exit(0) branch = branch.decode("utf-8").strip()[11:] From 6ff53d173b374e5ebbdff141059c71e4e14aa62e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sat, 1 Aug 2015 18:09:20 +0200 Subject: [PATCH 110/183] Cleanup of git-prompt plugin file --- plugins/git-prompt/git-prompt.plugin.zsh | 110 ++++++++++------------- 1 file changed, 47 insertions(+), 63 deletions(-) diff --git a/plugins/git-prompt/git-prompt.plugin.zsh b/plugins/git-prompt/git-prompt.plugin.zsh index ccba22dc..5175bf70 100644 --- a/plugins/git-prompt/git-prompt.plugin.zsh +++ b/plugins/git-prompt/git-prompt.plugin.zsh @@ -1,24 +1,13 @@ # ZSH Git Prompt Plugin from: # http://github.com/olivierverdier/zsh-git-prompt -export __GIT_PROMPT_DIR=${0:A:h} +__GIT_PROMPT_DIR="${0:A:h}" -export GIT_PROMPT_EXECUTABLE=${GIT_PROMPT_USE_PYTHON:-"python"} +## Hook function definitions +function chpwd_update_git_vars() { + update_current_git_vars +} -# Initialize colors. -autoload -U colors -colors - -# Allow for functions in the prompt. -setopt PROMPT_SUBST - -autoload -U add-zsh-hook - -add-zsh-hook chpwd chpwd_update_git_vars -add-zsh-hook preexec preexec_update_git_vars -add-zsh-hook precmd precmd_update_git_vars - -## Function definitions function preexec_update_git_vars() { case "$2" in git*|hub*|gh*|stg*) @@ -34,64 +23,59 @@ function precmd_update_git_vars() { fi } -function chpwd_update_git_vars() { - update_current_git_vars -} +chpwd_functions+=(chpwd_update_git_vars) +precmd_functions+=(precmd_update_git_vars) +preexec_functions+=(preexec_update_git_vars) + +## Function definitions function update_current_git_vars() { unset __CURRENT_GIT_STATUS - if [[ "$GIT_PROMPT_EXECUTABLE" == "python" ]]; then - local gitstatus="$__GIT_PROMPT_DIR/gitstatus.py" - _GIT_STATUS=`python ${gitstatus} 2>/dev/null` - fi - if [[ "$GIT_PROMPT_EXECUTABLE" == "haskell" ]]; then - local gitstatus="$__GIT_PROMPT_DIR/dist/build/gitstatus/gitstatus" - _GIT_STATUS=`${gitstatus}` - fi + local gitstatus="$__GIT_PROMPT_DIR/gitstatus.py" + _GIT_STATUS=$(python ${gitstatus} 2>/dev/null) __CURRENT_GIT_STATUS=("${(@s: :)_GIT_STATUS}") - GIT_BRANCH=$__CURRENT_GIT_STATUS[1] - GIT_AHEAD=$__CURRENT_GIT_STATUS[2] - GIT_BEHIND=$__CURRENT_GIT_STATUS[3] - GIT_STAGED=$__CURRENT_GIT_STATUS[4] - GIT_CONFLICTS=$__CURRENT_GIT_STATUS[5] - GIT_CHANGED=$__CURRENT_GIT_STATUS[6] - GIT_UNTRACKED=$__CURRENT_GIT_STATUS[7] + GIT_BRANCH=$__CURRENT_GIT_STATUS[1] + GIT_AHEAD=$__CURRENT_GIT_STATUS[2] + GIT_BEHIND=$__CURRENT_GIT_STATUS[3] + GIT_STAGED=$__CURRENT_GIT_STATUS[4] + GIT_CONFLICTS=$__CURRENT_GIT_STATUS[5] + GIT_CHANGED=$__CURRENT_GIT_STATUS[6] + GIT_UNTRACKED=$__CURRENT_GIT_STATUS[7] } - git_super_status() { - precmd_update_git_vars + precmd_update_git_vars if [ -n "$__CURRENT_GIT_STATUS" ]; then - STATUS="$ZSH_THEME_GIT_PROMPT_PREFIX$ZSH_THEME_GIT_PROMPT_BRANCH$GIT_BRANCH%{${reset_color}%}" - if [ "$GIT_BEHIND" -ne "0" ]; then - STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_BEHIND$GIT_BEHIND%{${reset_color}%}" - fi - if [ "$GIT_AHEAD" -ne "0" ]; then - STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_AHEAD$GIT_AHEAD%{${reset_color}%}" - fi - STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_SEPARATOR" - if [ "$GIT_STAGED" -ne "0" ]; then - STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_STAGED$GIT_STAGED%{${reset_color}%}" - fi - if [ "$GIT_CONFLICTS" -ne "0" ]; then - STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_CONFLICTS$GIT_CONFLICTS%{${reset_color}%}" - fi - if [ "$GIT_CHANGED" -ne "0" ]; then - STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_CHANGED$GIT_CHANGED%{${reset_color}%}" - fi - if [ "$GIT_UNTRACKED" -ne "0" ]; then - STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED%{${reset_color}%}" - fi - if [ "$GIT_CHANGED" -eq "0" ] && [ "$GIT_CONFLICTS" -eq "0" ] && [ "$GIT_STAGED" -eq "0" ] && [ "$GIT_UNTRACKED" -eq "0" ]; then - STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_CLEAN" - fi - STATUS="$STATUS%{${reset_color}%}$ZSH_THEME_GIT_PROMPT_SUFFIX" - echo "$STATUS" - fi + STATUS="$ZSH_THEME_GIT_PROMPT_PREFIX$ZSH_THEME_GIT_PROMPT_BRANCH$GIT_BRANCH%{${reset_color}%}" + if [ "$GIT_BEHIND" -ne "0" ]; then + STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_BEHIND$GIT_BEHIND%{${reset_color}%}" + fi + if [ "$GIT_AHEAD" -ne "0" ]; then + STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_AHEAD$GIT_AHEAD%{${reset_color}%}" + fi + STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_SEPARATOR" + if [ "$GIT_STAGED" -ne "0" ]; then + STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_STAGED$GIT_STAGED%{${reset_color}%}" + fi + if [ "$GIT_CONFLICTS" -ne "0" ]; then + STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_CONFLICTS$GIT_CONFLICTS%{${reset_color}%}" + fi + if [ "$GIT_CHANGED" -ne "0" ]; then + STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_CHANGED$GIT_CHANGED%{${reset_color}%}" + fi + if [ "$GIT_UNTRACKED" -ne "0" ]; then + STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_UNTRACKED%{${reset_color}%}" + fi + if [ "$GIT_CHANGED" -eq "0" ] && [ "$GIT_CONFLICTS" -eq "0" ] && [ "$GIT_STAGED" -eq "0" ] && [ "$GIT_UNTRACKED" -eq "0" ]; then + STATUS="$STATUS$ZSH_THEME_GIT_PROMPT_CLEAN" + fi + STATUS="$STATUS%{${reset_color}%}$ZSH_THEME_GIT_PROMPT_SUFFIX" + echo "$STATUS" + fi } -# Default values for the appearance of the prompt. Configure at will. +# Default values for the appearance of the prompt. ZSH_THEME_GIT_PROMPT_PREFIX="(" ZSH_THEME_GIT_PROMPT_SUFFIX=")" ZSH_THEME_GIT_PROMPT_SEPARATOR="|" From 94007f7db2d47f3e13e4aac878f0e780a479f628 Mon Sep 17 00:00:00 2001 From: Kentaro Wada Date: Sun, 2 Aug 2015 08:50:56 +0900 Subject: [PATCH 111/183] git-prompt: collect all git status information by one cmd This commit uses the `git status --porcelain -b` format to gather the number of ahead and behind commits related to the remote branch. --- plugins/git-prompt/gitstatus.py | 61 +++++++++++++++------------------ 1 file changed, 28 insertions(+), 33 deletions(-) diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py index 903ad474..2f02e5fc 100644 --- a/plugins/git-prompt/gitstatus.py +++ b/plugins/git-prompt/gitstatus.py @@ -5,25 +5,40 @@ from __future__ import print_function prehash = ':' import sys -import subprocess from subprocess import Popen, PIPE -branch, error = Popen(['git', 'symbolic-ref', 'HEAD'], stdout=PIPE, stderr=PIPE).communicate() -if 'fatal: Not a git repository' in error.decode('utf-8'): - sys.exit(0) +# `git status --porcelain -b` can collect all information +# branch, remote_branch, untracked, staged, changed, conflicts, ahead, behind +po = Popen(['git', 'status', '--porcelain', '-b'], stdout=PIPE, stderr=PIPE) +stdout, sterr = po.communicate() +if po.returncode != 0: + sys.exit(0) # Not a git repository -branch = branch.decode("utf-8").strip()[11:] - -# Get git status (staged, change, conflicts and untracked) -try: - res = subprocess.check_output(['git', 'status', '--porcelain']) -except subprocess.CalledProcessError: - sys.exit(0) -status = [(st[0], st[1], st[2:]) for st in res.splitlines()] +# collect git status information untracked, staged, changed, conflicts = [], [], [], [] +ahead, behind = 0, 0 +status = [(line[0], line[1], line[2:]) for line in stdout.splitlines()] for st in status: - if st[0] == '?' and st[1] == '?': + if st[0] == '#' and st[1] == '#': + if len(st[2].strip().split('...')) == 1: + branch = st[2].strip() + else: + # current and remote branch info + branch, rest = st[2].strip().split('...') + if len(rest.split(' ')) == 1: + # remote_branch = rest.split(' ')[0] + pass + else: + # ahead or behind + divergence = ' '.join(rest.split(' ')[1:]) + divergence = divergence.lstrip('[').rstrip(']') + for div in divergence.split(', '): + if 'ahead' in div: + ahead = int(div[len('ahead '):].strip()) + elif 'behind' in div: + behind = int(div[len('behind '):].strip()) + elif st[0] == '?' and st[1] == '?': untracked.append(st) else: if st[1] == 'M': @@ -33,26 +48,6 @@ for st in status: elif st[0] != ' ': staged.append(st) -ahead, behind = 0,0 - -if not branch: # not on any branch - branch = prehash + Popen(['git','rev-parse','--short','HEAD'], stdout=PIPE).communicate()[0].decode("utf-8")[:-1] -else: - remote_name = Popen(['git','config','branch.%s.remote' % branch], stdout=PIPE).communicate()[0].decode("utf-8").strip() - if remote_name: - merge_name = Popen(['git','config','branch.%s.merge' % branch], stdout=PIPE).communicate()[0].decode("utf-8").strip() - if remote_name == '.': # local - remote_ref = merge_name - else: - remote_ref = 'refs/remotes/%s/%s' % (remote_name, merge_name[11:]) - revgit = Popen(['git', 'rev-list', '--left-right', '%s...HEAD' % remote_ref],stdout=PIPE, stderr=PIPE) - revlist = revgit.communicate()[0] - if revgit.poll(): # fallback to local - revlist = Popen(['git', 'rev-list', '--left-right', '%s...HEAD' % merge_name],stdout=PIPE, stderr=PIPE).communicate()[0] - behead = revlist.decode("utf-8").splitlines() - ahead = len([x for x in behead if x[0]=='>']) - behind = len(behead) - ahead - out = ' '.join([ branch, str(ahead), From 30bed07e9c9480d1e563d29da5747ce427f58d8d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Tue, 4 Aug 2015 16:34:03 +0200 Subject: [PATCH 112/183] Parse UTF-8 output from git status --- plugins/git-prompt/gitstatus.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py index 2f02e5fc..8790f3a3 100644 --- a/plugins/git-prompt/gitstatus.py +++ b/plugins/git-prompt/gitstatus.py @@ -18,7 +18,7 @@ if po.returncode != 0: # collect git status information untracked, staged, changed, conflicts = [], [], [], [] ahead, behind = 0, 0 -status = [(line[0], line[1], line[2:]) for line in stdout.splitlines()] +status = [(line[0], line[1], line[2:]) for line in stdout.decode('utf-8').splitlines()] for st in status: if st[0] == '#' and st[1] == '#': if len(st[2].strip().split('...')) == 1: @@ -58,4 +58,3 @@ out = ' '.join([ str(len(untracked)), ]) print(out, end='') - From 45473c3a81410735dac7fe0a1df33ad95fd3f2e5 Mon Sep 17 00:00:00 2001 From: Kentaro Wada Date: Tue, 11 Aug 2015 12:04:51 +0900 Subject: [PATCH 113/183] Fix for initial or detached status branch info --- plugins/git-prompt/gitstatus.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py index 8790f3a3..59feadc3 100644 --- a/plugins/git-prompt/gitstatus.py +++ b/plugins/git-prompt/gitstatus.py @@ -5,6 +5,8 @@ from __future__ import print_function prehash = ':' import sys +import re +import subprocess from subprocess import Popen, PIPE @@ -21,8 +23,13 @@ ahead, behind = 0, 0 status = [(line[0], line[1], line[2:]) for line in stdout.decode('utf-8').splitlines()] for st in status: if st[0] == '#' and st[1] == '#': - if len(st[2].strip().split('...')) == 1: + if re.search('Initial commit on', st[2]): + branch = st[2].split(' ')[-1] + elif len(st[2].strip().split('...')) == 1: branch = st[2].strip() + if branch == 'HEAD (no branch)': + cmd = ['git', 'log', '-1', '--format="%h"'] + branch = subprocess.check_output(cmd).strip().strip('"') else: # current and remote branch info branch, rest = st[2].strip().split('...') From 3c698743fa4265ab2b70b880e12f957792669438 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Tue, 11 Aug 2015 11:29:05 +0200 Subject: [PATCH 114/183] Clean up gitstatus.py --- plugins/git-prompt/gitstatus.py | 15 +++++---------- 1 file changed, 5 insertions(+), 10 deletions(-) diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py index 59feadc3..1beae541 100644 --- a/plugins/git-prompt/gitstatus.py +++ b/plugins/git-prompt/gitstatus.py @@ -1,18 +1,14 @@ #!/usr/bin/env python from __future__ import print_function -# change this symbol to whatever you prefer -prehash = ':' - import sys import re -import subprocess -from subprocess import Popen, PIPE +from subprocess import Popen, PIPE, check_output -# `git status --porcelain -b` can collect all information +# `git status --porcelain --branch` can collect all information # branch, remote_branch, untracked, staged, changed, conflicts, ahead, behind -po = Popen(['git', 'status', '--porcelain', '-b'], stdout=PIPE, stderr=PIPE) +po = Popen(['git', 'status', '--porcelain', '--branch'], stdout=PIPE, stderr=PIPE) stdout, sterr = po.communicate() if po.returncode != 0: sys.exit(0) # Not a git repository @@ -25,11 +21,10 @@ for st in status: if st[0] == '#' and st[1] == '#': if re.search('Initial commit on', st[2]): branch = st[2].split(' ')[-1] + elif re.search('no branch', st[2]): + branch = check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('utf-8').strip() elif len(st[2].strip().split('...')) == 1: branch = st[2].strip() - if branch == 'HEAD (no branch)': - cmd = ['git', 'log', '-1', '--format="%h"'] - branch = subprocess.check_output(cmd).strip().strip('"') else: # current and remote branch info branch, rest = st[2].strip().split('...') From be667a24b0dc6a42a3e5368727366449b09633d1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Mon, 17 Aug 2015 01:05:37 +0200 Subject: [PATCH 115/183] Remove obsolete comment --- plugins/emoji/emoji.plugin.zsh | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/emoji/emoji.plugin.zsh b/plugins/emoji/emoji.plugin.zsh index f2d169bf..7876f1c8 100644 --- a/plugins/emoji/emoji.plugin.zsh +++ b/plugins/emoji/emoji.plugin.zsh @@ -76,8 +76,6 @@ emoji_skintone[6]=$'\U1F3FF' # 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 From 3f83331c71b9dd8b1065c4e7a58223cd7d5be421 Mon Sep 17 00:00:00 2001 From: Mohnish Jadwani Date: Mon, 17 Aug 2015 06:23:58 +0530 Subject: [PATCH 116/183] removes a trailing white space --- 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 097578e2..c4ad595e 100644 --- a/plugins/rails/rails.plugin.zsh +++ b/plugins/rails/rails.plugin.zsh @@ -58,7 +58,7 @@ alias rdmtc='rake db:migrate db:test:clone' alias rlc='rake log:clear' alias rn='rake notes' alias rr='rake routes' -alias rrg='rake routes | grep ' +alias rrg='rake routes | grep' # legacy stuff alias sstat='thin --stats "/thin/stats" start' From c66c3aef8126bf943b2746afb6a9c2a536990db5 Mon Sep 17 00:00:00 2001 From: Fice-T Date: Sun, 16 Aug 2015 22:36:32 -0600 Subject: [PATCH 117/183] Fix graphical bug in cypher theme when return status is non-zero - When the previous command's return status is non-zero and the prompt is redrawn, graphical errors sometimes arise due to the fg{red} not being escaped. --- themes/cypher.zsh-theme | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/themes/cypher.zsh-theme b/themes/cypher.zsh-theme index 45df53d2..6e6b78ee 100644 --- a/themes/cypher.zsh-theme +++ b/themes/cypher.zsh-theme @@ -1,4 +1,4 @@ # Based on evan's prompt # Shows the exit status of the last command if non-zero # Uses "#" instead of "»" when running with elevated privileges -PROMPT="%m %{${fg_bold[red]}%}:: %{${fg[green]}%}%3~%(0?. . ${fg[red]}%? )%{${fg[blue]}%}»%{${reset_color}%} " +PROMPT="%m %{${fg_bold[red]}%}:: %{${fg[green]}%}%3~%(0?. . %{${fg[red]}%}%? )%{${fg[blue]}%}»%{${reset_color}%} " From c4ba3065a1e9beb76f2f0ac64f3436b5448576b2 Mon Sep 17 00:00:00 2001 From: Kentaro Wada Date: Mon, 17 Aug 2015 18:22:27 +0900 Subject: [PATCH 118/183] Show tag name when detached status if possible --- plugins/git-prompt/gitstatus.py | 26 ++++++++++++++++++++++++-- 1 file changed, 24 insertions(+), 2 deletions(-) diff --git a/plugins/git-prompt/gitstatus.py b/plugins/git-prompt/gitstatus.py index 1beae541..a8eb8284 100644 --- a/plugins/git-prompt/gitstatus.py +++ b/plugins/git-prompt/gitstatus.py @@ -3,9 +3,31 @@ from __future__ import print_function import sys import re +import shlex from subprocess import Popen, PIPE, check_output +def get_tagname_or_hash(): + """return tagname if exists else hash""" + cmd = 'git log -1 --format="%h%d"' + output = check_output(shlex.split(cmd)).decode('utf-8').strip() + hash_, tagname = None, None + # get hash + m = re.search('\(.*\)$', output) + if m: + hash_ = output[:m.start()-1] + # get tagname + m = re.search('tag: .*[,\)]', output) + if m: + tagname = 'tags/' + output[m.start()+len('tag: '): m.end()-1] + + if tagname: + return tagname + elif hash_: + return hash_ + return None + + # `git status --porcelain --branch` can collect all information # branch, remote_branch, untracked, staged, changed, conflicts, ahead, behind po = Popen(['git', 'status', '--porcelain', '--branch'], stdout=PIPE, stderr=PIPE) @@ -21,8 +43,8 @@ for st in status: if st[0] == '#' and st[1] == '#': if re.search('Initial commit on', st[2]): branch = st[2].split(' ')[-1] - elif re.search('no branch', st[2]): - branch = check_output(['git', 'rev-parse', '--short', 'HEAD']).decode('utf-8').strip() + elif re.search('no branch', st[2]): # detached status + branch = get_tagname_or_hash() elif len(st[2].strip().split('...')) == 1: branch = st[2].strip() else: From 96c34cebae5da3a52e7da0d61188c1f9822a9c2e Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Sun, 9 Aug 2015 16:37:12 -0400 Subject: [PATCH 119/183] Add a deprecation comment. --- lib/functions.zsh | 2 -- plugins/terminalapp/terminalapp.plugin.zsh | 6 ++++++ 2 files changed, 6 insertions(+), 2 deletions(-) create mode 100644 plugins/terminalapp/terminalapp.plugin.zsh diff --git a/lib/functions.zsh b/lib/functions.zsh index 5c1a5a28..2a962669 100644 --- a/lib/functions.zsh +++ b/lib/functions.zsh @@ -176,7 +176,6 @@ function omz_urldecode { emulate -L zsh local encoded_url=$1 - echo -e input $1 # Work bytewise, since URLs escape UTF-8 octets local caller_encoding=$langinfo[CODESET] local LC_ALL=C @@ -188,7 +187,6 @@ function omz_urldecode { tmp=${tmp:gs/\\/\\\\/} # Handle %-escapes by turning them into `\xXX` printf escapes tmp=${tmp:gs/%/\\x/} - echo -E "before decode $tmp" local decoded eval "decoded=\$'$tmp'" diff --git a/plugins/terminalapp/terminalapp.plugin.zsh b/plugins/terminalapp/terminalapp.plugin.zsh new file mode 100644 index 00000000..7c0c278b --- /dev/null +++ b/plugins/terminalapp/terminalapp.plugin.zsh @@ -0,0 +1,6 @@ +# This file is intentionally empty. +# +# The terminalapp plugin is deprecated and may be removed in a future release. +# Its functionality has been folded in to the core lib/termsupport.zsh, which +# is loaded for all users. You can remove terminalapp from your $plugins list +# once all your systems are updated to the current version of Oh My Zsh. From 47d19cc56425aa7c550d845726111ee8bd9520d1 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Mon, 17 Aug 2015 20:55:41 -0400 Subject: [PATCH 120/183] Add defensive `emulate -L zsh` to termsupport functions --- lib/termsupport.zsh | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/lib/termsupport.zsh b/lib/termsupport.zsh index 726cdce4..ff61d532 100644 --- a/lib/termsupport.zsh +++ b/lib/termsupport.zsh @@ -7,6 +7,7 @@ # (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 [[ "$EMACS" == *term* ]] && return # if $2 is unset use $1 as default @@ -26,6 +27,7 @@ ZSH_THEME_TERM_TITLE_IDLE="%n@%m: %~" # Runs before showing the prompt function omz_termsupport_precmd { + emulate -L zsh if [[ $DISABLE_AUTO_TITLE == true ]]; then return fi @@ -35,11 +37,11 @@ function omz_termsupport_precmd { # Runs before executing the command function omz_termsupport_preexec { + emulate -L zsh if [[ $DISABLE_AUTO_TITLE == true ]]; then return fi - emulate -L zsh setopt extended_glob # cmd name only, or if this is sudo or ssh, the next cmd @@ -61,6 +63,7 @@ if [[ "$TERM_PROGRAM" == "Apple_Terminal" ]] && [[ -z "$INSIDE_EMACS" ]]; then # Emits the control sequence to notify Terminal.app of the cwd function update_terminalapp_cwd() { + emulate -L zsh # Identify the directory using a "file:" scheme URL, including # the host name to disambiguate local vs. remote paths. From 7cf892ecaa86f064aa3f78b9d5bee3b7db208ca4 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Tue, 18 Aug 2015 04:46:52 -0400 Subject: [PATCH 121/183] Add dashboard support and default-action configuration. Some refactoring. --- plugins/jira/jira.plugin.zsh | 118 ++++++++++++++++++++--------------- 1 file changed, 66 insertions(+), 52 deletions(-) diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index 842dff5c..a10feec3 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -1,61 +1,88 @@ -# To use: add a .jira-url file in the base of your project -# You can also set JIRA_URL in your .zshrc or put .jira-url in your home directory -# .jira-url in the current directory takes precedence. The same goes with .jira-prefix -# and JIRA_PREFIX. +# CLI support for JIRA interaction # -# If you use Rapid Board, set: -#JIRA_RAPID_BOARD="true" -# in you .zshrc +# Setup: +# Add a .jira-url file in the base of your project +# You can also set $JIRA_URL in your .zshrc or put .jira-url in your home directory +# A .jira-url in the current directory takes precedence. +# The same goes with .jira-prefix and $JIRA_PREFIX. # -# Setup: cd to/my/project -# echo "https://name.jira.com" >> .jira-url -# Usage: jira # opens a new issue -# jira ABC-123 # Opens an existing issue -open_jira_issue () { - if [ -f .jira-url ]; then +# For example: +# cd to/my/project +# echo "https://name.jira.com" >> .jira-url +# +# Variables: +# $JIRA_RAPID_BOARD - set to "true" if you use Rapid Board +# $JIRA_DEFAULT_ACTION - action to do when `jira` is called witn no args +# defaults to "new" +# $JIRA_NAME - Your JIRA username. Used as default for assigned/reported +# $JIRA_PREFIX - Prefix added to issue ID arguments +# +# +# Usage: +# jira # Performs the default action +# jira new # opens a new issue +# jira reported [username] +# jira assigned [username] +# jira dashboard +# jira ABC-123 # Opens an existing issue +# jira ABC-123 m # Opens an existing issue for adding a comment + +: ${JIRA_DEFAULT_ACTION:=new} + +function jira() { + local action=${1:=$JIRA_DEFAULT_ACTION} + + local jira_url jira_prefix + if [[ -f .jira-url ]]; then jira_url=$(cat .jira-url) - elif [ -f ~/.jira-url ]; then + elif [[ -f ~/.jira-url ]]; then jira_url=$(cat ~/.jira-url) - elif [[ "${JIRA_URL}" != "" ]]; then + elif [[ -n "${JIRA_URL}" ]]; then jira_url=${JIRA_URL} else jira_url_help return 1 fi - local jira_prefix - if [ -f .jira-prefix ]; then + if [[ -f .jira-prefix ]]; then jira_prefix=$(cat .jira-prefix) - elif [ -f ~/.jira-prefix ]; then + elif [[ -f ~/.jira-prefix ]]; then jira_prefix=$(cat ~/.jira-prefix) - elif [[ "${JIRA_PREFIX}" != "" ]]; then + elif [[ -n "${JIRA_PREFIX}" ]]; then jira_prefix=${JIRA_PREFIX} else jira_prefix="" fi - if [ -z "$1" ]; then + + if [[ $action == "new" ]]; then echo "Opening new issue" open_command "${jira_url}/secure/CreateIssue!default.jspa" - elif [[ "$1" = "assigned" || "$1" = "reported" ]]; then + elif [[ "$action" == "assigned" || "$action" == "reported" ]]; then jira_query $@ + elif [[ "$action" == "dashboard" ]]; then + echo "Opening dashboard" + open_command "${jira_url}/secure/Dashboard.jspa" else - local addcomment='' + # Anything that doesn't match a special action is considered an issue name + local issue_arg=$action + local issue="${jira_prefix}${issue_arg}" + local url_fragment='' if [[ "$2" == "m" ]]; then - addcomment="#add-comment" - echo "Add comment to issue #$1" + url_fragment="#add-comment" + echo "Add comment to issue #$issue" else - echo "Opening issue #$1" + echo "Opening issue #$issue" fi if [[ "$JIRA_RAPID_BOARD" == "true" ]]; then - open_command "${jira_url}/issues/${jira_prefix}${1}${addcomment}" + open_command "${jira_url}/issues/${issue}${url_fragment}" else - open_command "${jira_url}/browse/${jira_prefix}${1}${addcomment}" + open_command "${jira_url}/browse/${issue}${url_fragment}" fi fi } -jira_url_help() { +function jira_url_help() { cat << EOF JIRA url is not specified anywhere. Valid options, in order of precedence: @@ -65,40 +92,27 @@ Valid options, in order of precedence: EOF } -jira_name () { - if [[ -z "$1" ]]; then - if [[ "${JIRA_NAME}" != "" ]]; then - jira_name=${JIRA_NAME} - else - echo "JIRA_NAME not specified" - return 1 - fi - else - jira_name=$@ - fi -} - -jira_query () { +function jira_query() { local verb="$1" - local jira_name lookup preposition - if [[ "${verb}" = "reported" ]]; then + local jira_name lookup preposition query + if [[ "${verb}" == "reported" ]]; then lookup=reporter preposition=by - elif [[ "${verb}" = "assigned" ]]; then + elif [[ "${verb}" == "assigned" ]]; then lookup=assignee preposition=to else - echo "not a valid lookup $verb" + echo "not a valid lookup: $verb" >&2 return 1 fi - shift 1 - jira_name $@ - if [[ $? = 1 ]]; then + jira_name=${2:=$JIRA_NAME} + if [[ -z $jira_name ]]; then + echo "JIRA_NAME not specified" >&2 return 1 fi + echo "Browsing issues ${verb} ${preposition} ${jira_name}" - 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" + query="${lookup}+%3D+%22${jira_name}%22+AND+resolution+%3D+unresolved+ORDER+BY+priority+DESC%2C+created+ASC" + open_command "${jira_url}/secure/IssueNavigator.jspa?reset=true&jqlQuery=${query}" } -alias jira='open_jira_issue' - From dc42e8d488d7b7b5285e71947940c7d6fb19355b Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Tue, 18 Aug 2015 05:05:54 -0400 Subject: [PATCH 122/183] jira: add completion --- plugins/jira/_jira | 21 +++++++++++++++++++++ plugins/jira/jira.plugin.zsh | 8 ++++---- 2 files changed, 25 insertions(+), 4 deletions(-) create mode 100644 plugins/jira/_jira diff --git a/plugins/jira/_jira b/plugins/jira/_jira new file mode 100644 index 00000000..b0ea658e --- /dev/null +++ b/plugins/jira/_jira @@ -0,0 +1,21 @@ +#compdef jira +#autoload + +local -a _1st_arguments +_1st_arguments=( + 'new:create a new issue' + 'dashboard:open the dashboard' + 'reported:search for issues reported by a user' + 'assigned:search for issues assigned to a user' +) + +_arguments -C \ + ':command:->command' \ + '*::options:->options' + +case $state in + (command) + _describe -t commands "jira subcommand" _1st_arguments + return + ;; +esac diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index a10feec3..89559767 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -40,7 +40,7 @@ function jira() { elif [[ -n "${JIRA_URL}" ]]; then jira_url=${JIRA_URL} else - jira_url_help + _jira_url_help return 1 fi @@ -59,7 +59,7 @@ function jira() { echo "Opening new issue" open_command "${jira_url}/secure/CreateIssue!default.jspa" elif [[ "$action" == "assigned" || "$action" == "reported" ]]; then - jira_query $@ + _jira_query $@ elif [[ "$action" == "dashboard" ]]; then echo "Opening dashboard" open_command "${jira_url}/secure/Dashboard.jspa" @@ -82,7 +82,7 @@ function jira() { fi } -function jira_url_help() { +function _jira_url_help() { cat << EOF JIRA url is not specified anywhere. Valid options, in order of precedence: @@ -92,7 +92,7 @@ Valid options, in order of precedence: EOF } -function jira_query() { +function _jira_query() { local verb="$1" local jira_name lookup preposition query if [[ "${verb}" == "reported" ]]; then From a9daea17d89ae2b7d30dc6e184566ca8104e63d2 Mon Sep 17 00:00:00 2001 From: fgibaux Date: Tue, 18 Aug 2015 14:19:40 +0200 Subject: [PATCH 123/183] plugin symfony2 sf2.7 compatibility fix with symfony 2.7 command group titles are listed as commands. this commit prevents it. --- 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 e94280ed..98a2321d 100644 --- a/plugins/symfony2/symfony2.plugin.zsh +++ b/plugins/symfony2/symfony2.plugin.zsh @@ -5,7 +5,7 @@ _symfony_console () { } _symfony2_get_command_list () { - `_symfony_console` --no-ansi | sed "1,/Available commands/d" | awk '/^ ?[a-z]+/ { print $1 }' + `_symfony_console` --no-ansi | sed "1,/Available commands/d" | awk '/^ ?[^ ]+ / { print $1 }' } _symfony2 () { From 7c31c7a96391e80bdd6ebdb6579751f4d44d6ac4 Mon Sep 17 00:00:00 2001 From: Tim O'Brien Date: Wed, 19 Aug 2015 22:33:41 -0700 Subject: [PATCH 124/183] Bring bgnotify plugin up to date with t413/zsh-background-notify Changes include: - time format now shows h/m/s (only when needed!) - adds hooks only for interactive connections - adds specific kde support (via kdialog) - adds click-action for OS X terminals --- plugins/bgnotify/bgnotify.plugin.zsh | 36 ++++++++++++++++++---------- 1 file changed, 23 insertions(+), 13 deletions(-) diff --git a/plugins/bgnotify/bgnotify.plugin.zsh b/plugins/bgnotify/bgnotify.plugin.zsh index b70b42f9..f6dd3886 100755 --- a/plugins/bgnotify/bgnotify.plugin.zsh +++ b/plugins/bgnotify/bgnotify.plugin.zsh @@ -11,31 +11,38 @@ autoload -Uz add-zsh-hook || { print "can't add zsh hook!"; return } ## definitions ## -if ! (type bgnotify_formatted | grep -q 'function'); then - function bgnotify_formatted { - ## exit_status, command, elapsed_time - [ $1 -eq 0 ] && title="#win (took $3 s)" || title="#fail (took $3 s)" - bgnotify "$title" "$2" +if ! (type bgnotify_formatted | grep -q 'function'); then ## allow custom function override + function bgnotify_formatted { ## args: (exit_status, command, elapsed_seconds) + elapsed="$(( $3 % 60 ))s" + (( $3 >= 60 )) && elapsed="$((( $3 % 3600) / 60 ))m $elapsed" + (( $3 >= 3600 )) && elapsed="$(( $3 / 3600 ))h $elapsed" + [ $1 -eq 0 ] && bgnotify "#win (took $elapsed)" "$2" || bgnotify "#fail (took $elapsed)" "$2" } fi currentWindowId () { if hash osascript 2>/dev/null; then #osx osascript -e 'tell application (path to frontmost application as text) to id of front window' 2&> /dev/null || echo "0" - elif hash notify-send 2>/dev/null; then #ubuntu! - xprop -root | awk '/NET_ACTIVE_WINDOW/ { print $5; exit }' + elif (hash notify-send 2>/dev/null || hash kdialog 2>/dev/null); then #ubuntu! + xprop -root 2> /dev/null | awk '/NET_ACTIVE_WINDOW/{print $5;exit} END{exit !$5}' || echo "0" else echo $EPOCHSECONDS #fallback for windows fi } -bgnotify () { +bgnotify () { ## args: (title, subtitle) if hash terminal-notifier 2>/dev/null; then #osx - terminal-notifier -message "$2" -title "$1" + [[ "$TERM_PROGRAM" == 'iTerm.app' ]] && term_id='com.googlecode.iterm2' || + [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]] && term_id='com.apple.terminal'; + ## now call terminal-notifier, (hopefully with $term_id!) + [ -z "$term_id" ] && terminal-notifier -message "$2" -title "$1" >/dev/null || + terminal-notifier -message "$2" -title "$1" -activate "$term_id" -sender "$term_id" >/dev/null elif hash growlnotify 2>/dev/null; then #osx growl growlnotify -m "$1" "$2" - elif hash notify-send 2>/dev/null; then #ubuntu! + elif hash notify-send 2>/dev/null; then #ubuntu gnome! notify-send "$1" "$2" + elif hash kdialog 2>/dev/null; then #ubuntu kde! + kdialog -title "$1" --passivepopup "$2" 5 elif hash notifu 2>/dev/null; then #cygwyn support! notifu /m "$2" /p "$1" fi @@ -46,7 +53,7 @@ bgnotify () { bgnotify_begin() { bgnotify_timestamp=$EPOCHSECONDS - bgnotify_lastcmd=$1 + bgnotify_lastcmd="$1" bgnotify_windowid=$(currentWindowId) } @@ -63,5 +70,8 @@ bgnotify_end() { bgnotify_timestamp=0 #reset it to 0! } -add-zsh-hook preexec bgnotify_begin -add-zsh-hook precmd bgnotify_end +## only enable if a local (non-ssh) connection +if [ -z "$SSH_CLIENT" ] && [ -z "$SSH_TTY" ]; then + add-zsh-hook preexec bgnotify_begin + add-zsh-hook precmd bgnotify_end +fi From 1aeebf60a0dd09ba13a08ae0b81d1d44cad7d15c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=AB=A0=E6=AD=A3=E4=B8=AD?= Date: Fri, 21 Aug 2015 14:28:03 +0800 Subject: [PATCH 125/183] Update link --- plugins/vundle/vundle.plugin.zsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/vundle/vundle.plugin.zsh b/plugins/vundle/vundle.plugin.zsh index fa191147..0f071597 100644 --- a/plugins/vundle/vundle.plugin.zsh +++ b/plugins/vundle/vundle.plugin.zsh @@ -1,13 +1,13 @@ function vundle-init () { - if [ ! -d ~/.vim/bundle/vundle/ ] + if [ ! -d ~/.vim/bundle/Vundle.vim/ ] then - mkdir -p ~/.vim/bundle/vundle/ + mkdir -p ~/.vim/bundle/Vundle.vim/ fi - if [ ! -d ~/.vim/bundle/vundle/.git ] && [ ! -f ~/.vim/bundle/vundle/.git ] + if [ ! -d ~/.vim/bundle/Vundle.vim/.git ] && [ ! -f ~/.vim/bundle/Vundle.vim/.git ] then - git clone http://github.com/gmarik/vundle.git ~/.vim/bundle/vundle - echo "\n\tRead about vim configuration for vundle at https://github.com/gmarik/vundle\n" + git clone git://github.com/VundleVim/Vundle.vim.git ~/.vim/bundle/Vundle.vim + echo "\n\tRead about vim configuration for vundle at https://github.com/VundleVim/Vundle.vim\n" fi } From aaf5c8f43f6eee141b9ea4b85b4e1097db4a1770 Mon Sep 17 00:00:00 2001 From: Philippe Loctaux Date: Fri, 21 Aug 2015 16:05:54 +0200 Subject: [PATCH 126/183] added apt-get autoremove in ubuntu plugin I use that command a lot of times, and there's no shortcut for that. Now it does :) --- plugins/ubuntu/ubuntu.plugin.zsh | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/ubuntu/ubuntu.plugin.zsh b/plugins/ubuntu/ubuntu.plugin.zsh index 0211d337..a1a5016c 100644 --- a/plugins/ubuntu/ubuntu.plugin.zsh +++ b/plugins/ubuntu/ubuntu.plugin.zsh @@ -3,6 +3,7 @@ # https://github.com/dbb # https://github.com/Mappleconfusers # Nicolas Jonas nextgenthemes.com +# https://github.com/loctauxphilippe # # Debian, Ubuntu and friends related zsh aliases and functions for zsh @@ -38,6 +39,7 @@ alias agu='sudo apt-get update' # ad alias agud='sudo apt-get update && sudo apt-get dist-upgrade' #adu alias agug='sudo apt-get upgrade' # ag alias aguu='sudo apt-get update && sudo apt-get upgrade' #adg +alias agar='sudo apt-get autoremove' compdef _ag ag='sudo apt-get' compdef _aga aga='sudo apt-get autoclean' @@ -51,6 +53,7 @@ compdef _agu agu='sudo apt-get update' compdef _agud agud='sudo apt-get update && sudo apt-get dist-upgrade' compdef _agug agug='sudo apt-get upgrade' compdef _aguu aguu='sudo apt-get update && sudo apt-get upgrade' +compdef _agar agar='sudo apt-get autoremove' # Remove ALL kernel images and headers EXCEPT the one in use alias kclean='sudo aptitude remove -P ?and(~i~nlinux-(ima|hea) \ From 76f4871d4e65a8d114055c765ed026ebadd5079d Mon Sep 17 00:00:00 2001 From: Dawid Ferenczy Date: Tue, 25 Aug 2015 18:07:47 +0200 Subject: [PATCH 127/183] Added missing commands to Vagrant plugin, updated commands description --- plugins/vagrant/_vagrant | 36 ++++++++++++++++++++++-------------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/plugins/vagrant/_vagrant b/plugins/vagrant/_vagrant index 76f80b0d..764f8954 100644 --- a/plugins/vagrant/_vagrant +++ b/plugins/vagrant/_vagrant @@ -1,4 +1,4 @@ -#compdef vagrant +#compdef vagrant #autoload # vagrant zsh completion @@ -6,37 +6,45 @@ local -a _1st_arguments _1st_arguments=( 'box:Box commands' - 'connect:Connects to a shared, remote Vagrant environment' + 'connect:Connects to a remotely shared Vagrant environment' 'destroy:Destroys the vagrant environment' - 'docker-logs:Shows Docker logs' - 'docker-run:Run one-off commands against a Docker container' + 'docker-logs:Outputs the logs from the Docker container' + 'docker-run:Run a one-off command in the context of a container' 'global-status:Reports the status of all active Vagrant environments on the system' 'halt:Halts the currently running vagrant environment' + 'help:Shows the help for a subcommand' 'init:[box_name] [box_url] Initializes current folder for Vagrant usage' + 'list-commands:Outputs all available Vagrant subcommands, even non-primary ones' 'login:Authenticates against a Vagrant Cloud server to access protected boxes' 'package:Packages a vagrant environment for distribution' 'plugin:Plugin commands' 'provision:Run the provisioner' + 'push:Deploys code in this environment to a configured destination' + 'rdp:Connects to machine via RDP' 'reload:Reload the vagrant environment' 'resume:Resumes a suspend vagrant environment' - 'share:Shares the Vagrant environment and allows remote access' + 'rsync:Syncs rsync synced folders to remote machine' + 'rsync-auto:Syncs rsync synced folders automatically when files change' + 'share:Shares your Vagrant environment with anyone in the world' 'ssh:SSH into the currently running environment' - 'ssh-config:outputs .ssh/config valid syntax for connecting to this environment via ssh' + 'ssh-config:Outputs .ssh/config valid syntax for connecting to this environment via ssh' 'status:Shows the status of the current Vagrant environment' 'suspend:Suspends the currently running vagrant environment' 'up:Creates the vagrant environment' - 'version:Prints the currently installed Vagrant version and checks for new updates' + 'version:Prints current and latest Vagrant version' '--help:[TASK] Describe available tasks or one specific task' '--version:Prints the Vagrant version information' ) local -a _box_arguments _box_arguments=( - 'add:NAME URI Add a box to the system' - 'help:COMMAND Describe subcommands or one specific subcommand' + 'add:ADDRESS Adds a box to the system' + 'help:COMMAND List subcommands' 'list:Lists all installed boxes' - 'remove:NAME Remove a box from the system' - 'repackage:NAME Repackage an installed box into a `.box` file.' + 'outdated:Checks if a box has newer version' + 'remove:NAME Removes a box from the system' + 'repackage:NAME PROVIDER VERSION Repackages an installed box into a `.box` file' + 'update:Updates box to a newer version, if available' ) __task_list () @@ -78,7 +86,7 @@ __vagrant-box () (options) case $line[1] in (repackage|remove) - _arguments ':feature:__box_list' + _arguments ':feature:__box_list' ;; esac ;; @@ -107,14 +115,14 @@ case $state in (options) case $line[1] in (help) - _arguments ':feature:__task_list' + _arguments ':feature:__task_list' ;; (box) __vagrant-box ;; (up|provision|package|destroy|reload|ssh|ssh-config|halt|resume|status) - _arguments ':feature:__vm_list' + _arguments ':feature:__vm_list' esac ;; esac From 1bf5c587a5183f111538bf0879fbc75892988b8e Mon Sep 17 00:00:00 2001 From: Hans Chen Date: Tue, 25 Aug 2015 17:05:28 -0400 Subject: [PATCH 128/183] Update autojump plugin for latest brew installation --- plugins/autojump/autojump.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/autojump/autojump.plugin.zsh b/plugins/autojump/autojump.plugin.zsh index 4cf03640..c05c699e 100644 --- a/plugins/autojump/autojump.plugin.zsh +++ b/plugins/autojump/autojump.plugin.zsh @@ -15,7 +15,7 @@ if [ $commands[autojump] ]; then # check if autojump is installed . /usr/local/share/autojump/autojump.zsh elif [ -f /opt/local/etc/profile.d/autojump.zsh ]; then # mac os x with ports . /opt/local/etc/profile.d/autojump.zsh - elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump.zsh ]; then # mac os x with brew - . `brew --prefix`/etc/autojump.zsh + elif [ $commands[brew] -a -f `brew --prefix`/etc/autojump.sh ]; then # mac os x with brew + . `brew --prefix`/etc/autojump.sh fi fi From 8ab1b6d0fd94d150735d170bb246bccd563937ad Mon Sep 17 00:00:00 2001 From: "G. Kay Lee" Date: Wed, 26 Aug 2015 12:04:28 +0800 Subject: [PATCH 129/183] Update README.markdown Fix typo --- README.markdown | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.markdown b/README.markdown index d4d3fdba..183e6774 100644 --- a/README.markdown +++ b/README.markdown @@ -65,7 +65,7 @@ Once you find a theme that you want to use, you will need to edit the `~/.zshrc` ZSH_THEME="robbyrussell" ``` -To use a different theme, simple change the value to match the name of your desired theme. For example: +To use a different theme, simply change the value to match the name of your desired theme. For example: ```shell ZSH_THEME="agnoster" # (this is one of the fancy ones) From a127c4f88e9807c9d5ac58f5424dfc479370c227 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Maggioni?= Date: Wed, 26 Aug 2015 10:48:01 +0200 Subject: [PATCH 130/183] 'ip' command compatibility and much quicker external IP detection --- plugins/systemadmin/systemadmin.plugin.zsh | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/systemadmin/systemadmin.plugin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh index 4ae70dfa..f6641b27 100644 --- a/plugins/systemadmin/systemadmin.plugin.zsh +++ b/plugins/systemadmin/systemadmin.plugin.zsh @@ -140,12 +140,16 @@ d0() { # gather external ip address geteip() { - curl http://ifconfig.me + echo "$(curl -s -S http://ipecho.net/plain)" } # determine local IP address getip() { - ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}' + if [ "$(which ip)" != "" ]; then + ip addr | grep "inet " | grep -v '127.0.0.1' | awk '{print $2}' + else + ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}' + fi } # Clear zombie processes From 058bbe4f02be67102871d82de6aa194e6b865cf8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Maggioni?= Date: Wed, 26 Aug 2015 10:54:08 +0200 Subject: [PATCH 131/183] General compatibility --- plugins/systemadmin/systemadmin.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/systemadmin/systemadmin.plugin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh index f6641b27..5618ba8f 100644 --- a/plugins/systemadmin/systemadmin.plugin.zsh +++ b/plugins/systemadmin/systemadmin.plugin.zsh @@ -145,7 +145,7 @@ geteip() { # determine local IP address getip() { - if [ "$(which ip)" != "" ]; then + if [ $(hash | grep '^ip=') ]; then ip addr | grep "inet " | grep -v '127.0.0.1' | awk '{print $2}' else ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}' From 241be2d28b41293f163c4be75bb122975c2eacd9 Mon Sep 17 00:00:00 2001 From: Robin Daugherty Date: Wed, 26 Aug 2015 13:24:59 -0400 Subject: [PATCH 132/183] Fix rand-quote failure when site is unreachable This plugin was designed so that if there is any failure, it will simply call itself recursively. Which means that if you were working offline, if `quote` was called in your `.zshrc`, you would be unable to open a new terminal session. I fixed this by allowing the plugin to output nothing if a quote could not be fetched. --- plugins/rand-quote/rand-quote.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/rand-quote/rand-quote.plugin.zsh b/plugins/rand-quote/rand-quote.plugin.zsh index c3bf6234..3c9722a7 100644 --- a/plugins/rand-quote/rand-quote.plugin.zsh +++ b/plugins/rand-quote/rand-quote.plugin.zsh @@ -18,8 +18,8 @@ if [[ -x `which curl` ]]; then W=$(echo "$Q" | sed -e 's/.*\/quotes\///g' -e 's/<.*//g' -e 's/.*">//g') if [ "$W" -a "$TXT" ]; then echo "${WHO_COLOR}${W}${COLON_COLOR}: ${TEXT_COLOR}“${TXT}”${END_COLOR}" - else - quote + # else + # quote fi } #quote From 96aefd2b98e5a646573a0ad6394f6ca0276facf1 Mon Sep 17 00:00:00 2001 From: Robin Daugherty Date: Wed, 26 Aug 2015 14:12:38 -0400 Subject: [PATCH 133/183] Remove code, not comment it out Gaaah. --- plugins/rand-quote/rand-quote.plugin.zsh | 2 -- 1 file changed, 2 deletions(-) diff --git a/plugins/rand-quote/rand-quote.plugin.zsh b/plugins/rand-quote/rand-quote.plugin.zsh index 3c9722a7..8f345d9a 100644 --- a/plugins/rand-quote/rand-quote.plugin.zsh +++ b/plugins/rand-quote/rand-quote.plugin.zsh @@ -18,8 +18,6 @@ if [[ -x `which curl` ]]; then W=$(echo "$Q" | sed -e 's/.*\/quotes\///g' -e 's/<.*//g' -e 's/.*">//g') if [ "$W" -a "$TXT" ]; then echo "${WHO_COLOR}${W}${COLON_COLOR}: ${TEXT_COLOR}“${TXT}”${END_COLOR}" - # else - # quote fi } #quote From d923cebdb34c373597d6f11a0e57e4b73f9f53f4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niccol=C3=B2=20Maggioni?= Date: Thu, 27 Aug 2015 11:34:53 +0200 Subject: [PATCH 134/183] Updated with @mcornella suggestions --- plugins/systemadmin/systemadmin.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/systemadmin/systemadmin.plugin.zsh b/plugins/systemadmin/systemadmin.plugin.zsh index 5618ba8f..8c263335 100644 --- a/plugins/systemadmin/systemadmin.plugin.zsh +++ b/plugins/systemadmin/systemadmin.plugin.zsh @@ -140,12 +140,12 @@ d0() { # gather external ip address geteip() { - echo "$(curl -s -S http://ipecho.net/plain)" + curl -s -S https://icanhazip.com } # determine local IP address getip() { - if [ $(hash | grep '^ip=') ]; then + if (( ${+commands[ip]} )); then ip addr | grep "inet " | grep -v '127.0.0.1' | awk '{print $2}' else ifconfig | grep 'inet addr:'| grep -v '127.0.0.1' | cut -d: -f2 | awk '{ print $1}' From fe92ea98e0633784508e85d6b756b1c3f667b2a4 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Tue, 18 Aug 2015 03:01:21 -0400 Subject: [PATCH 135/183] installer: switch twitter link to https --- tools/install.sh | 4 ++-- tools/upgrade.sh | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/tools/install.sh b/tools/install.sh index 8ff1219b..beec750c 100755 --- a/tools/install.sh +++ b/tools/install.sh @@ -4,7 +4,7 @@ set -e # supports them. ncolors=$(tput colors) if [ -t 1 ] && [ -n "$ncolors" ] && [ "$ncolors" -ge 8 ]; then - RED=="$(tput setaf 1)" + RED="$(tput setaf 1)" GREEN="$(tput setaf 2)" YELLOW="$(tput setaf 3)" BLUE="$(tput setaf 4)" @@ -70,7 +70,7 @@ echo '' echo '' echo 'Please look over the ~/.zshrc file to select plugins, themes, and options.' echo '' -echo 'p.s. Follow us at http://twitter.com/ohmyzsh.' +echo 'p.s. Follow us at https://twitter.com/ohmyzsh.' echo '' echo 'p.p.s. Get stickers and t-shirts at http://shop.planetargon.com.' echo '' diff --git a/tools/upgrade.sh b/tools/upgrade.sh index 4929054c..59b38011 100644 --- a/tools/upgrade.sh +++ b/tools/upgrade.sh @@ -30,7 +30,7 @@ then printf '%s\n' '\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/ ' printf '%s\n' ' /____/ ' printf "${BLUE}%s\n" "Hooray! Oh My Zsh has been updated and/or is at the current version." - printf "${BLUE}${BOLD}%s${NORMAL}\n" "To keep up on the latest news and updates, follow us on twitter: http://twitter.com/ohmyzsh" + printf "${BLUE}${BOLD}%s${NORMAL}\n" "To keep up on the latest news and updates, follow us on twitter: https://twitter.com/ohmyzsh" printf "${BLUE}${BOLD}%s${NORMAL}\n" "Get your Oh My Zsh swag at: http://shop.planetargon.com/" else printf "${RED}%s${NORMAL}\n" 'There was an error updating. Try again later?' From 0a2c31fb60ab9870f3a2090eba10d0bdbcc9a3b9 Mon Sep 17 00:00:00 2001 From: MoonFruit Date: Fri, 28 Aug 2015 10:46:45 +0800 Subject: [PATCH 136/183] Remove redundant semicolon Remove redundant semicolon to make tab() works better in ITerm 2. --- 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 a6e3a83e..390960fd 100644 --- a/plugins/osx/osx.plugin.zsh +++ b/plugins/osx/osx.plugin.zsh @@ -6,7 +6,7 @@ # ------------------------------------------------------------------------------ function tab() { - local command="cd \\\"$PWD\\\"; clear; " + local command="cd \\\"$PWD\\\"; clear" (( $# > 0 )) && command="${command}; $*" the_app=$( From acf6039ff391cd868814d5df714fb26339f1009b Mon Sep 17 00:00:00 2001 From: cxbig Date: Sat, 29 Aug 2015 01:35:41 +0200 Subject: [PATCH 137/183] improved alias conflict between git flow & git fetch --- plugins/git-flow/git-flow.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/git-flow/git-flow.plugin.zsh b/plugins/git-flow/git-flow.plugin.zsh index 4357c089..444440bc 100644 --- a/plugins/git-flow/git-flow.plugin.zsh +++ b/plugins/git-flow/git-flow.plugin.zsh @@ -21,7 +21,7 @@ # #Alias -alias gf='git flow' +alias gfl='git flow' alias gcd='git checkout develop' alias gch='git checkout hotfix' alias gcr='git checkout release' From 0a80889848ccb3ada94dd2fdb793a01a268f7a16 Mon Sep 17 00:00:00 2001 From: Will Mendes Date: Sat, 29 Aug 2015 11:48:28 -0300 Subject: [PATCH 138/183] Frontend-search: add search in npm website --- plugins/frontend-search/README.md | 2 ++ plugins/frontend-search/_frontend-search.sh | 4 ++++ plugins/frontend-search/frontend-search.plugin.zsh | 7 ++++++- 3 files changed, 12 insertions(+), 1 deletion(-) diff --git a/plugins/frontend-search/README.md b/plugins/frontend-search/README.md index 801d450f..b8e96ea4 100644 --- a/plugins/frontend-search/README.md +++ b/plugins/frontend-search/README.md @@ -43,6 +43,7 @@ The search content are * `reactjs &as_sitesearch=facebook.github.io/react>` * `emberjs ` * `stackoverflow ` +* `npmjs ` ## Aliases ## @@ -69,6 +70,7 @@ There are a few aliases presented as well: * `reactjs` A shorthand for `frontend reactjs` * `emberjs` A shorthand for `frontend emberjs` * `stackoverflow` A shorthand for `frontend stackoverflow` +* `npmjs` A shorthand for `frontend npmjs` ## Author diff --git a/plugins/frontend-search/_frontend-search.sh b/plugins/frontend-search/_frontend-search.sh index 252f2157..b12f829a 100644 --- a/plugins/frontend-search/_frontend-search.sh +++ b/plugins/frontend-search/_frontend-search.sh @@ -37,6 +37,7 @@ function _frontend() { 'reactjs: Search in React website' 'emberjs: Search in Ember website' 'stackoverflow: Search in StackOverflow website' + 'npmjs: Search in NPMJS website' ) _arguments -C \ @@ -110,6 +111,9 @@ function _frontend() { stackoverflow) _describe -t points "Warp points" frontend_points && ret=0 ;; + npmjs) + _describe -t points "Warp points" frontend_points && ret=0 + ;; esac ;; esac diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh index f7485621..e47735a6 100644 --- a/plugins/frontend-search/frontend-search.plugin.zsh +++ b/plugins/frontend-search/frontend-search.plugin.zsh @@ -9,7 +9,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|stackoverflow)' ]]; + if [[ ! $1 =~ '(jquery|mdn|compass|html5please|caniuse|aurajs|dartlang|qunit|fontello|bootsnipp|cssflow|codepen|unheap|bem|smacss|angularjs|reactjs|emberjs|stackoverflow|npmjs)' ]]; then echo "Search valid search content $1 not supported." echo "Valid contents: (formats 'frontend ' or '')" @@ -33,6 +33,7 @@ function frontend() { echo "* reactjs" echo "* emberjs" echo "* stackoverflow" + echo "* npmjs" echo "" return 1 @@ -99,6 +100,9 @@ function frontend() { "stackoverflow") url="${url}stackoverflow.com" url="${url}/search?q=$2" ;; + "npmjs") + url="${url}www.npmjs.com" + url="${url}/search?q=$2" ;; *) echo "INVALID PARAM!" return ;; esac @@ -148,3 +152,4 @@ alias emberjs='frontend emberjs' # search websites alias stackoverflow='frontend stackoverflow' +alias npmjs='frontend npmjs' From 69f098a63cf32fa13556de328971254addaae309 Mon Sep 17 00:00:00 2001 From: Robby Russell Date: Sun, 30 Aug 2015 21:58:52 -0700 Subject: [PATCH 139/183] Mentioning that you can set the theme to 'random' and it'll possibly bake you a pie. --- README.markdown | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/README.markdown b/README.markdown index 183e6774..a29df81a 100644 --- a/README.markdown +++ b/README.markdown @@ -77,6 +77,14 @@ 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 of them](https://github.com/robbyrussell/oh-my-zsh/wiki/External-themes). +If you're feeling feisty, you can let the computer select one randomly for you each time you open a new terminal window. + + +```shell +ZSH_THEME="random" # (...please let it be pie... please be some pie..) +``` + + ## Advanced Topics If you're the type that likes to get their hands dirty, these sections might resonate. From 022a060ec754f3ed54cb62acc3370310bfe71a50 Mon Sep 17 00:00:00 2001 From: kyleheyne Date: Mon, 31 Aug 2015 17:36:41 -0400 Subject: [PATCH 140/183] thefuck-alias -> thefuck --alias Per warning message. --- plugins/thefuck/thefuck.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/thefuck/thefuck.plugin.zsh b/plugins/thefuck/thefuck.plugin.zsh index 8b1746e8..765e2b9a 100644 --- a/plugins/thefuck/thefuck.plugin.zsh +++ b/plugins/thefuck/thefuck.plugin.zsh @@ -4,7 +4,7 @@ if [[ -z $commands[thefuck] ]]; then fi # Register alias -eval "$(thefuck-alias)" +eval "$(thefuck --alias)" fuck-command-line() { local FUCK="$(THEFUCK_REQUIRE_CONFIRMATION=0 thefuck $(fc -ln -1 | tail -n 1) 2> /dev/null)" From 7f64092361472e12de85f945884445e0e2274846 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Tue, 1 Sep 2015 19:07:49 +0200 Subject: [PATCH 141/183] [vim-interaction plugin] Escaping special chars in file names and simplifying code. --- .../vim-interaction.plugin.zsh | 22 ++++--------------- 1 file changed, 4 insertions(+), 18 deletions(-) diff --git a/plugins/vim-interaction/vim-interaction.plugin.zsh b/plugins/vim-interaction/vim-interaction.plugin.zsh index b0b9414c..b774be34 100644 --- a/plugins/vim-interaction/vim-interaction.plugin.zsh +++ b/plugins/vim-interaction/vim-interaction.plugin.zsh @@ -4,17 +4,6 @@ # Derek Wyatt (derek@{myfirstnamemylastname}.org # -function resolveFile -{ - if [ -f "$1" ]; then - echo $(readlink -f "$1") - elif [[ "${1#/}" == "$1" ]]; then - echo "$PWD/$1" - else - echo $1 - fi -} - function callvim { if [[ $# == 0 ]]; then @@ -48,13 +37,10 @@ EOH if [[ ${before#:} != $before && ${before%} == $before ]]; then before="$before" fi - local files="" - for f in $@ - do - files="$files $(resolveFile $f)" - done - if [[ -n $files ]]; then - files=':args! '"$files" + local files + if [[ $# -gt 0 ]]; then + # absolute path of files resolving symlinks (:A) and quoting special chars (:q) + files=':args! '"${@:A:q}" fi cmd="$before$files$after" gvim --remote-send "$cmd" From f1472f1f6462d391a14ec80157365500f7a11b3f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sun, 30 Aug 2015 00:09:15 +0200 Subject: [PATCH 142/183] Simplify frontend-search function with assoc array Also adds the lodash URL (which was missing) and uses https on those websites that support it. --- .../frontend-search.plugin.zsh | 100 ++++++------------ 1 file changed, 32 insertions(+), 68 deletions(-) diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh index e47735a6..3afc3336 100644 --- a/plugins/frontend-search/frontend-search.plugin.zsh +++ b/plugins/frontend-search/frontend-search.plugin.zsh @@ -1,6 +1,33 @@ # frontend from terminal function frontend() { + emulate -L zsh + + # define search content URLS + typeset -A urls + urls=( + angularjs 'https://google.com/search?as_sitesearch=angularjs.org&as_q=' + aurajs 'http://aurajs.com/api/#stq=' + bem 'https://google.com/search?as_sitesearch=bem.info&as_q=' + bootsnipp 'http://bootsnipp.com/search?q=' + caniuse 'http://caniuse.com/#search=' + codepen 'http://codepen.io/search?q=' + compass 'http://compass-style.org/search?q=' + cssflow 'http://www.cssflow.com/search?q=' + dartlang 'https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart:' + emberjs 'http://emberjs.com/api/#stp=1&stq=' + fontello 'http://fontello.com/#search=' + html5please 'http://html5please.com/#' + jquery 'https://api.jquery.com/?s=' + lodash 'https://devdocs.io/lodash/index#' + mdn 'https://developer.mozilla.org/search?q=' + npmjs 'https://www.npmjs.com/search?q=' + qunit 'https://api.qunitjs.com/?s=' + reactjs 'https://google.com/search?as_sitesearch=facebook.github.io/react&as_q=' + smacss 'https://google.com/search?as_sitesearch=smacss.com&as_q=' + stackoverflow 'http://stackoverflow.com/search?q=' + unheap 'http://www.unheap.com/?s=' + ) # no keyword provided, simply show how call methods if [[ $# -le 1 ]]; then @@ -9,7 +36,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|stackoverflow|npmjs)' ]]; + if [[ -z "$urls[$1]" ]]; then then echo "Search valid search content $1 not supported." echo "Valid contents: (formats 'frontend ' or '')" @@ -39,73 +66,10 @@ function frontend() { return 1 fi - local url="http://" - local query="" - - case "$1" in - "jquery") - url="${url}api.jquery.com" - url="${url}/?s=$2" ;; - "mdn") - url="${url}developer.mozilla.org" - url="${url}/search?q=$2" ;; - "compass") - url="${url}compass-style.org" - url="${url}/search?q=$2" ;; - "html5please") - url="${url}html5please.com" - url="${url}/#$2" ;; - "caniuse") - url="${url}caniuse.com" - url="${url}/#search=$2" ;; - "aurajs") - url="${url}aurajs.com" - url="${url}/api/#stq=$2" ;; - "dartlang") - url="${url}api.dartlang.org/apidocs/channels/stable/dartdoc-viewer" - url="${url}/dart-$2" ;; - "qunit") - url="${url}api.qunitjs.com" - url="${url}/?s=$2" ;; - "fontello") - url="${url}fontello.com" - url="${url}/#search=$2" ;; - "bootsnipp") - url="${url}bootsnipp.com" - url="${url}/search?q=$2" ;; - "cssflow") - url="${url}cssflow.com" - url="${url}/search?q=$2" ;; - "codepen") - url="${url}codepen.io" - url="${url}/search?q=$2" ;; - "unheap") - url="${url}www.unheap.com" - url="${url}/?s=$2" ;; - "bem") - url="${url}google.com" - url="${url}/search?as_q=$2&as_sitesearch=bem.info" ;; - "smacss") - url="${url}google.com" - url="${url}/search?as_q=$2&as_sitesearch=smacss.com" ;; - "angularjs") - url="${url}google.com" - url="${url}/search?as_q=$2&as_sitesearch=angularjs.org" ;; - "reactjs") - url="${url}google.com" - url="${url}/search?as_q=$2&as_sitesearch=facebook.github.io/react" ;; - "emberjs") - url="${url}emberjs.com" - url="${url}/api/#stq=$2&stp=1" ;; - "stackoverflow") - url="${url}stackoverflow.com" - url="${url}/search?q=$2" ;; - "npmjs") - url="${url}www.npmjs.com" - url="${url}/search?q=$2" ;; - *) echo "INVALID PARAM!" - return ;; - esac + # build search url: + # join arguments passed with '+', then append to search engine URL + # TODO substitute for proper urlencode method + url="${urls[$1]}${(j:+:)@[2,-1]}" echo "$url" From ff706f3ef8fd632d93e2c347d32c62f15b17c25c Mon Sep 17 00:00:00 2001 From: willmendesneto Date: Thu, 3 Jul 2014 22:53:00 -0300 Subject: [PATCH 143/183] Add "help" method in "frontend-search" plugin --- plugins/frontend-search/README.md | 9 ++++++- .../frontend-search.plugin.zsh | 26 +++++++++++++++++-- 2 files changed, 32 insertions(+), 3 deletions(-) diff --git a/plugins/frontend-search/README.md b/plugins/frontend-search/README.md index b8e96ea4..bf8a4bc0 100644 --- a/plugins/frontend-search/README.md +++ b/plugins/frontend-search/README.md @@ -17,9 +17,16 @@ plugins=( ... frontend-search) ## Commands ## -All command searches are accept only in format +All command searches are accept only in formats * `frontend ` +* ` ` + +For more informations, please run help command (are similars) + +* `frontend -h` +* `frontend --help` +* `frontend help` The search content are diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh index 3afc3336..08930ddc 100644 --- a/plugins/frontend-search/frontend-search.plugin.zsh +++ b/plugins/frontend-search/frontend-search.plugin.zsh @@ -29,14 +29,36 @@ function frontend() { unheap 'http://www.unheap.com/?s=' ) + # show help for commands list + if [[ $1 =~ '(help|--help|-h)' ]] + then + echo "Usage:" + echo "\n\tfrontend \n\t\n\tfrontend " + echo "" + echo "Where is one of:" + echo "jquery, mdn, compass, html5please, caniuse, aurajs, dartlang, qunit, fontello," + echo "bootsnipp, cssflow, codepen, unheap, bem, smacss, angularjs, reactjs, emberjs" + echo "help" + echo "" + echo "Where is a term to search in allowed repositories" + echo "" + echo "frontend --help show plugin help" + echo "frontend -h show plugin help" + echo "" + echo "It is allowed to directly access all search contents." + echo "" + return 1 + fi + # no keyword provided, simply show how call methods - if [[ $# -le 1 ]]; then + if [[ $# -le 1 ]] + then echo "Please provide a search-content and a search-term for app.\nEx:\nfrontend \n" return 1 fi # check whether the search engine is supported - if [[ -z "$urls[$1]" ]]; then + if [[ -z "$urls[$1]" ]] then echo "Search valid search content $1 not supported." echo "Valid contents: (formats 'frontend ' or '')" From 663ac56d54d252b9de7c76346bd64a14340a51f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Mon, 31 Aug 2015 18:49:05 +0200 Subject: [PATCH 144/183] Prettify frontend help output and clean up logic --- .../frontend-search.plugin.zsh | 79 ++++++------------- 1 file changed, 24 insertions(+), 55 deletions(-) diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh index 08930ddc..6eb1fed2 100644 --- a/plugins/frontend-search/frontend-search.plugin.zsh +++ b/plugins/frontend-search/frontend-search.plugin.zsh @@ -1,9 +1,7 @@ -# frontend from terminal - function frontend() { emulate -L zsh - # define search content URLS + # define search context URLS typeset -A urls urls=( angularjs 'https://google.com/search?as_sitesearch=angularjs.org&as_q=' @@ -29,74 +27,45 @@ function frontend() { unheap 'http://www.unheap.com/?s=' ) - # show help for commands list - if [[ $1 =~ '(help|--help|-h)' ]] + # show help for command list + if [[ $# -lt 2 ]] then - echo "Usage:" - echo "\n\tfrontend \n\t\n\tfrontend " - echo "" - echo "Where is one of:" - echo "jquery, mdn, compass, html5please, caniuse, aurajs, dartlang, qunit, fontello," - echo "bootsnipp, cssflow, codepen, unheap, bem, smacss, angularjs, reactjs, emberjs" - echo "help" - echo "" - echo "Where is a term to search in allowed repositories" - echo "" - echo "frontend --help show plugin help" - echo "frontend -h show plugin help" - echo "" - echo "It is allowed to directly access all search contents." - echo "" + print -P "Usage: frontend %Ucontext%u %Uterm%u [...%Umore%u] (or just: %Ucontext%u %Uterm%u [...%Umore%u])" + print -P "" + print -P "%Uterm%u and what follows is what will be searched for in the %Ucontext%u website," + print -P "and %Ucontext%u is one of the following:" + print -P "" + print -P " angularjs, aurajs, bem, bootsnipp, caniuse, codepen, compass, cssflow," + print -P " dartlang, emberjs, fontello, html5please, jquery, lodash, mdn, npmjs," + print -P " qunit, reactjs, smacss, stackoverflow, unheap" + print -P "" + print -P "For example: frontend npmjs mocha (or just: npmjs mocha)." + print -P "" return 1 fi - # 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 \n" - return 1 - fi - - # check whether the search engine is supported + # check whether the search context is supported if [[ -z "$urls[$1]" ]] then - echo "Search valid search content $1 not supported." - echo "Valid contents: (formats 'frontend ' or '')" - echo "* jquery" - echo "* mdn" - echo "* compass" - echo "* html5please" - echo "* caniuse" - echo "* aurajs" - echo "* dartlang" - echo "* lodash" - echo "* qunit" - echo "* fontello" - echo "* bootsnipp" - echo "* cssflow" - echo "* codepen" - echo "* unheap" - echo "* bem" - echo "* smacss" - echo "* angularjs" - echo "* reactjs" - echo "* emberjs" - echo "* stackoverflow" - echo "* npmjs" + echo "Search context \"$1\" currently not supported." + echo "" + echo "Valid contexts are:" + echo "" + echo " angularjs, aurajs, bem, bootsnipp, caniuse, codepen, compass, cssflow, " + echo " dartlang, emberjs, fontello, html5please, jquery, lodash, mdn, npmjs, " + echo " qunit, reactjs, smacss, stackoverflow, unheap" echo "" - return 1 fi # build search url: - # join arguments passed with '+', then append to search engine URL + # join arguments passed with '+', then append to search context URL # TODO substitute for proper urlencode method url="${urls[$1]}${(j:+:)@[2,-1]}" - echo "$url" + echo "Opening $url ..." open_command "$url" - } # javascript From d982e1200f1f14fa4487a45c8af4e18834092ebd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Mon, 31 Aug 2015 19:12:05 +0200 Subject: [PATCH 145/183] Reorder alias definitions --- .../frontend-search.plugin.zsh | 63 +++++++------------ 1 file changed, 22 insertions(+), 41 deletions(-) diff --git a/plugins/frontend-search/frontend-search.plugin.zsh b/plugins/frontend-search/frontend-search.plugin.zsh index 6eb1fed2..2fd5416b 100644 --- a/plugins/frontend-search/frontend-search.plugin.zsh +++ b/plugins/frontend-search/frontend-search.plugin.zsh @@ -1,3 +1,25 @@ +alias angularjs='frontend angularjs' +alias aurajs='frontend aurajs' +alias bem='frontend bem' +alias bootsnipp='frontend bootsnipp' +alias caniuse='frontend caniuse' +alias codepen='frontend codepen' +alias compass='frontend compass' +alias cssflow='frontend cssflow' +alias dartlang='frontend dartlang' +alias emberjs='frontend emberjs' +alias fontello='frontend fontello' +alias html5please='frontend html5please' +alias jquery='frontend jquery' +alias lodash='frontend lodash' +alias mdn='frontend mdn' +alias npmjs='frontend npmjs' +alias qunit='frontend qunit' +alias reactjs='frontend reactjs' +alias smacss='frontend smacss' +alias stackoverflow='frontend stackoverflow' +alias unheap='frontend unheap' + function frontend() { emulate -L zsh @@ -67,44 +89,3 @@ function frontend() { open_command "$url" } - -# javascript -alias jquery='frontend jquery' -alias mdn='frontend mdn' - -# pre processors frameworks -alias compassdoc='frontend compass' - -# important links -alias html5please='frontend html5please' -alias caniuse='frontend caniuse' - -# components and libraries -alias aurajs='frontend aurajs' -alias dartlang='frontend dartlang' -alias lodash='frontend lodash' - -#tests -alias qunit='frontend qunit' - -#fonts -alias fontello='frontend fontello' - -# snippets -alias bootsnipp='frontend bootsnipp' -alias cssflow='frontend cssflow' -alias codepen='frontend codepen' -alias unheap='frontend unheap' - -# css architecture -alias bem='frontend bem' -alias smacss='frontend smacss' - -# frameworks -alias angularjs='frontend angularjs' -alias reactjs='frontend reactjs' -alias emberjs='frontend emberjs' - -# search websites -alias stackoverflow='frontend stackoverflow' -alias npmjs='frontend npmjs' From c481c62bc996cfe22417621dfd96c4267eb1e740 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Mon, 31 Aug 2015 19:17:16 +0200 Subject: [PATCH 146/183] Refactor and clear up README file --- plugins/frontend-search/README.md | 107 ++++++++++++------------------ 1 file changed, 41 insertions(+), 66 deletions(-) diff --git a/plugins/frontend-search/README.md b/plugins/frontend-search/README.md index bf8a4bc0..d0bc5589 100644 --- a/plugins/frontend-search/README.md +++ b/plugins/frontend-search/README.md @@ -1,83 +1,60 @@ -## Rationale ## +## Introduction ## -> Searches for your Frontend contents more easier +> Searches for your frontend web development made easier -## Instalation ## +## Installation ## +Open your `~/.zshrc` file and enable the `frontend-search` plugin: -Open your `.zshrc` file and load `frontend-search` plugin +```zsh + +plugins=( ... frontend-search) -```bash -... -plugins=( ... frontend-search) -... ``` -## Commands ## +## Usage ## -All command searches are accept only in formats +You can use the frontend-search plugin in these two forms: -* `frontend ` -* ` ` +* `frontend [more terms if you want]` +* ` [more terms if you want]` -For more informations, please run help command (are similars) +For example, these two are equivalent: -* `frontend -h` -* `frontend --help` -* `frontend help` +```zsh +$ frontend angularjs dependency injection +$ angularjs dependency injection +``` -The search content are +Available search contexts are: -* `jquery ` -* `mdn ` -* `compass ` -* `html5please ` -* `caniuse ` -* `aurajs ` -* `dartlang ` -* `lodash ` -* `qunit ` -* `fontello ` -* `bootsnipp ` -* `cssflow ` -* `codepen ` -* `unheap ` -* `bem &as_sitesearch=bem.info>` -* `smacss &as_sitesearch=smacss.com>` -* `angularjs &as_sitesearch=angularjs.org>` -* `reactjs &as_sitesearch=facebook.github.io/react>` -* `emberjs ` -* `stackoverflow ` -* `npmjs ` +| context | URL | +|---------------|--------------------------------------------------------------------------| +| angularjs | `https://google.com/search?as_sitesearch=angularjs.org&as_q=` | +| aurajs | `http://aurajs.com/api/#stq=` | +| bem | `https://google.com/search?as_sitesearch=bem.info&as_q=` | +| bootsnipp | `http://bootsnipp.com/search?q=` | +| caniuse | `http://caniuse.com/#search=` | +| codepen | `http://codepen.io/search?q=` | +| compass | `http://compass-style.org/search?q=` | +| cssflow | `http://www.cssflow.com/search?q=` | +| dartlang | `https://api.dartlang.org/apidocs/channels/stable/dartdoc-viewer/dart:` | +| emberjs | `http://emberjs.com/api/#stp=1&stq=` | +| fontello | `http://fontello.com/#search=` | +| html5please | `http://html5please.com/#` | +| jquery | `https://api.jquery.com/?s=` | +| lodash | `https://devdocs.io/lodash/index#` | +| mdn | `https://developer.mozilla.org/search?q=` | +| npmjs | `https://www.npmjs.com/search?q=` | +| qunit | `https://api.qunitjs.com/?s=` | +| reactjs | `https://google.com/search?as_sitesearch=facebook.github.io/react&as_q=` | +| smacss | `https://google.com/search?as_sitesearch=smacss.com&as_q=` | +| stackoverflow | `http://stackoverflow.com/search?q=` | +| unheap | `http://www.unheap.com/?s=` | - -## Aliases ## - -There are a few aliases presented as well: - -* `jquery` A shorthand for `frontend jquery` -* `mdn` A shorthand for `frontend mdn` -* `compass` A shorthand for `frontend compass` -* `html5please` A shorthand for `frontend html5please` -* `caniuse` A shorthand for `frontend caniuse` -* `aurajs` A shorthand for `frontend aurajs` -* `dartlang` A shorthand for `frontend dartlang` -* `lodash` A shorthand for `frontend lodash` -* `qunit` A shorthand for `frontend qunit` -* `fontello` A shorthand for `frontend fontello` -* `bootsnipp` A shorthand for `frontend bootsnipp` -* `cssflow` A shorthand for `frontend cssflow` -* `codepen` A shorthand for `frontend codepen` -* `unheap` A shorthand for `frontend unheap` -* `bem` A shorthand for `frontend bem` -* `smacss` A shorthand for `frontend smacss` -* `angularjs` A shorthand for `frontend angularjs` -* `reactjs` A shorthand for `frontend reactjs` -* `emberjs` A shorthand for `frontend emberjs` -* `stackoverflow` A shorthand for `frontend stackoverflow` -* `npmjs` A shorthand for `frontend npmjs` +If you want to have another context, open an Issue and tell us! ## Author @@ -86,5 +63,3 @@ There are a few aliases presented as well: + + + - -New features comming soon. From b08431ff7431528f0e9dc49ceb199be2226266dc Mon Sep 17 00:00:00 2001 From: Andy Blyler Date: Tue, 1 Sep 2015 23:08:41 -0400 Subject: [PATCH 147/183] Add codeclimate autocomplete plugin --- plugins/codeclimate/_codeclimate | 82 ++++++++++++++++++++++++++++++++ 1 file changed, 82 insertions(+) create mode 100644 plugins/codeclimate/_codeclimate diff --git a/plugins/codeclimate/_codeclimate b/plugins/codeclimate/_codeclimate new file mode 100644 index 00000000..fd2536a3 --- /dev/null +++ b/plugins/codeclimate/_codeclimate @@ -0,0 +1,82 @@ +#compdef codeclimate + +_codeclimate_all_engines() { + engines_all=(`codeclimate engines:list | tail -n +2 | gawk '{ print $2 }' | gawk -F: '{ print $1 }'`) +} + +_codeclimate_installed_engines() { + _codeclimate_all_engines + + engines_installed=() + + if [ -e .codeclimate.yml ] + then + for engine in $engines_all + do + if grep -q $engine ".codeclimate.yml" + then + engines_installed+=$engine + fi + done + fi +} + +_codeclimate_not_installed_engines() { + _codeclimate_all_engines + + engines_not_installed=() + + if [ -e .codeclimate.yml ] + then + for engine in $engines_all + do + if ! grep -q $engine ".codeclimate.yml" + then + engines_not_installed+=$engine + fi + done + fi +} + +local curcontext="$curcontext" state line ret=1 +local expl +local -a engines_all engines_installed engines_not_installed + +_arguments \ + '1: :->cmds' \ + '*:: :->args' && ret=0 + +case $state in + cmds) + _values "bundle command" \ + "analyze[Analyze all relevant files in the current working directory]" \ + "console[Start an interactive session providing access to the classes within the CLI]" \ + "engines\:disable[Prevents the engine from being used in this project]" \ + "engines\:enable[This engine will be run the next time your project is analyzed]" \ + "engines\:install[Compares the list of engines in your .codeclimate.yml file to those that are currently installed, then installs any missing engines]" \ + "engines\:list[Lists all available engines in the Code Climate Docker Hub]" \ + "engines\:remove[Removes an engine from your .codeclimate.yml file]" \ + "help[Displays a list of commands that can be passed to the Code Climate CLI]" \ + "init[Generates a new .codeclimate.yml file in the current working directory]" \ + "validate-config[Validates the .codeclimate.yml file in the current working directory]" \ + "version[Displays the current version of the Code Climate CLI]" + ret=0 + ;; + args) + case $line[1] in + engines:enable) + _codeclimate_not_installed_engines + _wanted engines_not_installed expl 'not installed engines' compadd -a engines_not_installed ;; + engines:disable|engines:remove) + _codeclimate_installed_engines + _wanted engines_installed expl 'installed engines' compadd -a engines_installed ;; + analyze) + _arguments \ + '-f:Output Format:(text json)' + ret=0 + ;; + esac + ;; +esac + +return ret From ef4a31563075aa0c0453219fcb66eb3941f2d515 Mon Sep 17 00:00:00 2001 From: Eric Bottard Date: Tue, 3 Mar 2015 18:28:32 +0100 Subject: [PATCH 148/183] Fix invocation of gradlew --- 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 6f634d1b..97941756 100644 --- a/plugins/gradle/gradle.plugin.zsh +++ b/plugins/gradle/gradle.plugin.zsh @@ -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 6d7c39a2aef023ac887f0cadbe0035706838c859 Mon Sep 17 00:00:00 2001 From: Michele Bologna Date: Wed, 2 Sep 2015 20:57:04 +0200 Subject: [PATCH 149/183] Added fancy-ctrl-z plugin Use Ctrl-Z to switch back to Vim I frequently need to execute random command in my shell. To achieve it I pause Vim by pressing Ctrl-z, type command and press fg to switch back to Vim. The fg part really hurts me. I just wanted to hit Ctrl-z once again to get back to Vim. I could not find a solution, so I developed one on my own that works wonderfully with ZSH. Source: http://sheerun.net/2014/03/21/how-to-boost-your-vim-productivity/ --- plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh | 21 ++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh diff --git a/plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh b/plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh new file mode 100644 index 00000000..d4e41b71 --- /dev/null +++ b/plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh @@ -0,0 +1,21 @@ +# Use Ctrl-Z to switch back to Vim +# I frequently need to execute random command in my shell. To achieve it I pause +# Vim by pressing Ctrl-z, type command and press fg to switch back to Vim. +# The fg part really hurt sme. I just wanted to hit Ctrl-z once again to get back +# to Vim. I could not find a solution, so I developed one on my own that +# works wonderfully with ZSH +# +# Source: http://sheerun.net/2014/03/21/how-to-boost-your-vim-productivity/ + +fancy-ctrl-z () { + if [[ $#BUFFER -eq 0 ]]; then + BUFFER="fg" + zle accept-line + else + zle push-input + zle clear-screen + fi +} +zle -N fancy-ctrl-z +bindkey '^Z' fancy-ctrl-z + From bec496f0534560dd32d9986b1cb99d25a1fbd819 Mon Sep 17 00:00:00 2001 From: bronzdoc Date: Wed, 2 Sep 2015 16:57:13 -0600 Subject: [PATCH 150/183] Display rvm-prompt output. --- themes/amuse.zsh-theme | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/themes/amuse.zsh-theme b/themes/amuse.zsh-theme index 548f6d39..60761b5c 100644 --- a/themes/amuse.zsh-theme +++ b/themes/amuse.zsh-theme @@ -18,4 +18,11 @@ ZSH_THEME_GIT_PROMPT_DIRTY="%{$fg[red]%}!" ZSH_THEME_GIT_PROMPT_UNTRACKED="%{$fg[green]%}?" ZSH_THEME_GIT_PROMPT_CLEAN="" -RPROMPT='%{$fg_bold[red]%}$(rbenv_version)%{$reset_color%}' +if [ -e ~/.rvm/bin/rvm-prompt ]; then + RPROMPT='%{$fg_bold[red]%}‹$(~/.rvm/bin/rvm-prompt i v)›%{$reset_color%}' +else + if which rbenv &> /dev/null; then + RPROMPT='%{$fg_bold[red]%}$(rbenv_version)%{$reset_color%}' + fi +fi + From 9a7b2d7ffb6def1b1009b3c4a21d33af22a74234 Mon Sep 17 00:00:00 2001 From: Michele Bologna Date: Thu, 3 Sep 2015 08:55:03 +0200 Subject: [PATCH 151/183] Moved comments and credits from source to README --- plugins/fancy-ctrl-z/README.md | 14 ++++++++++++++ plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh | 9 --------- 2 files changed, 14 insertions(+), 9 deletions(-) create mode 100644 plugins/fancy-ctrl-z/README.md diff --git a/plugins/fancy-ctrl-z/README.md b/plugins/fancy-ctrl-z/README.md new file mode 100644 index 00000000..a7670fa2 --- /dev/null +++ b/plugins/fancy-ctrl-z/README.md @@ -0,0 +1,14 @@ +# Use Ctrl-Z to switch back to Vim + +I frequently need to execute random command in my shell. To achieve it I pause +Vim by pressing Ctrl-z, type command and press fg to switch back to Vim. +The fg part really hurt sme. I just wanted to hit Ctrl-z once again to get back +to Vim. I could not find a solution, so I developed one on my own that +works wonderfully with ZSH + +Source: http://sheerun.net/2014/03/21/how-to-boost-your-vim-productivity/ + +Credits: +- original idea by @sheerun +- added to OMZ by @mbologna + diff --git a/plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh b/plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh index d4e41b71..8ab29791 100644 --- a/plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh +++ b/plugins/fancy-ctrl-z/fancy-ctrl-z.plugin.zsh @@ -1,12 +1,3 @@ -# Use Ctrl-Z to switch back to Vim -# I frequently need to execute random command in my shell. To achieve it I pause -# Vim by pressing Ctrl-z, type command and press fg to switch back to Vim. -# The fg part really hurt sme. I just wanted to hit Ctrl-z once again to get back -# to Vim. I could not find a solution, so I developed one on my own that -# works wonderfully with ZSH -# -# Source: http://sheerun.net/2014/03/21/how-to-boost-your-vim-productivity/ - fancy-ctrl-z () { if [[ $#BUFFER -eq 0 ]]; then BUFFER="fg" From c7d782f1ab2488ff0e44c2d72d9b81ea24b3195c Mon Sep 17 00:00:00 2001 From: Pablo Cantero Date: Thu, 3 Sep 2015 13:39:41 -0300 Subject: [PATCH 152/183] Add the update from @mtwentyman https://github.com/phstc/dotfiles/pull/1 to make it work for older versions of capistrano --- plugins/capistrano/_capistrano | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/capistrano/_capistrano b/plugins/capistrano/_capistrano index c181b55c..e6e71ffc 100644 --- a/plugins/capistrano/_capistrano +++ b/plugins/capistrano/_capistrano @@ -14,7 +14,7 @@ _arguments -C \ _cap_tasks() { if [[ -f config/deploy.rb || -f Capfile ]]; then if [[ ! -f .cap_tasks~ ]]; then - shipit -v --tasks | awk '{command=$2; $1=$2=$3=""; gsub(/^[ \t\r\n]+/, "", $0); gsub(":", "\\:", command); print command"["$0"]"}' > .cap_tasks~ + shipit -v --tasks | sed 's/\(\[\)\(.*\)\(\]\)/\2:/' | awk '{command=$2; $1=$2=$3=""; gsub(/^[ \t\r\n]+/, "", $0); gsub(":", "\\:", command); print command"["$0"]"}' > .cap_tasks~ fi OLD_IFS=$IFS From d009f24ac395b815287ad10db1b78b1cd9e1cf54 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Wed, 1 Jul 2015 10:33:08 -0400 Subject: [PATCH 153/183] gnzh theme: fix "eval" and related problems. Switch to normal zsh %F/%f prompt escapes to avoid "eval" and extra variables. Wrap whole thing in anonymous function so the existing `local` statements actually work. Then switch '...' to eager "..." so stuff actually works with local variables. And local-ize the remaining variables that are used only in prompt construction. --- themes/gnzh.zsh-theme | 57 ++++++++++++++++++++----------------------- 1 file changed, 27 insertions(+), 30 deletions(-) diff --git a/themes/gnzh.zsh-theme b/themes/gnzh.zsh-theme index ab154c1e..04b0450a 100644 --- a/themes/gnzh.zsh-theme +++ b/themes/gnzh.zsh-theme @@ -1,53 +1,50 @@ # ZSH Theme - Preview: http://dl.dropbox.com/u/4109351/pics/gnzh-zsh-theme.png # Based on bira theme -# load some modules -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) -for color in RED GREEN YELLOW BLUE MAGENTA CYAN WHITE; do - eval PR_$color='%{$fg[${(L)color}]%}' -done -eval PR_NO_COLOR="%{$terminfo[sgr0]%}" -eval PR_BOLD="%{$terminfo[bold]%}" +() { + +local PR_USER PR_USER_OP PR_PROMPT PR_HOST # Check the UID 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' + PR_USER='%F{green}%n%f' + PR_USER_OP='%F{green}%#%f' + PR_PROMPT='%f➤ %f' 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' + PR_USER='%F{red}%n%f' + PR_USER_OP='%F{red}%#%f' + PR_PROMPT='%F{red}➤ %f' fi # Check if we are on SSH or not if [[ -n "$SSH_CLIENT" || -n "$SSH2_CLIENT" ]]; then - eval PR_HOST='${PR_YELLOW}%M${PR_NO_COLOR}' #SSH + PR_HOST='%F{red}%M%f' # SSH else - eval PR_HOST='${PR_GREEN}%M${PR_NO_COLOR}' # no SSH + PR_HOST='%F{green}%M%f' # no SSH fi -local return_code="%(?..%{$PR_RED%}%? ↵%{$PR_NO_COLOR%})" -local user_host='${PR_USER}${PR_CYAN}@${PR_HOST}' -local current_dir='%{$PR_BOLD$PR_BLUE%}%~%{$PR_NO_COLOR%}' +local return_code="%(?..%F{red}%? ↵%f)" + +local user_host="${PR_USER}%F{cyan}@${PR_HOST}" +local current_dir="%B%F{blue}%~%f%b" local rvm_ruby='' -if ${HOME}/.rvm/bin/rvm-prompt &> /dev/null; then # detect local user rvm installation - rvm_ruby='%{$PR_RED%}‹$(${HOME}/.rvm/bin/rvm-prompt i v g s)›%{$PR_NO_COLOR%}' -elif which rvm-prompt &> /dev/null; then # detect sysem-wide rvm installation - rvm_ruby='%{$PR_RED%}‹$(rvm-prompt i v g s)›%{$PR_NO_COLOR%}' -elif which rbenv &> /dev/null; then # detect Simple Ruby Version management - rvm_ruby='%{$PR_RED%}‹$(rbenv version | sed -e "s/ (set.*$//")›%{$PR_NO_COLOR%}' +if ${HOME}/.rvm/bin/rvm-prompt &> /dev/null; then # detect user-local rvm installation + rvm_ruby='%F{red}‹$(${HOME}/.rvm/bin/rvm-prompt i v g s)›%f' +elif which rvm-prompt &> /dev/null; then # detect system-wide rvm installation + rvm_ruby='%F{red}‹$(rvm-prompt i v g s)›%f' +elif which rbenv &> /dev/null; then # detect Simple Ruby Version Management + rvm_ruby='%F{red}‹$(rbenv version | sed -e "s/ (set.*$//")›%f' fi -local git_branch='$(git_prompt_info)%{$PR_NO_COLOR%}' +local git_branch='$(git_prompt_info)' -#PROMPT="${user_host} ${current_dir} ${rvm_ruby} ${git_branch}$PR_PROMPT " PROMPT="╭─${user_host} ${current_dir} ${rvm_ruby} ${git_branch} ╰─$PR_PROMPT " -RPS1="${return_code}" +RPROMPT="${return_code}" -ZSH_THEME_GIT_PROMPT_PREFIX="%{$PR_YELLOW%}‹" -ZSH_THEME_GIT_PROMPT_SUFFIX="› %{$PR_NO_COLOR%}" +ZSH_THEME_GIT_PROMPT_PREFIX="%F{yellow}‹" +ZSH_THEME_GIT_PROMPT_SUFFIX="› %f" + +} From 46ddd88fe056ee84064536ce9b34f86bba6b53ca Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Fri, 4 Sep 2015 14:13:00 -0400 Subject: [PATCH 154/183] diagnostics: switch to shasum, filter sysinfo using lines shasum seems more widely available than md5/md5sum, and we don't have to worry about dealing with the different signatures and output formats of md5 and md5sum then. sysinfo outputs localized message labels, so we can't just grep for "OS Type". But OS is the first thing it outputs, so we can probably just grab those lines by line number. Switched to doing that. --- lib/diagnostics.zsh | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/lib/diagnostics.zsh b/lib/diagnostics.zsh index f3823911..afc33829 100644 --- a/lib/diagnostics.zsh +++ b/lib/diagnostics.zsh @@ -117,13 +117,16 @@ function _omz_diag_dump_one_big_text() { # Installed programs programs=(sh zsh ksh bash sed cat grep ls find git posh) + local progfile="" extra_str="" sha_str="" for program in $programs; do - local md5_str="" md5="" link_str="" extra_str="" + extra_str="" sha_str="" progfile=$(builtin which $program) if [[ $? == 0 ]]; then if [[ -e $progfile ]]; then - if builtin whence md5 &>/dev/null; then - extra_str+=" $(md5 -q $progfile)" + if builtin whence shasum &>/dev/null; then + sha_str=($(command shasum $progfile)) + sha_str=$sha_str[1] + extra_str+=" SHA $sha_str" fi if [[ -h "$progfile" ]]; then extra_str+=" ( -> ${progfile:A} )" @@ -314,7 +317,7 @@ function _omz_diag_dump_os_specific_version() { builtin echo "OS Version: $osname $osver build $(sw_vers -buildVersion)" ;; cygwin) - command systeminfo | command grep "^OS Name\|^OS Version" + command systeminfo | command head -4 | command tail -2 ;; esac From 7a63ccabf662138777a43d014a1a0ab5d8f86ab0 Mon Sep 17 00:00:00 2001 From: Alexey V Zapparov Date: Fri, 4 Sep 2015 21:18:32 +0200 Subject: [PATCH 155/183] Fix aws plugin RPROMPT pollution --- plugins/aws/aws.plugin.zsh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/plugins/aws/aws.plugin.zsh b/plugins/aws/aws.plugin.zsh index 7246db9f..d31052f8 100644 --- a/plugins/aws/aws.plugin.zsh +++ b/plugins/aws/aws.plugin.zsh @@ -11,11 +11,16 @@ export AWS_HOME=~/.aws function agp { echo $AWS_DEFAULT_PROFILE } + function asp { + local rprompt=${RPROMPT//} + export AWS_DEFAULT_PROFILE=$1 export AWS_PROFILE=$1 - export RPROMPT="$RPROMPT" + + export RPROMPT="$rprompt" } + function aws_profiles { reply=($(grep profile $AWS_HOME/config|sed -e 's/.*profile \([a-zA-Z0-9_-]*\).*/\1/')) } From 3976e040350bd9ac9423252b97dee28d3762adc2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Wed, 19 Aug 2015 09:03:43 +0200 Subject: [PATCH 156/183] Use proper if comparison --- lib/completion.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index 452c0dfe..e848ea2d 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -58,7 +58,7 @@ zstyle ':completion:*:*:*:users' ignored-patterns \ # ... unless we really want to. zstyle '*' single-ignored show -if [ "x$COMPLETION_WAITING_DOTS" = "xtrue" ]; then +if [[ $COMPLETION_WAITING_DOTS = true ]]; then expand-or-complete-with-dots() { echo -n "\e[31m......\e[0m" zle expand-or-complete From 6a8d406eaa715814dc5a6df08960d1fe62e5c066 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sun, 16 Aug 2015 22:19:59 +0200 Subject: [PATCH 157/183] Use prompt expansion sequence to color red the output This makes it clearer and possibly more portable for different platforms. --- lib/completion.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/completion.zsh b/lib/completion.zsh index e848ea2d..81250d9e 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -60,7 +60,7 @@ zstyle '*' single-ignored show if [[ $COMPLETION_WAITING_DOTS = true ]]; then expand-or-complete-with-dots() { - echo -n "\e[31m......\e[0m" + print -Pn "%{%F{red}......%f%}" zle expand-or-complete zle redisplay } From b42efeb87ebdcb89510b8ffbcf210494f194109e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sat, 22 Aug 2015 21:21:41 +0200 Subject: [PATCH 158/183] Switch off line wrapping in case dots occupy extra line This commit uses the (hopefully) standard rmam and smam escape sequences which toggle off and on line wrapping respectively. This is so that extra dots that don't fit the current line won't be displayed in the next line, which would in turn make the shell display a new prompt on the next line after the dots are hidden. I've added a check for $terminfo rmam and smam values to be sure we have them before printing them out. If this commit breaks something post an issue with your terminal emulator and $TERM value and we'll figure out what went wrong. --- lib/completion.zsh | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/lib/completion.zsh b/lib/completion.zsh index 81250d9e..f5b29247 100644 --- a/lib/completion.zsh +++ b/lib/completion.zsh @@ -60,7 +60,11 @@ zstyle '*' single-ignored show if [[ $COMPLETION_WAITING_DOTS = true ]]; then expand-or-complete-with-dots() { + # toggle line-wrapping off and back on again + [[ -n "$terminfo[rmam]" && -n "$terminfo[smam]" ]] && echoti rmam print -Pn "%{%F{red}......%f%}" + [[ -n "$terminfo[rmam]" && -n "$terminfo[smam]" ]] && echoti smam + zle expand-or-complete zle redisplay } From 75844fe1a1c9bfc84270b593cc0357fd1c356d87 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Mon, 10 Aug 2015 01:45:11 +0200 Subject: [PATCH 159/183] Put relevant documentation into README file --- plugins/taskwarrior/README.md | 13 +++++++++++++ plugins/taskwarrior/taskwarrior.plugin.zsh | 14 -------------- 2 files changed, 13 insertions(+), 14 deletions(-) create mode 100644 plugins/taskwarrior/README.md diff --git a/plugins/taskwarrior/README.md b/plugins/taskwarrior/README.md new file mode 100644 index 00000000..053151e7 --- /dev/null +++ b/plugins/taskwarrior/README.md @@ -0,0 +1,13 @@ +# taskwarrior + +This plugin adds smart tab completion for [TaskWarrior](http://taskwarrior.org/). +It uses the zsh tab completion script (`_task`) shipped with TaskWarrior for the +completion definitions. + +The latest version pulled in from the official project is of January 1st, 2015. + + +## Examples + +Typing `task [TAB]` will give you a list of commands, `task 66[TAB]` shows a +list of available modifications for that task, etcetera. diff --git a/plugins/taskwarrior/taskwarrior.plugin.zsh b/plugins/taskwarrior/taskwarrior.plugin.zsh index 5d1e6ffe..ab885943 100644 --- a/plugins/taskwarrior/taskwarrior.plugin.zsh +++ b/plugins/taskwarrior/taskwarrior.plugin.zsh @@ -1,17 +1,3 @@ -################################################################################ -# Author: Pete Clark -# Email: pete[dot]clark[at]gmail[dot]com -# Version: 0.1 (05/24/2011) -# License: WTFPL -# -# This oh-my-zsh plugin adds smart tab completion for -# TaskWarrior. It uses the zsh tab completion -# script (_task) distributed with TaskWarrior for the completion definitions. -# -# Typing task [tabtab] will give you a list of current tasks, task 66[tabtab] -# gives a list of available modifications for that task, etc. -################################################################################ - zstyle ':completion:*:*:task:*' verbose yes zstyle ':completion:*:*:task:*:descriptions' format '%U%B%d%b%u' From 38d25a335999753093011f93699725c865f73360 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Fri, 14 Aug 2015 20:43:11 +0200 Subject: [PATCH 160/183] Update taskwarrior completion to latest version (Jul 26 2015) See relevant commit at: https://git.tasktools.org/projects/TM/repos/task/commits/3158883dc4d251 --- plugins/taskwarrior/_task | 306 +++++++++++++++++++++----------------- 1 file changed, 170 insertions(+), 136 deletions(-) diff --git a/plugins/taskwarrior/_task b/plugins/taskwarrior/_task index 5cc25315..afa30d45 100644 --- a/plugins/taskwarrior/_task +++ b/plugins/taskwarrior/_task @@ -1,9 +1,6 @@ #compdef task -# zsh completion for taskwarrior # -# taskwarrior - a command line task list manager. -# -# Copyright 2010 - 2011 Johannes Schlatow +# Copyright 2010 - 2015 Johannes Schlatow # Copyright 2009 P.C. Shyamshankar # # Permission is hereby granted, free of charge, to any person obtaining a copy @@ -30,31 +27,40 @@ typeset -g _task_cmds _task_projects _task_tags _task_config _task_modifiers _task_projects=($(task _projects)) _task_tags=($(task _tags)) _task_ids=($(task _ids)) +_task_zshids=( ${(f)"$(task _zshids)"} ) _task_config=($(task _config)) _task_columns=($(task _columns)) _task_modifiers=( - 'before' \ - 'after' \ - 'none' \ - 'any' \ - 'is' \ - 'isnt' \ - 'has' \ - 'hasnt' \ - 'startswith' \ - 'endswith' \ - 'word' \ - 'noword' + 'before' \ + 'after' \ + 'none' \ + 'any' \ + 'is' \ + 'isnt' \ + 'has' \ + 'hasnt' \ + 'startswith' \ + 'endswith' \ + 'word' \ + 'noword' ) _task_conjunctions=( - 'and' \ - 'or' \ - 'xor' \ - '\)' - '\(' + 'and' \ + 'or' \ + 'xor' \ + '\)' \ + '\(' \ + '<' \ + '<=' \ + '=' \ + '!=' \ + '>=' \ + '>' ) -_task_cmds=($(task _commands)) -_task_zshcmds=( ${(f)"$(task _zshcommands)"} ) +_task_cmds=($(task _commands; task _aliases)) +_task_zshcmds=( ${(f)"$(task _zshcommands)"} sentinel:sentinel:sentinel ) + +_task_aliases=($(task _aliases)) _task() { _arguments -s -S \ @@ -68,110 +74,130 @@ word=$'[^\0]#\0' # priorities local -a task_priorities _regex_words values 'task priorities' \ - 'H:High' \ - 'M:Middle' \ - 'L:Low' + 'H:High' \ + 'M:Middle' \ + 'L:Low' task_priorities=("$reply[@]") # projects local -a task_projects task_projects=( - /"$word"/ - ":values:task projects:compadd -a _task_projects" + /"$word"/ + ":values:task projects:compadd -a _task_projects" ) local -a _task_dates _regex_words values 'task dates' \ - 'tod*ay:Today' \ - 'yes*terday:Yesterday' \ - 'tom*orrow:Tomorrow' \ - 'sow:Start of week' \ - 'soww:Start of work week' \ - 'socw:Start of calendar week' \ - 'som:Start of month' \ - 'soy:Start of year' \ - 'eow:End of week' \ - 'eoww:End of work week' \ - 'eocw:End of calendar week' \ - 'eom:End of month' \ - 'eoy:End of year' \ - 'mon:Monday' \ - 'tue:Tuesday'\ - 'wed:Wednesday' \ - 'thu:Thursday' \ - 'fri:Friday' \ - 'sat:Saturday' \ - 'sun:Sunday' + 'tod*ay:Today' \ + 'yes*terday:Yesterday' \ + 'tom*orrow:Tomorrow' \ + 'sow:Start of week' \ + 'soww:Start of work week' \ + 'socw:Start of calendar week' \ + 'som:Start of month' \ + 'soq:Start of quarter' \ + 'soy:Start of year' \ + 'eow:End of week' \ + 'eoww:End of work week' \ + 'eocw:End of calendar week' \ + 'eom:End of month' \ + 'eoq:End of quarter' \ + 'eoy:End of year' \ + 'mon:Monday' \ + 'tue:Tuesday'\ + 'wed:Wednesday' \ + 'thu:Thursday' \ + 'fri:Friday' \ + 'sat:Saturday' \ + 'sun:Sunday' \ + 'good*friday:Good Friday' \ + 'easter:Easter' \ + 'eastermonday:Easter Monday' \ + 'ascension:Ascension' \ + 'pentecost:Pentecost' \ + 'midsommar:Midsommar' \ + 'midsommarafton:Midsommarafton' \ + 'later:Later' \ + 'someday:Some Day' _task_dates=("$reply[@]") local -a _task_reldates _regex_words values 'task reldates' \ - 'hrs:n hours' \ - 'day:n days' \ - '1st:first' \ - '2nd:second' \ - '3rd:third' \ - 'th:4th, 5th, etc.' \ - 'wks:weeks' + 'hrs:n hours' \ + 'day:n days' \ + '1st:first' \ + '2nd:second' \ + '3rd:third' \ + 'th:4th, 5th, etc.' \ + 'wks:weeks' _task_reldates=("$reply[@]") task_dates=( - \( "$_task_dates[@]" \| + \( "$_task_dates[@]" \| \( /$'[0-9][0-9]#'/- \( "$_task_reldates[@]" \) \) - \) + \) ) +local -a task_zshids +_regex_words values 'task IDs' $_task_zshids +task_zshids=("$reply[@]") + _regex_words values 'task frequencies' \ - 'daily:Every day' \ - 'day:Every day' \ - 'weekdays:Every day skipping weekend days' \ - 'weekly:Every week' \ - 'biweekly:Every two weeks' \ - 'fortnight:Every two weeks' \ -+ 'monthly:Every month' \ - 'quarterly:Every three months' \ - 'semiannual:Every six months' \ - 'annual:Every year' \ - 'yearly:Every year' \ - 'biannual:Every two years' \ - 'biyearly:Every two years' + 'daily:Every day' \ + 'day:Every day' \ + 'weekdays:Every day skipping weekend days' \ + 'weekly:Every week' \ + 'biweekly:Every two weeks' \ + 'fortnight:Every two weeks' \ + 'monthly:Every month' \ + 'quarterly:Every three months' \ + 'semiannual:Every six months' \ + 'annual:Every year' \ + 'yearly:Every year' \ + 'biannual:Every two years' \ + 'biyearly:Every two years' _task_freqs=("$reply[@]") local -a _task_frequencies _regex_words values 'task frequencies' \ - 'd:days' \ - 'w:weeks' \ - 'q:quarters' \ - 'y:years' + 'd:days' \ + 'w:weeks' \ + 'q:quarters' \ + 'y:years' _task_frequencies=("$reply[@]") task_freqs=( - \( "$_task_freqs[@]" \| + \( "$_task_freqs[@]" \| \( /$'[0-9][0-9]#'/- \( "$_task_frequencies[@]" \) \) - \) + \) ) # attributes local -a task_attributes _regex_words -t ':' default 'task attributes' \ - 'pro*ject:Project name:$task_projects' \ - 'du*e:Due date:$task_dates' \ - 'wa*it:Date until task becomes pending:$task_dates' \ - 're*cur:Recurrence frequency:$task_freqs' \ - 'pri*ority:priority:$task_priorities' \ - 'un*til:Recurrence end date:$task_dates' \ - 'fg:Foreground color' \ - 'bg:Background color' \ - 'li*mit:Desired number of rows in report' + 'des*cription:Task description text' \ + 'status:Status of task - pending, completed, deleted, waiting' \ + 'pro*ject:Project name:$task_projects' \ + 'pri*ority:priority:$task_priorities' \ + 'du*e:Due date:$task_dates' \ + 're*cur:Recurrence frequency:$task_freqs' \ + 'un*til:Expiration date:$task_dates' \ + 'li*mit:Desired number of rows in report' \ + 'wa*it:Date until task becomes pending:$task_dates' \ + 'ent*ry:Date task was created:$task_dates' \ + 'end:Date task was completed/deleted:$task_dates' \ + 'st*art:Date task was started:$task_dates' \ + 'sc*heduled:Date task is scheduled to start:$task_dates' \ + 'dep*ends:Other tasks that this task depends upon:$task_zshids' task_attributes=("$reply[@]") args=( - \( "$task_attributes[@]" \| - \( /'(project|due|wait|recur|priority|until|fg|bg|limit).'/- \( /$'[^:]#:'/ ":default:modifiers:compadd -S ':' -a _task_modifiers" \) \) \| - \( /'(rc).'/- \( /$'[^:]#:'/ ":arguments:config:compadd -S ':' -a _task_config" \) \) \| - \( /'(+|-)'/- \( /"$word"/ ":values:remove tag:compadd -a _task_tags" \) \) \| - \( /"$word"/ \) - \) \# + \( "$task_attributes[@]" \| + \( /'(project|description|status|entry|end|start|scheduled|depends|due|wait|recur|priority|until|limit).'/- \( /$'[^:]#:'/ ":default:modifiers:compadd -S ':' -a _task_modifiers" \) \) \| + \( /'(rc).'/- \( /$'[^:]#:'/ ":arguments:config:compadd -S ':' -a _task_config" \) \) \| + \( /'(+|-)'/- \( /"$word"/ ":values:remove tag:compadd -a _task_tags" \) \) \| + \( /"$word"/ \) + \) \# ) _regex_arguments _task_attributes "${args[@]}" @@ -180,43 +206,50 @@ _regex_arguments _task_attributes "${args[@]}" # filter completion (( $+functions[_task_filter] )) || _task_filter() { - _task_attributes "$@" + _task_attributes "$@" - # TODO complete conjunctions only if the previous word is a filter expression, i.e. attribute, ID, any non-command - _describe -t default 'task conjunctions' _task_conjunctions -} - -# merge completion -(( $+functions[_task_merge] )) || -_task_merge() { - # TODO match URIs in .taskrc - _files -} - -# push completion -(( $+functions[_task_push] )) || -_task_push() { - # TODO match URIs in .taskrc - _files -} - -# pull completion -(( $+functions[_task_pull] )) || -_task_pull() { - # TODO match URIs in .taskrc - _files + # TODO complete conjunctions only if the previous word is a filter expression, i.e. attribute, ID, any non-command + _describe -t default 'task conjunctions' _task_conjunctions } # execute completion (( $+functions[_task_execute] )) || _task_execute() { - _files + _files } # id-only completion (( $+functions[_task_id] )) || _task_id() { - _describe -t values 'task IDs' _task_zshids + _describe -t values 'task IDs' _task_zshids +} + +# subcommand-only function +(( $+functions[_task_subcommands] )) || +_task_subcommands() { + local -a subcommands + local _zshcmd + local cmd category desc + local lastcategory='' + # The list is sorted by category, in the right order. + for _zshcmd in "$_task_zshcmds[@]"; do + # Parse out the three fields + cmd=${_zshcmd%%:*} + category=${${_zshcmd#*:}%%:*} + desc=${_zshcmd#*:*:} + + # Present each category as soon as the first entry in the *next* category + # is seen. + if [[ $category != $lastcategory && -n $lastcategory ]]; then + _describe -t ${lastcategory}-commands "task ${lastcategory} command" subcommands + subcommands=() + fi + + # Log the subcommand; we will process it in some future iteration. + subcommands+=( "$cmd:$desc" ) + + lastcategory=$category + done } ## first level completion => task sub-command completion @@ -224,27 +257,28 @@ _task_id() { _task_default() { local cmd ret=1 - integer i=1 - while (( i < $#words )) - do - cmd="${_task_cmds[(r)$words[$i]]}" - if (( $#cmd )); then - _call_function ret _task_${cmd} || - _call_function ret _task_filter || - _message "No command remaining." - return ret - fi - (( i++ )) - done + integer i=1 + while (( i < $#words )) + do + cmd="${_task_cmds[(r)$words[$i]]}" + if (( $#cmd )); then + _call_function ret _task_${cmd} || + _call_function ret _task_filter || + _message "No command remaining." + return ret + fi + (( i++ )) + done - # update IDs - _task_zshids=( ${(f)"$(task _zshids)"} ) + # update IDs + _task_zshids=( ${(f)"$(task _zshids)"} ) - _describe -t commands 'task command' _task_zshcmds - _describe -t values 'task IDs' _task_zshids - _call_function ret _task_filter + _task_subcommands + _describe -t tasks 'task IDs' _task_zshids + _describe -t aliases 'task aliases' _task_aliases + _call_function ret _task_filter - return ret + return ret } -_task +_task "$@" From cbdad588e65f4205fcdc4e34e97b04fa7fdb5457 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Fri, 7 Aug 2015 18:56:57 +0200 Subject: [PATCH 161/183] Use zsh globbing instead of ls + grep in xc function Uses zsh arrays and globbing to find .xcworkspace and .xcodeproj files. --- plugins/xcode/xcode.plugin.zsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index 1d1205b8..4aa6bfc9 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -1,12 +1,12 @@ #xc function courtesy of http://gist.github.com/subdigital/5420709 function xc { - xcode_proj=`ls | grep "\.xc" | sort -r | head -1` - if [[ `echo -n $xcode_proj | wc -m` == 0 ]] - then + local xcode_proj + xcode_proj=(*.{xcworkspace,xcodeproj}(N)) + if [[ ${#xcode_proj} -eq 0 ]]; then echo "No xcworkspace/xcodeproj file found in the current directory." else - echo "Found $xcode_proj" - open "$xcode_proj" + echo "Found ${xcode_proj[1]}" + open "${xcode_proj[1]}" fi } From 6a830f39b68300cf86504f1c60d9ab77c09b7971 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Fri, 4 Sep 2015 01:43:48 +0200 Subject: [PATCH 162/183] Return error if no xcode files where found --- plugins/xcode/xcode.plugin.zsh | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index 4aa6bfc9..274bd92e 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -2,8 +2,10 @@ function xc { local xcode_proj xcode_proj=(*.{xcworkspace,xcodeproj}(N)) + if [[ ${#xcode_proj} -eq 0 ]]; then echo "No xcworkspace/xcodeproj file found in the current directory." + return 1 else echo "Found ${xcode_proj[1]}" open "${xcode_proj[1]}" From 24bdd8e29a344f0282b842f89a4a10f145344939 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Fri, 7 Aug 2015 19:04:26 +0200 Subject: [PATCH 163/183] Replace xcsel function with just an alias --- plugins/xcode/xcode.plugin.zsh | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index 274bd92e..059c78fd 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -12,10 +12,7 @@ function xc { fi } -function xcsel { - sudo xcode-select --switch "$*" -} - +alias xcsel='sudo xcode-select --switch' alias xcb='xcodebuild' alias xcp='xcode-select --print-path' alias xcdd='rm -rf ~/Library/Developer/Xcode/DerivedData/*' From ec3694c788d2b32eb1735687cf89b057d4ca4d4d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Fri, 4 Sep 2015 22:08:57 +0200 Subject: [PATCH 164/183] Make simulator dependant of currently active dev directory This also gets rid of `xcode-select` command-not-found errors. --- plugins/xcode/xcode.plugin.zsh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index 059c78fd..f80de36d 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -17,8 +17,15 @@ 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' -else - alias simulator='open $(xcode-select -p)/Applications/iOS\ Simulator.app' -fi +function simulator { + local devfolder + devfolder="$(xcode-select -p)" + + # Xcode ≤ 5.x + if [[ -d "${devfolder}/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app" ]]; then + open "${devfolder}/Platforms/iPhoneSimulator.platform/Developer/Applications/iPhone Simulator.app" + # Xcode ≥ 6.x + else + open "${devfolder}/Applications/iOS Simulator.app" + fi +} From d95589d4e43d3a6288b8a66492c17d12c4e4eca0 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Sat, 5 Sep 2015 23:17:38 +0200 Subject: [PATCH 165/183] Add README for the xcode plugin --- plugins/xcode/README.md | 31 +++++++++++++++++++++++++++++++ 1 file changed, 31 insertions(+) create mode 100644 plugins/xcode/README.md diff --git a/plugins/xcode/README.md b/plugins/xcode/README.md new file mode 100644 index 00000000..b8efef38 --- /dev/null +++ b/plugins/xcode/README.md @@ -0,0 +1,31 @@ +# Xcode + +## Description + +This plugin provides a few utilities that can help you on your daily use of Xcode and iOS development. + +To start using it, add the `xcode` plugin to your `plugins` array: + +```zsh +plugins=(... xcode) +``` + + +## Aliases + +| Alias | Description | Command | +|-------|---------------------------------------|------------------------------------------------| +| xcsel | Change active developer directory | sudo xcode-select --switch | +| xcp | Show currently active dev. directory | xcode-select --print-path | +| xcb | Build Xcode projects and workspaces | xcodebuild | +| xcdd | Purge all temporary build information | rm -rf ~/Library/Developer/Xcode/DerivedData/* | + + +## Functions + +- **`xc`**: + Open one of the `.xcworkspace` and `.xcodeproj` files that it can find in the current working directory. + Returns 1 if it didn't find any relevant files. + +- **`simulator`**: + Open the iOS Simulator from your command line, dependant on whichever is the active developer directory for Xcode. From 5584aa05c7c94949665f024ad0d88b8162654cb9 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Fri, 4 Sep 2015 17:17:16 -0400 Subject: [PATCH 166/183] xcode: add version-based xcselv() --- plugins/xcode/xcode.plugin.zsh | 29 +++++++++++++++++++++++++++++ 1 file changed, 29 insertions(+) diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index f80de36d..b3058cef 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -17,6 +17,35 @@ alias xcb='xcodebuild' alias xcp='xcode-select --print-path' alias xcdd='rm -rf ~/Library/Developer/Xcode/DerivedData/*' + +# "XCode-SELect by Version" - select Xcode by just version number +# Uses naming convention: +# - different versions of Xcode are named Xcode-.app or stored +# in a folder named Xcode- +# - the special version name "-" refers to the "default" Xcode.app with no suffix +function xcselv { + emulate -L zsh + local version=$1 + local apps_dirs apps_dir apps app + apps_dirs=( $HOME/Applications /Applications ) + for apps_dir ($apps_dirs); do + if [[ $version == "-" ]]; then + apps=( $apps_dir/Xcode.app $apps_dir/Xcode/Xcode.app ) + else + apps=( $apps_dir/Xcode-$version.app $apps_dir/Xcode-$version/Xcode.app ) + fi + for app ($apps); do + if [[ -e "$app" ]]; then + echo "selecting Xcode $version: $app" + xcsel "$app" + return + fi + done + done + echo "xcselv: Xcode version $version not found" + return 1 +} + function simulator { local devfolder devfolder="$(xcode-select -p)" From 213f46a296bd76031eb6a2fa66c72efeb912481d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Mon, 7 Sep 2015 12:08:50 +0200 Subject: [PATCH 167/183] Add xcselv documentation in the README --- plugins/xcode/README.md | 16 ++++++++++------ 1 file changed, 10 insertions(+), 6 deletions(-) diff --git a/plugins/xcode/README.md b/plugins/xcode/README.md index b8efef38..362940b9 100644 --- a/plugins/xcode/README.md +++ b/plugins/xcode/README.md @@ -13,12 +13,13 @@ plugins=(... xcode) ## Aliases -| Alias | Description | Command | -|-------|---------------------------------------|------------------------------------------------| -| xcsel | Change active developer directory | sudo xcode-select --switch | -| xcp | Show currently active dev. directory | xcode-select --print-path | -| xcb | Build Xcode projects and workspaces | xcodebuild | -| xcdd | Purge all temporary build information | rm -rf ~/Library/Developer/Xcode/DerivedData/* | +| Alias | Description | Command | +|-------|------------------------------------------|------------------------------------------------| +| xcb | Build Xcode projects and workspaces | xcodebuild | +| xcdd | Purge all temporary build information | rm -rf ~/Library/Developer/Xcode/DerivedData/* | +| xcp | Show currently selected Xcode directory | xcode-select --print-path | +| xcsel | Select different Xcode directory by path | sudo xcode-select --switch | + ## Functions @@ -29,3 +30,6 @@ plugins=(... xcode) - **`simulator`**: Open the iOS Simulator from your command line, dependant on whichever is the active developer directory for Xcode. + +- **`xcselv`**: + Select different Xcode by version. Example: `xcselv 6.2` From 82ae41ca4cf4fac253294f17b33b0c718755ffc5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc=20Cornell=C3=A0?= Date: Mon, 7 Sep 2015 12:09:08 +0200 Subject: [PATCH 168/183] Reorder xcode plugin file --- plugins/xcode/xcode.plugin.zsh | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index b3058cef..1f547470 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -1,4 +1,10 @@ -#xc function courtesy of http://gist.github.com/subdigital/5420709 +alias xcb='xcodebuild' +alias xcdd='rm -rf ~/Library/Developer/Xcode/DerivedData/*' +alias xcp='xcode-select --print-path' +alias xcsel='sudo xcode-select --switch' + +# original author: @subdigital +# source: http://gist.github.com/subdigital/5420709 function xc { local xcode_proj xcode_proj=(*.{xcworkspace,xcodeproj}(N)) @@ -12,12 +18,6 @@ function xc { fi } -alias xcsel='sudo xcode-select --switch' -alias xcb='xcodebuild' -alias xcp='xcode-select --print-path' -alias xcdd='rm -rf ~/Library/Developer/Xcode/DerivedData/*' - - # "XCode-SELect by Version" - select Xcode by just version number # Uses naming convention: # - different versions of Xcode are named Xcode-.app or stored From 9e9b790fe1e3150b36bb1e01b432f5b38e52b512 Mon Sep 17 00:00:00 2001 From: Ilia Choly Date: Tue, 8 Sep 2015 17:34:39 -0400 Subject: [PATCH 169/183] golang: improve go doc completion --- plugins/golang/golang.plugin.zsh | 36 +++++++++++++++++++--------- plugins/golang/templates/package.txt | 29 ++++++++++++++++++++++ plugins/golang/templates/search.txt | 0 3 files changed, 54 insertions(+), 11 deletions(-) create mode 100644 plugins/golang/templates/package.txt create mode 100644 plugins/golang/templates/search.txt diff --git a/plugins/golang/golang.plugin.zsh b/plugins/golang/golang.plugin.zsh index 900fc630..4e6ca0a9 100644 --- a/plugins/golang/golang.plugin.zsh +++ b/plugins/golang/golang.plugin.zsh @@ -54,23 +54,37 @@ __go_tool_complete() { '-installsuffix[suffix to add to package directory]:suffix' '-tags[list of build tags to consider satisfied]:tags' ) - __go_list() { - local expl importpaths - declare -a importpaths - importpaths=($(go list ${words[$CURRENT]}... 2>/dev/null)) - _wanted importpaths expl 'import paths' compadd "$@" - "${importpaths[@]}" + __go_packages() { + _path_files -W "$(go env GOROOT)/src" -/ + _path_files -W "$(go env GOPATH)/src" -/ + } + __go_identifiers() { + compadd $(godoc -templates $ZSH/plugins/golang/templates ${words[-2]} 2> /dev/null) } case ${words[2]} in - clean|doc) - _arguments -s -w : '*:importpaths:__go_list' + doc) + _arguments -s -w \ + "-c[symbol matching honors case (paths not affected)]" \ + "-cmd[show symbols with package docs even if package is a command]" \ + "-u[show unexported symbols as well as exported]" \ + "2:importpaths:__go_packages" \ + ":next identifiers:__go_identifiers" + ;; + clean) + _arguments -s -w \ + "-i[remove the corresponding installed archive or binary (what 'go install' would create)]" \ + "-n[print the remove commands it would execute, but not run them]" \ + "-r[apply recursively to all the dependencies of the packages named by the import paths]" \ + "-x[print remove commands as it executes them]" \ + "*:importpaths:__go_packages" ;; fix|fmt|list|vet) - _alternative ':importpaths:__go_list' ':files:_path_files -g "*.go"' + _alternative ':importpaths:__go_packages' ':files:_path_files -g "*.go"' ;; install) _arguments -s -w : ${build_flags[@]} \ "-v[show package names]" \ - '*:importpaths:__go_list' + '*:importpaths:__go_packages' ;; get) _arguments -s -w : \ @@ -81,7 +95,7 @@ __go_tool_complete() { ${build_flags[@]} \ "-v[show package names]" \ "-o[output file]:file:_files" \ - "*:args:{ _alternative ':importpaths:__go_list' ':files:_path_files -g \"*.go\"' }" + "*:args:{ _alternative ':importpaths:__go_packages' ':files:_path_files -g \"*.go\"' }" ;; test) _arguments -s -w : \ @@ -103,7 +117,7 @@ __go_tool_complete() { "-cpuprofile[write CPU profile to file]:file:_files" \ "-memprofile[write heap profile to file]:file:_files" \ "-memprofilerate[set heap profiling rate]:number" \ - "*:args:{ _alternative ':importpaths:__go_list' ':files:_path_files -g \"*.go\"' }" + "*:args:{ _alternative ':importpaths:__go_packages' ':files:_path_files -g \"*.go\"' }" ;; help) _values "${commands[@]}" \ diff --git a/plugins/golang/templates/package.txt b/plugins/golang/templates/package.txt new file mode 100644 index 00000000..2b75cce3 --- /dev/null +++ b/plugins/golang/templates/package.txt @@ -0,0 +1,29 @@ +{{with .PDoc}}{{/* + +Constants +--------------------------------------- + +*/}}{{with .Consts}}{{range .}}{{range .Names}}{{.}} {{end}}{{end}}{{end}}{{/* + +Variables +--------------------------------------- + +*/}}{{with .Vars}}{{range .}}{{range .Names}}{{.}} {{end}}{{end}}{{end}}{{/* + +Functions +--------------------------------------- + +*/}}{{with .Funcs}}{{range .}}{{ .Name }} {{end}}{{end}}{{/* + +Types +--------------------------------------- + +*/}}{{with .Types}}{{range .}}{{ $TypeName := .Name }}{{ $TypeName }} {{/* + +*/}}{{range .Methods}}{{ $TypeName }}.{{.Name}} {{end}}{{/* + +*/}}{{range .Funcs}}{{.Name}} {{end}}{{/* + +*/}}{{range .Consts}}{{range .Names}}{{.}} {{end}}{{end}}{{/* + +*/}}{{range .Vars}}{{range .Names}}{{.}} {{end}}{{end}}{{end}}{{end}}{{end}} diff --git a/plugins/golang/templates/search.txt b/plugins/golang/templates/search.txt new file mode 100644 index 00000000..e69de29b From 953e4d892631f93e31cfdfb72199fb8f413c6b49 Mon Sep 17 00:00:00 2001 From: Ben Klein Date: Thu, 10 Sep 2015 22:19:53 -0400 Subject: [PATCH 170/183] Make Linux compatible Just an if/else to determine if we're OSX or Linux and alias `at` appropriately. --- plugins/atom/atom.plugin.zsh | 32 ++++++++++++++++++++------------ 1 file changed, 20 insertions(+), 12 deletions(-) diff --git a/plugins/atom/atom.plugin.zsh b/plugins/atom/atom.plugin.zsh index 9adb9031..ec1a114e 100644 --- a/plugins/atom/atom.plugin.zsh +++ b/plugins/atom/atom.plugin.zsh @@ -1,14 +1,22 @@ -local _atom_paths > /dev/null 2>&1 -_atom_paths=( - "$HOME/Applications/Atom.app" - "/Applications/Atom.app" -) +# Gets OS Type +unamestr=$(uname -s) -for _atom_path in $_atom_paths; do - if [[ -a $_atom_path ]]; then - alias at="open -a '$_atom_path'" - break - fi -done +# If OSX +if [[ "$unamestr" == 'Darwin' ]]; then + local _atom_paths > /dev/null 2>&1 + _atom_paths=( + "$HOME/Applications/Atom.app" + "/Applications/Atom.app" + ) -alias att='at .' + for _atom_path in $_atom_paths; do + if [[ -a $_atom_path ]]; then + alias at="open -a '$_atom_path'" + break + fi + done +# If Linux +elif [[ "$unamestr" == 'Linux' ]]; then + # Alerts the user if 'atom' is not a found command. + type atom >/dev/null 2>&1 && alias at="atom" || { echo >&2 "You have enabled the atom oh-my-zsh plugin on Linux, but atom is not a recognized command. Please make sure you have it installed before using this plugin."; } +fi From dca429557aef7b700ae2f1088115a707af78a31b Mon Sep 17 00:00:00 2001 From: Ben Klein Date: Thu, 10 Sep 2015 22:22:00 -0400 Subject: [PATCH 171/183] Make Readme much clearer and explain edits. Also added some examples, but those should be mostly self-explanatory. --- plugins/atom/README.md | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/plugins/atom/README.md b/plugins/atom/README.md index 75d77a0a..6350c647 100644 --- a/plugins/atom/README.md +++ b/plugins/atom/README.md @@ -1,6 +1,8 @@ ## atom -Plugin for Atom, a cross platform text and code editor, available for Linux, Mac OS X, and Windows. +This plugin makes "at" a useful function for invoking the Atom Editor. + +Originally by Github user [aforty](https://github.com/aforty) for OSX, modified to alias 'at' to 'atom' for Linux, since atom already works on the terminal for Linux, and calling 'at' in a non-OSX environment should still work. ### Requirements @@ -10,8 +12,12 @@ Plugin for Atom, a cross platform text and code editor, available for Linux, Mac * 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 directory, 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 +### Examples + + * Open the current dir in atom: `at .` + * Open another dir in atom: `at path/to/folder` + * Open a file: `at filename.extension` From 36fea45bfc564c667007421a643df38c02235c8b Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Fri, 11 Sep 2015 03:11:01 -0400 Subject: [PATCH 172/183] svn plugin: urldecode repo info The repo location reported by `svn` is a URL. If you don't decode it before using it a prompt, the `%` sequences will be misinterpreted by prompt expansion and give screwy results. Fixes #2233 --- plugins/svn/svn.plugin.zsh | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/plugins/svn/svn.plugin.zsh b/plugins/svn/svn.plugin.zsh index 9f7a4c6e..816055af 100644 --- a/plugins/svn/svn.plugin.zsh +++ b/plugins/svn/svn.plugin.zsh @@ -1,16 +1,17 @@ # vim:ft=zsh ts=2 sw=2 sts=2 # function svn_prompt_info() { + local _DISPLAY if in_svn; then if [ "x$SVN_SHOW_BRANCH" = "xtrue" ]; then unset SVN_SHOW_BRANCH _DISPLAY=$(svn_get_branch_name) else _DISPLAY=$(svn_get_repo_name) + _DISPLAY=$(omz_urldecode "${_DISPLAY}") fi echo "$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_SVN_PROMPT_PREFIX\ $ZSH_THEME_REPO_NAME_COLOR$_DISPLAY$ZSH_PROMPT_BASE_COLOR$ZSH_THEME_SVN_PROMPT_SUFFIX$ZSH_PROMPT_BASE_COLOR$(svn_dirty)$(svn_dirty_pwd)$ZSH_PROMPT_BASE_COLOR" - unset _DISPLAY fi } @@ -30,7 +31,7 @@ function svn_get_repo_name() { } function svn_get_branch_name() { - _DISPLAY=$( + local _DISPLAY=$( svn info 2> /dev/null | \ awk -F/ \ '/^URL:/ { \ @@ -49,7 +50,6 @@ function svn_get_branch_name() { else echo $_DISPLAY fi - unset _DISPLAY } function svn_get_rev_nr() { @@ -60,7 +60,7 @@ function svn_get_rev_nr() { function svn_dirty_choose() { if in_svn; then - root=`svn info 2> /dev/null | sed -n 's/^Working Copy Root Path: //p'` + local root=`svn info 2> /dev/null | sed -n 's/^Working Copy Root Path: //p'` if $(svn status $root 2> /dev/null | command grep -Eq '^\s*[ACDIM!?L]'); then # Grep exits with 0 when "One or more lines were selected", return "dirty". echo $1 @@ -77,7 +77,7 @@ function svn_dirty() { function svn_dirty_choose_pwd () { if in_svn; then - root=$PWD + local root=$PWD if $(svn status $root 2> /dev/null | command grep -Eq '^\s*[ACDIM!?L]'); then # Grep exits with 0 when "One or more lines were selected", return "dirty". echo $1 From 22287d0153047cf5d5872d294202d9ce35e8eac8 Mon Sep 17 00:00:00 2001 From: Ilia Choly Date: Fri, 11 Sep 2015 12:20:26 -0400 Subject: [PATCH 173/183] handle multiple paths in GOPATH --- plugins/golang/golang.plugin.zsh | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/plugins/golang/golang.plugin.zsh b/plugins/golang/golang.plugin.zsh index 4e6ca0a9..1ce3cea5 100644 --- a/plugins/golang/golang.plugin.zsh +++ b/plugins/golang/golang.plugin.zsh @@ -55,8 +55,13 @@ __go_tool_complete() { '-tags[list of build tags to consider satisfied]:tags' ) __go_packages() { - _path_files -W "$(go env GOROOT)/src" -/ - _path_files -W "$(go env GOPATH)/src" -/ + local gopaths + declare -a gopaths + gopaths=("${(s/:/)$(go env GOPATH)}") + gopaths+=("$(go env GOROOT)") + for p in $gopaths; do + _path_files -W "$p/src" -/ + done } __go_identifiers() { compadd $(godoc -templates $ZSH/plugins/golang/templates ${words[-2]} 2> /dev/null) From 6642a99fac11dd4e10869566f1d38761f1e8746c Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Thu, 10 Sep 2015 01:48:24 -0400 Subject: [PATCH 174/183] xcode: extend xcselv to list versions and do completion --- plugins/xcode/README.md | 65 ++++++++++++-- plugins/xcode/_xcselv | 19 +++++ plugins/xcode/xcode.plugin.zsh | 151 ++++++++++++++++++++++++++++++--- 3 files changed, 214 insertions(+), 21 deletions(-) create mode 100644 plugins/xcode/_xcselv diff --git a/plugins/xcode/README.md b/plugins/xcode/README.md index 362940b9..15e65785 100644 --- a/plugins/xcode/README.md +++ b/plugins/xcode/README.md @@ -4,7 +4,7 @@ This plugin provides a few utilities that can help you on your daily use of Xcode and iOS development. -To start using it, add the `xcode` plugin to your `plugins` array: +To start using it, add the `xcode` plugin to your `plugins` array in `~/.zshrc`: ```zsh plugins=(... xcode) @@ -24,12 +24,61 @@ plugins=(... xcode) ## Functions -- **`xc`**: - Open one of the `.xcworkspace` and `.xcodeproj` files that it can find in the current working directory. - Returns 1 if it didn't find any relevant files. +### `xc` -- **`simulator`**: - Open the iOS Simulator from your command line, dependant on whichever is the active developer directory for Xcode. +Opens the current directory in Xcode as an Xcode project. This will open one of the `.xcworkspace` and `.xcodeproj` files that it can find in the current working directory. +Returns 1 if it didn't find any relevant files. -- **`xcselv`**: - Select different Xcode by version. Example: `xcselv 6.2` +### `simulator` + +Opens the iOS Simulator from your command line, dependent on whichever is the active developer directory for Xcode. (That is, it respects the `xcsel` setting.) + +### `xcselv` + +Selects different Xcode installations by version name. This is like `xcsel`, except it takes just a version name as an argument instead of the full path to the Xcode installation. Uses the naming conventions described below. + +* `xcselv ` selects a version + * Example: `xcselv 6.2` +* `xcselv default` selects the default unversioned `Applications/Xcode.app` +* `xcselv` with no argument lists the available Xcode versions in a human-readable format +* `xcselv -l` lists the installed Xcode versions +* `xcselv -L` lists the installed Xcode versions in a short version-name-only format +* `xcselv -p` prints info about the active Xcode version +* `xcselv -h` prints a help message + +The option parsing for `xcselv` is naive. Options may not be combined, and only the first option is recognized. + +## Multiple Xcode Versions + +The `xcselv` command provides support for switching between different Xcode installations using just a version number. Different Xcode versions are identified by file naming conventions. + +### Versioned Xcode Naming Conventions + +Apple does not seem to explicitly define or provide tooling support for a naming convention or other organizational mechanism for managing versioned Xcode installations. Apple seems to have released beta versions with both `Xcode.app` and `Xcode-.app` style names in the past, and both styles show up in forum and blog discussions. + +We've adopted the following naming convention: + +* Versioned Xcode installations are identified by the name `Xcode-` or `Xcode`. +* The `-` separating `"Xcode"` and the version name is optional, and may be replaced by a space. +* The versioned name may be applied to the `Xcode.app` itself, or a subdirectory underneath `Applications/` containing it. +* You cannot version both the `Xcode.app` filename itself and the containing subfolder. +* Thus, all of the following are equivalent. + * `Applications/Xcode-.app` + * `Applications/Xcode-/Xcode.app` + * `Applications/Xcode.app` + * `Applications/Xcode .app` + * `Applications/Xcode /Xcode.app` +* Both the system `/Applications/` and user `$HOME/Applications/` directories are searched. + * The user's `$HOME/Applications/` takes precedence over `/Applications` for a given version. + * If multiple naming variants within the same `Applications/` folder indicate the same version (for example, `Xcode-3.2.1.app`, `Xcode3.2.1.app`, and `Xcode-3.2.1/Xcode.app`), the precedence order is unspecified and implementation-dependent. +* The `` may be any string that is valid in a filename. +* The special version name `"default"` refers to the "default" unversioned Xcode at `Applications/Xcode.app` (in either `/Applications/` or `$HOME/Applications/`). +* Version names may not start with ``"-"`` or whitespace. + +The restrictions on the naming convention may need to be tightened in the future. In particular, if there are other well-known applications whose names begin with the string `"Xcode"`, the strings allowed for `` may need to be restricted to avoid colliding with other applications. If there's evidence that one of these naming techniques is strongly favored either in practice or by Apple, we may tighten the naming convention to favor it. + +## Caveats + +Using `xcsel` or `xcselv` to select an Xcode that is installed under your `$HOME` may break things for other users, depending on your system setup. We let you do this anyway because some people run OS X as effectively single-user, or have open permissions so this will work. You could also use `$DEVELOPER_DIR` as an alternative to `xcsel` that is scoped to the current user or session, instead of a global setting. + +This does not verify that the version name in the Xcode filename matches the actual version of that binary. It is the user's responsibility to get the names right. diff --git a/plugins/xcode/_xcselv b/plugins/xcode/_xcselv new file mode 100644 index 00000000..f9861d54 --- /dev/null +++ b/plugins/xcode/_xcselv @@ -0,0 +1,19 @@ +#compdef xcselv +#autoload + +function _xcselv_compl_list_versions() { + _omz_xcode_list_versions short +} + +_arguments \ + '(-l -L -p)-h[prints a help message]' \ + '(-L -p -h)-l[lists installed Xcode versions]' \ + '(-l -p -h)-L[lists installed Xcode versions (long form)]' \ + '(-h -l -L)-p[prints active Xcode version]' \ + && ret=0 + +local _xcode_versions +_xcode_versions=($(_xcselv_compl_list_versions)) +_describe -t _xcode_versions 'version' _xcode_versions + +return 1 diff --git a/plugins/xcode/xcode.plugin.zsh b/plugins/xcode/xcode.plugin.zsh index 1f547470..b63a857a 100644 --- a/plugins/xcode/xcode.plugin.zsh +++ b/plugins/xcode/xcode.plugin.zsh @@ -22,28 +22,153 @@ function xc { # Uses naming convention: # - different versions of Xcode are named Xcode-.app or stored # in a folder named Xcode- -# - the special version name "-" refers to the "default" Xcode.app with no suffix +# - the special version name "default" refers to the "default" Xcode.app with no suffix function xcselv { emulate -L zsh + if [[ $# == 0 ]]; then + echo "xcselv: error: no option or argument given" >&2 + echo "xcselv: see 'xcselv -h' for help" >&2 + return 1 + elif [[ $1 == "-p" ]]; then + _omz_xcode_print_active_version + return + elif [[ $1 == "-l" ]]; then + _omz_xcode_list_versions + return + elif [[ $1 == "-L" ]]; then + _omz_xcode_list_versions short + return + elif [[ $1 == "-h" ]]; then + _omz_xcode_print_xcselv_usage + return 0 + elif [[ $1 == -* && $1 != "-" ]]; then + echo "xcselv: error: unrecognized option: $1" >&2 + echo "xcselv: see 'xcselv -h' for help" >&2 + return 1 + fi + # Main case: "xcselv " to select a version local version=$1 - local apps_dirs apps_dir apps app - apps_dirs=( $HOME/Applications /Applications ) - for apps_dir ($apps_dirs); do - if [[ $version == "-" ]]; then - apps=( $apps_dir/Xcode.app $apps_dir/Xcode/Xcode.app ) + local -A xcode_versions + _omz_xcode_locate_versions + if [[ -z ${xcode_versions[$version]} ]]; then + echo "xcselv: error: Xcode version '$version' not found" >&2 + return 1 + fi + app="${xcode_versions[$version]}" + echo "selecting Xcode $version: $app" + xcsel "$app" +} + +function _omz_xcode_print_xcselv_usage { + cat << EOF >&2 +Usage: + xcselv + xcselv [options] + +Options: + set the active Xcode version + -h print this help message and exit + -p print the active Xcode version + -l list installed Xcode versions (long human-readable form) + -L list installed Xcode versions (short form, version names only) +EOF +} + +# Parses the Xcode version from a filename based on our conventions +# Only meaningful when called from other _omz_xcode functions +function _omz_xcode_parse_versioned_file { + local file=$1 + local basename=${app:t} + local dir=${app:h} + local parent=${dir:t} + #echo "parent=$parent basename=$basename verstr=$verstr ver=$ver" >&2 + local verstr + if [[ $parent == Xcode* ]]; then + if [[ $basename == "Xcode.app" ]]; then + # "Xcode-/Xcode.app" format + verstr=$parent else - apps=( $apps_dir/Xcode-$version.app $apps_dir/Xcode-$version/Xcode.app ) + # Both file and parent dir are versioned. Reject. + return 1; fi + elif [[ $basename == Xcode*.app ]]; then + # "Xcode-.app" format + verstr=${basename:r} + else + # Invalid naming pattern + return 1; + fi + + local ver=${verstr#Xcode} + ver=${ver#[- ]} + if [[ -z $ver ]]; then + # Unversioned "default" installation location + ver="default" + fi + print -- "$ver" +} + +# Print the active version, using xcselv's notion of versions +function _omz_xcode_print_active_version { + emulate -L zsh + local -A xcode_versions + local versions version active_path + _omz_xcode_locate_versions + active_path=$(xcode-select -p) + active_path=${active_path%%/Contents/Developer*} + versions=(${(kni)xcode_versions}) + for version ($versions); do + if [[ "${xcode_versions[$version]}" == $active_path ]]; then + printf "%s (%s)\n" $version $active_path + return + fi + done + printf "%s (%s)\n" "" $active_path +} + +# Locates all the installed versions of Xcode on this system, for this +# plugin's internal use. +# Populates the $xcode_versions associative array variable +# Caller should local-ize $xcode_versions with `local -A xcode_versions` +function _omz_xcode_locate_versions { + emulate -L zsh + local -a app_dirs + local app_dir apps app xcode_ver + # In increasing precedence order: + app_dirs=(/Applications $HOME/Applications) + for app_dir ($app_dirs); do + apps=( $app_dir/Xcode*.app(N) $app_dir/Xcode*/Xcode.app(N) ) for app ($apps); do - if [[ -e "$app" ]]; then - echo "selecting Xcode $version: $app" - xcsel "$app" - return + xcode_ver=$(_omz_xcode_parse_versioned_file $app) + if [[ $? != 0 ]]; then + continue fi + xcode_versions[$xcode_ver]=$app done done - echo "xcselv: Xcode version $version not found" - return 1 +} + +function _omz_xcode_list_versions { + emulate -L zsh + local -A xcode_versions + _omz_xcode_locate_versions + local width=1 width_i versions do_short=0 + if [[ $1 == "short" ]]; then + do_short=1 + fi + versions=(${(kni)xcode_versions}) + for version ($versions); do + if [[ $#version > $width ]]; then + width=$#version; + fi + done + for version ($versions); do + if [[ $do_short == 1 ]]; then + printf "%s\n" $version + else + printf "%-${width}s -> %s\n" "$version" "${xcode_versions[$version]}" + fi + done } function simulator { From c9af79fcad9af8e4f2fd102336e7b0ffc1df0336 Mon Sep 17 00:00:00 2001 From: Andrew Janke Date: Fri, 11 Sep 2015 18:37:39 -0400 Subject: [PATCH 175/183] jira: add README, "emulate -L zsh", add "dumpconfig" action (The "dumpconfig" action is for verifying the configuration behavior against what's documented in the README now.) add "error" to some of the error messages --- plugins/jira/README.md | 64 ++++++++++++++++++++++++++++++++++++ plugins/jira/_jira | 1 + plugins/jira/jira.plugin.zsh | 44 ++++++++----------------- 3 files changed, 79 insertions(+), 30 deletions(-) create mode 100644 plugins/jira/README.md diff --git a/plugins/jira/README.md b/plugins/jira/README.md new file mode 100644 index 00000000..efb8a743 --- /dev/null +++ b/plugins/jira/README.md @@ -0,0 +1,64 @@ +# Jira plugin # + +CLI support for JIRA interaction + +## Description ## + +This plugin provides command line tools for interacting with Atlassian's [JIRA](https://www.atlassian.com/software/jira) bug tracking software. + +The interaction is all done through the web. No local installation of JIRA is necessary. + +In this document, "JIRA" refers to the JIRA issue tracking server, and `jira` refers to the command this plugin supplies. + +## Usage ## + +This plugin supplies one command, `jira`, through which all its features are exposed. Most forms of this command open a JIRA page in your web browser. + +``` +jira # performs the default action + +jira new # opens a new issue +jira dashboard # opens your JIRA dashboard +jira reported [username] # queries for issues reported by a user +jira assigned [username] # queries for issues assigned to a user +jira ABC-123 # opens an existing issue +jira ABC-123 m # opens an existing issue for adding a comment +``` + +#### Debugging usage #### + +These calling forms are for developers' use, and may change at any time. + +``` +jira dumpconfig # displays the effective configuration +``` + +## Setup ## + +The URL for your JIRA instance is set by `$JIRA_URL` or a `.jira_url` file. + +Add a `.jira-url` file in the base of your project. You can also set `$JIRA_URL` in your `~/.zshrc` or put a `.jira-url` in your home directory. A `.jira-url` in the current directory takes precedence, so you can make per-project customizations. + +The same goes with `.jira-prefix` and `$JIRA_PREFIX`. These control the prefix added to all issue IDs, which differentiates projects within a JIRA instance. + +For example: + +``` +cd to/my/project +echo "https://jira.atlassian.com" >> .jira-url +``` + +(Note: The current implementation only looks in the current directory for `.jira-url` and `.jira-prefix`, not up the path, so if you are in a subdirectory of your project, it will fall back to your default JIRA URL. This will probably change in the future though.) + +### Variables ### + +* `$JIRA_URL` - Your JIRA instance's URL +* `$JIRA_NAME` - Your JIRA username; used as the default user for `assigned`/`reported` searches +* `$JIRA_PREFIX` - Prefix added to issue ID arguments +* `$JIRA_RAPID_BOARD` - Set to `true` if you use Rapid Board +* `$JIRA_DEFAULT_ACTION` - Action to do when `jira` is called with no arguments; defaults to "new" + + +### Browser ### + +Your default web browser, as determined by how `open_command` handles `http://` URLs, is used for interacting with the JIRA instance. If you change your system's URL handler associations, it will change the browser that `jira` uses. diff --git a/plugins/jira/_jira b/plugins/jira/_jira index b0ea658e..03fe6a49 100644 --- a/plugins/jira/_jira +++ b/plugins/jira/_jira @@ -7,6 +7,7 @@ _1st_arguments=( 'dashboard:open the dashboard' 'reported:search for issues reported by a user' 'assigned:search for issues assigned to a user' + 'dumpconfig:display effective jira configuration' ) _arguments -C \ diff --git a/plugins/jira/jira.plugin.zsh b/plugins/jira/jira.plugin.zsh index 89559767..341e23ec 100644 --- a/plugins/jira/jira.plugin.zsh +++ b/plugins/jira/jira.plugin.zsh @@ -1,35 +1,11 @@ # CLI support for JIRA interaction # -# Setup: -# Add a .jira-url file in the base of your project -# You can also set $JIRA_URL in your .zshrc or put .jira-url in your home directory -# A .jira-url in the current directory takes precedence. -# The same goes with .jira-prefix and $JIRA_PREFIX. -# -# For example: -# cd to/my/project -# echo "https://name.jira.com" >> .jira-url -# -# Variables: -# $JIRA_RAPID_BOARD - set to "true" if you use Rapid Board -# $JIRA_DEFAULT_ACTION - action to do when `jira` is called witn no args -# defaults to "new" -# $JIRA_NAME - Your JIRA username. Used as default for assigned/reported -# $JIRA_PREFIX - Prefix added to issue ID arguments -# -# -# Usage: -# jira # Performs the default action -# jira new # opens a new issue -# jira reported [username] -# jira assigned [username] -# jira dashboard -# jira ABC-123 # Opens an existing issue -# jira ABC-123 m # Opens an existing issue for adding a comment +# See README.md for details : ${JIRA_DEFAULT_ACTION:=new} function jira() { + emulate -L zsh local action=${1:=$JIRA_DEFAULT_ACTION} local jira_url jira_prefix @@ -63,6 +39,12 @@ function jira() { elif [[ "$action" == "dashboard" ]]; then echo "Opening dashboard" open_command "${jira_url}/secure/Dashboard.jspa" + elif [[ "$action" == "dumpconfig" ]]; then + echo "JIRA_URL=$jira_url" + echo "JIRA_PREFIX=$jira_prefix" + echo "JIRA_NAME=$JIRA_NAME" + echo "JIRA_RAPID_BOARD=$JIRA_RAPID_BOARD" + echo "JIRA_DEFAULT_ACTION=$JIRA_DEFAULT_ACTION" else # Anything that doesn't match a special action is considered an issue name local issue_arg=$action @@ -84,15 +66,17 @@ function jira() { function _jira_url_help() { cat << EOF -JIRA url is not specified anywhere. +error: JIRA URL is not specified anywhere. + Valid options, in order of precedence: .jira-url file \$HOME/.jira-url file - JIRA_URL environment variable + \$JIRA_URL environment variable EOF } function _jira_query() { + emulate -L zsh local verb="$1" local jira_name lookup preposition query if [[ "${verb}" == "reported" ]]; then @@ -102,12 +86,12 @@ function _jira_query() { lookup=assignee preposition=to else - echo "not a valid lookup: $verb" >&2 + echo "error: not a valid lookup: $verb" >&2 return 1 fi jira_name=${2:=$JIRA_NAME} if [[ -z $jira_name ]]; then - echo "JIRA_NAME not specified" >&2 + echo "error: JIRA_NAME not specified" >&2 return 1 fi From 797e1f9a64c0d2775723bb28c76745b327f86d56 Mon Sep 17 00:00:00 2001 From: Tim O'Brien Date: Mon, 14 Sep 2015 15:32:50 -0700 Subject: [PATCH 176/183] [plugins/bgnotify] fix for iTerm2 notification clicks --- 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 f6dd3886..459f5214 100755 --- a/plugins/bgnotify/bgnotify.plugin.zsh +++ b/plugins/bgnotify/bgnotify.plugin.zsh @@ -32,7 +32,7 @@ currentWindowId () { bgnotify () { ## args: (title, subtitle) if hash terminal-notifier 2>/dev/null; then #osx - [[ "$TERM_PROGRAM" == 'iTerm.app' ]] && term_id='com.googlecode.iterm2' || + [[ "$TERM_PROGRAM" == 'iTerm.app' ]] && term_id='com.googlecode.iterm2'; [[ "$TERM_PROGRAM" == 'Apple_Terminal' ]] && term_id='com.apple.terminal'; ## now call terminal-notifier, (hopefully with $term_id!) [ -z "$term_id" ] && terminal-notifier -message "$2" -title "$1" >/dev/null || From a8a8bc3967fc7b6906bd03c8f893a206ebc055f5 Mon Sep 17 00:00:00 2001 From: Daniel Stankevich Date: Wed, 16 Sep 2015 17:18:27 +1000 Subject: [PATCH 177/183] Add simple Stack commands list --- plugins/stack/stack.plugin.zsh | 49 ++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 plugins/stack/stack.plugin.zsh diff --git a/plugins/stack/stack.plugin.zsh b/plugins/stack/stack.plugin.zsh new file mode 100644 index 00000000..7cc25639 --- /dev/null +++ b/plugins/stack/stack.plugin.zsh @@ -0,0 +1,49 @@ +function stack_sandbox_info() { + stack_files=(*.stack(N)) + if [ $#stack_files -gt 0 ]; then + if [ -f stack.sandbox.config ]; then + echo "%{$fg[green]%}sandboxed%{$reset_color%}" + else + echo "%{$fg[red]%}not sandboxed%{$reset_color%}" + fi + fi +} + +function _stack_commands() { + local ret=1 state + _arguments ':subcommand:->subcommand' && ret=0 + + case $state in + subcommand) + subcommands=( + "build:Build the project(s) in this directory/configuration" + "install:Build executables and install to a user path" + "test:Build and test the project(s) in this directory/configuration" + "bench:Build and benchmark the project(s) in this directory/configuration" + "haddock:Generate haddocks for the project(s) in this directory/configuration" + "new:Create a brand new project" + "init:Initialize a stack project based on one or more stack packages" + "solver:Use a dependency solver to try and determine missing extra-deps" + "setup:Get the appropriate ghc for your project" + "path:Print out handy path information" + "unpack:Unpack one or more packages locally" + "update:Update the package index" + "upgrade:Upgrade to the latest stack (experimental)" + "upload:Upload a package to Hackage" + "dot:Visualize your project's dependency graph using Graphviz dot" + "exec:Execute a command" + "ghc:Run ghc" + "ghci:Run ghci in the context of project(s)" + "ide:Run ide-backend-client with the correct arguments" + "runghc:Run runghc" + "clean:Clean the local packages" + "docker:Subcommands specific to Docker use" + ) + _describe -t subcommands 'stack subcommands' subcommands && ret=0 + esac + + return ret +} + +compdef _stack_commands stack + From bb10ad0a13f0dfc1d716ea023d4fc806a4e167d0 Mon Sep 17 00:00:00 2001 From: Daniel Stankevich Date: Wed, 16 Sep 2015 17:25:39 +1000 Subject: [PATCH 178/183] Remove unnecessary sandbox fn --- plugins/stack/stack.plugin.zsh | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/plugins/stack/stack.plugin.zsh b/plugins/stack/stack.plugin.zsh index 7cc25639..a149208d 100644 --- a/plugins/stack/stack.plugin.zsh +++ b/plugins/stack/stack.plugin.zsh @@ -1,14 +1,3 @@ -function stack_sandbox_info() { - stack_files=(*.stack(N)) - if [ $#stack_files -gt 0 ]; then - if [ -f stack.sandbox.config ]; then - echo "%{$fg[green]%}sandboxed%{$reset_color%}" - else - echo "%{$fg[red]%}not sandboxed%{$reset_color%}" - fi - fi -} - function _stack_commands() { local ret=1 state _arguments ':subcommand:->subcommand' && ret=0 @@ -46,4 +35,3 @@ function _stack_commands() { } compdef _stack_commands stack - From 8c5b9481622759d2081e0b28faef64a39200f122 Mon Sep 17 00:00:00 2001 From: Henrik Hodne Date: Wed, 16 Sep 2015 15:28:08 +0200 Subject: [PATCH 179/183] =?UTF-8?q?chruby:=20don=CA=BCt=20try=20to=20execu?= =?UTF-8?q?te=20.sh=20files=20before=20loading?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- plugins/chruby/chruby.plugin.zsh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/chruby/chruby.plugin.zsh b/plugins/chruby/chruby.plugin.zsh index b461b0c9..5be6528b 100644 --- a/plugins/chruby/chruby.plugin.zsh +++ b/plugins/chruby/chruby.plugin.zsh @@ -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 [[ -r ${_chruby_path} ]]; then source ${_chruby_path} fi - if ${_chruby_auto} && [[ -r ${_chruby_auto} ]]; then + if [[ -r ${_chruby_auto} ]]; then source ${_chruby_auto} fi } From 5cf0a0128b2dbee9aecbd6124dff72d2568001ac Mon Sep 17 00:00:00 2001 From: Alexander Olsson Date: Thu, 17 Sep 2015 10:10:23 +0200 Subject: [PATCH 180/183] Use local gradlew Instead of requiring to add `cwd` to path, just use `gradlew` from the local folder. This is how most gradle wrapper projects are laid out --- 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 6f634d1b..97941756 100644 --- a/plugins/gradle/gradle.plugin.zsh +++ b/plugins/gradle/gradle.plugin.zsh @@ -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 dce052dac00f83dae364358cdc6c24ed3486e9ea Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Fri, 18 Sep 2015 14:24:46 +0200 Subject: [PATCH 181/183] Add emotty plugin which displays an emoji for the current $TTY. --- plugins/emotty/emotty.plugin.zsh | 43 ++++++++++++++++++++ plugins/emotty/emotty_emoji_set.zsh | 24 +++++++++++ plugins/emotty/emotty_floral_set.zsh | 18 +++++++++ plugins/emotty/emotty_love_set.zsh | 34 ++++++++++++++++ plugins/emotty/emotty_nature_set.zsh | 58 +++++++++++++++++++++++++++ plugins/emotty/emotty_stellar_set.zsh | 25 ++++++++++++ plugins/emotty/emotty_zodiac_set.zsh | 29 ++++++++++++++ 7 files changed, 231 insertions(+) create mode 100644 plugins/emotty/emotty.plugin.zsh create mode 100644 plugins/emotty/emotty_emoji_set.zsh create mode 100644 plugins/emotty/emotty_floral_set.zsh create mode 100644 plugins/emotty/emotty_love_set.zsh create mode 100644 plugins/emotty/emotty_nature_set.zsh create mode 100644 plugins/emotty/emotty_stellar_set.zsh create mode 100644 plugins/emotty/emotty_zodiac_set.zsh diff --git a/plugins/emotty/emotty.plugin.zsh b/plugins/emotty/emotty.plugin.zsh new file mode 100644 index 00000000..b32dd1a4 --- /dev/null +++ b/plugins/emotty/emotty.plugin.zsh @@ -0,0 +1,43 @@ +# ------------------------------------------------------------------------------ +# FILE: emotty.plugin.zsh +# DESCRIPTION: Return an emoji for the current $TTY number. +# AUTHOR: Alexis Hildebrandt (afh[at]surryhill.net) +# VERSION: 1.0.0 +# DEPENDS: emoji plugin +# +# There are different sets of emoji characters available, to choose a different +# set export emotty_set to the name of the set you would like to use, e.g.: +# % export emotty_set=nature +# ------------------------------------------------------------------------------ + +typeset -gAH _emotty_sets +local _emotty_plugin_dir="${0:h}" +source "$_emotty_plugin_dir/emotty_stellar_set.zsh" +source "$_emotty_plugin_dir/emotty_floral_set.zsh" +source "$_emotty_plugin_dir/emotty_zodiac_set.zsh" +source "$_emotty_plugin_dir/emotty_nature_set.zsh" +source "$_emotty_plugin_dir/emotty_emoji_set.zsh" +source "$_emotty_plugin_dir/emotty_love_set.zsh" +unset _emotty_plugin_dir + +emotty_default_set=emoji + +function emotty() { + # Use emotty set defined by user, fallback to default + local emotty=${_emotty_sets[${emotty_set:-$emotty_default_set}]} + # Parse $TTY number, normalizing it to an emotty set index + (( tty = (${TTY##/dev/ttys} % ${#${=emotty}}) + 1 )) + local character_name=${${=emotty}[tty]} + echo "${emoji[${character_name}]}${emoji2[emoji_style]}" +} + +function display_emotty() { + local name=$1 + for i in ${=_emotty_sets[$name]}; do + printf "${emoji[$i]}${emoji2[emoji_style]} " + done + print + for i in ${=_emotty_sets[$name]}; do + print "${emoji[$i]}${emoji2[emoji_style]} = $i" + done +} diff --git a/plugins/emotty/emotty_emoji_set.zsh b/plugins/emotty/emotty_emoji_set.zsh new file mode 100644 index 00000000..00e31713 --- /dev/null +++ b/plugins/emotty/emotty_emoji_set.zsh @@ -0,0 +1,24 @@ +#!/usr/bin/env zsh +# vim:ft=zsh ts=2 sw=2 sts=2 + +_emotty_sets[emoji]=" + crystal_ball + ghost + jack_o_lantern + see_no_evil_monkey + hear_no_evil_monkey + speak_no_evil_monkey + smiling_cat_face_with_open_mouth + extraterrestrial_alien + rocket + billiards + bomb + pill + japanese_symbol_for_beginner + direct_hit + cyclone + diamond_shape_with_a_dot_inside + sparkle + eight_spoked_asterisk + eight_pointed_black_star + " diff --git a/plugins/emotty/emotty_floral_set.zsh b/plugins/emotty/emotty_floral_set.zsh new file mode 100644 index 00000000..f761feae --- /dev/null +++ b/plugins/emotty/emotty_floral_set.zsh @@ -0,0 +1,18 @@ +#!/usr/bin/env zsh +# vim:ft=zsh ts=2 sw=2 sts=2 + +_emotty_sets[floral]=" + hibiscus + cherry_blossom + blossom + sunflower + bouquet + tulip + rose + four_leaf_clover + seedling + herb + palm_tree + evergreen_tree + deciduous_tree + " diff --git a/plugins/emotty/emotty_love_set.zsh b/plugins/emotty/emotty_love_set.zsh new file mode 100644 index 00000000..8f19e690 --- /dev/null +++ b/plugins/emotty/emotty_love_set.zsh @@ -0,0 +1,34 @@ +#!/usr/bin/env zsh +# vim:ft=zsh ts=2 sw=2 sts=2 + +# Note: The heavy_black_heart emoji requires $emoji2[emoji_style] +# to be rendered as the emoji red heart. +_emotty_sets[love]=" + green_heart + blue_heart + purple_heart + yellow_heart + heavy_black_heart + broken_heart + heart_with_arrow + heart_with_ribbon + sparkling_heart + two_hearts + revolving_hearts + growing_heart + beating_heart + heart_decoration + couple_with_heart + kiss + man_and_woman_holding_hands + two_women_holding_hands + two_men_holding_hands + kiss_mark + smiling_face_with_heart_shaped_eyes + kissing_face + face_throwing_a_kiss + kissing_face_with_smiling_eyes + kissing_face_with_closed_eyes + smiling_cat_face_with_heart_shaped_eyes + kissing_cat_face_with_closed_eyes + " diff --git a/plugins/emotty/emotty_nature_set.zsh b/plugins/emotty/emotty_nature_set.zsh new file mode 100644 index 00000000..8dab4c1b --- /dev/null +++ b/plugins/emotty/emotty_nature_set.zsh @@ -0,0 +1,58 @@ +#!/usr/bin/env zsh +# vim:ft=zsh ts=2 sw=2 sts=2 + +_emotty_sets[nature]=" + mouse_face + hamster_face + rabbit_face + dog_face + cat_face + tiger_face + bear_face + monkey_face + koala + panda_face + chicken + baby_chick + bird + penguin + cow_face + pig_face + frog_face + boar + wolf_face + horse_face + snail + bug + ant + honeybee + lady_beetle + spouting_whale + dolphin + octopus + fish + tropical_fish + snake + turtle + lemon + tangerine + peach + mushroom + tomato + strawberry + red_apple + cherries + grapes + aubergine + watermelon + banana + pineapple + melon + pear + green_apple + ear_of_maize + sunflower + seedling + herb + four_leaf_clover + " diff --git a/plugins/emotty/emotty_stellar_set.zsh b/plugins/emotty/emotty_stellar_set.zsh new file mode 100644 index 00000000..8e7e6106 --- /dev/null +++ b/plugins/emotty/emotty_stellar_set.zsh @@ -0,0 +1,25 @@ +#!/usr/bin/env zsh +# vim:ft=zsh ts=2 sw=2 sts=2 + +# NOTE: The following emoji show as $'character' in the title +# white_medium_star +# sparkles +# dizzy_symbol + +_emotty_sets[stellar]=" + full_moon_symbol + waning_gibbous_moon_symbol + waning_crescent_moon_symbol + last_quarter_moon_symbol + new_moon_symbol + new_moon_with_face + waxing_crescent_moon_symbol + first_quarter_moon_symbol + waxing_gibbous_moon_symbol + full_moon_with_face + sun_with_face + glowing_star + crescent_moon + first_quarter_moon_with_face + last_quarter_moon_with_face + " diff --git a/plugins/emotty/emotty_zodiac_set.zsh b/plugins/emotty/emotty_zodiac_set.zsh new file mode 100644 index 00000000..bde6e3d2 --- /dev/null +++ b/plugins/emotty/emotty_zodiac_set.zsh @@ -0,0 +1,29 @@ +#!/usr/bin/env zsh +# vim:ft=zsh ts=2 sw=2 sts=2 + +_emotty_sets[zodiac]=" + aries + taurus + gemini + cancer + leo + virgo + libra + scorpius + sagittarius + capricorn + aquarius + pisces + rat + ox + tiger + rabbit + dragon + snake + horse + goat + monkey + rooster + dog + pig + " From 550573bfb8a9369f279a46c70a0278a03d866dd3 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Fri, 18 Sep 2015 14:25:47 +0200 Subject: [PATCH 182/183] Add emotty theme --- themes/emotty.zsh-theme | 99 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 99 insertions(+) create mode 100644 themes/emotty.zsh-theme diff --git a/themes/emotty.zsh-theme b/themes/emotty.zsh-theme new file mode 100644 index 00000000..f646b2fa --- /dev/null +++ b/themes/emotty.zsh-theme @@ -0,0 +1,99 @@ +#!/usr/bin/env zsh +# ------------------------------------------------------------------------------ +# FILE: emotty.zsh-theme +# DESCRIPTION: A varying emoji based theme +# AUTHOR: Alexis Hildebrandt (afh[at]surryhill.net) +# VERSION: 1.0.0 +# DEPENDS: emotty plugin +# RECOMMENDS: Hasklig font +# +# This theme shows a different emoji for each tty at the main prompt. +# +# There are pre-defined different emoji sets to choose from, e.g.: +# emoji, stellar, floral, zodiac, love (see emotty plugin). +# +# To choose a different emotty set than the default (emoji) +# % export emotty_set=nature +# +# For the superuser (root) this theme shows a designated indicator +# and switches the foreground color to red +# (see root_prompt variable, default: skull). +# But you are using sudo (8) instead of designated a root shell, right‽ +# +# When logged in via SSH the main prompt also shows the user- and hostname. +# +# The exit status of the last failed command is displayed in the window title +# along with an indicator (see warn_glyph variable, default: collision symbol). +# To clear it just run: $NULL, true or : +# +# The right prompt shows the current working directory (3 levels up) in cyan. +# +# When in a git repository the main prompt shows the current branch name +# with a branch indicator in yellow +# (see vcs_branch_glyph variable, default: Hasklig branch glyph). +# +# If there are modified files the prompt switches to red and shows an unstaged +# indicator (see vcs_unstaged_glyph variable, default: circled letter M). +# +# If there are staged files the prompt switches to green and shows an staged +# indicator (see vcs_staged_glyph variable, default: high voltage sign). +# +# In a git repository the right prompt shows the repository name in bold and +# prepends the current working directory subpath within the repository. +# +# When git currently performs an action such as merge or rebase, the action is +# displayed in red instead of the branch name and a special action indicator +# is shown (see vcs_action_glyph variable, default: chevron). +# ------------------------------------------------------------------------------ + +user_prompt="$(emotty)" +root_prompt="$emoji[skull]" +warn_prompt="$emoji[collision_symbol]" + +vcs_unstaged_glyph="%{$emoji[circled_latin_capital_letter_m]$emoji2[emoji_style] %2G%}" +vcs_staged_glyph="%{$emoji[high_voltage_sign] %1G%}" +vcs_branch_glyph=$(print -P $'\Ue0a0') #  +vcs_action_glyph=$(print -P $'\U276f') # ❯ + +red="$FG[001]" +yellow="$FG[003]" +green="$FG[002]" +cyan="$FG[014]" + +prompt_glyph="%{%(#.${root_prompt}.${user_prompt})%1G%}" + +# Uncomment the next line if you also like to see the warn_prompt in the prompt on the right. +#last_command_failed="%(?.. %F{red}%1{${warn_prompt} %1G%}%?%f)" + + +setopt promptsubst + +autoload -U add-zsh-hook +autoload -Uz vcs_info + +zstyle ':vcs_info:*' enable git #hg svn cvs +zstyle ':vcs_info:*' get-revision false +zstyle ':vcs_info:*' check-for-changes true +zstyle ':vcs_info:git:*' unstagedstr "${red}${vcs_unstaged_glyph}" +zstyle ':vcs_info:*' stagedstr "${green}${vcs_staged_glyph}" + +# %(K|F){color} set (back|fore)ground color +# %(k|f) reset (back|fore)ground color +zstyle ':vcs_info:*' max-exports 3 +zstyle ':vcs_info:*' nvcsformats "${prompt_glyph} " '%3~' '' +zstyle ':vcs_info:*' formats "${yellow}%u%c%b${vcs_branch_glyph}%f" '%S|' "$FX[bold]%r$FX[no-bold]" +zstyle ':vcs_info:*' actionformats "${red}%K{white}%a${vcs_action_glyph}%k%f" '%S|' "$FX[bold]%r$FX[no-bold]" + +red_if_root="%(!.%F{red}.)" +sshuser_on_host="${SSH_TTY:+%(!.$red.$yellow)%n@%m$reset_color}" + +PROMPT='${sshuser_on_host}${vcs_info_msg_0_}${red_if_root} ' +RPROMPT='${cyan}${vcs_info_msg_1_##.|}${vcs_info_msg_2_}%f${last_command_failed}' + +emotty_title() { + title "${${?/[^0]*/$warn_prompt $?}/0/${prompt_glyph}}" +} +add-zsh-hook precmd emotty_title +add-zsh-hook precmd vcs_info + +# vim:ft=zsh ts=2 sw=2 sts=2 From 1a51100d09883961ef023c63006dc576abcb1ae4 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Sun, 20 Sep 2015 11:44:58 +0200 Subject: [PATCH 183/183] Fix issues with character widths in emotty theme --- themes/emotty.zsh-theme | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/themes/emotty.zsh-theme b/themes/emotty.zsh-theme index f646b2fa..34d491ff 100644 --- a/themes/emotty.zsh-theme +++ b/themes/emotty.zsh-theme @@ -51,7 +51,7 @@ root_prompt="$emoji[skull]" warn_prompt="$emoji[collision_symbol]" vcs_unstaged_glyph="%{$emoji[circled_latin_capital_letter_m]$emoji2[emoji_style] %2G%}" -vcs_staged_glyph="%{$emoji[high_voltage_sign] %1G%}" +vcs_staged_glyph="%{$emoji[high_voltage_sign] %2G%}" vcs_branch_glyph=$(print -P $'\Ue0a0') #  vcs_action_glyph=$(print -P $'\U276f') # ❯ @@ -60,7 +60,7 @@ yellow="$FG[003]" green="$FG[002]" cyan="$FG[014]" -prompt_glyph="%{%(#.${root_prompt}.${user_prompt})%1G%}" +prompt_glyph="%{%(#.${root_prompt}.${user_prompt}) %2G%}" # Uncomment the next line if you also like to see the warn_prompt in the prompt on the right. #last_command_failed="%(?.. %F{red}%1{${warn_prompt} %1G%}%?%f)" @@ -80,7 +80,7 @@ zstyle ':vcs_info:*' stagedstr "${green}${vcs_staged_glyph}" # %(K|F){color} set (back|fore)ground color # %(k|f) reset (back|fore)ground color zstyle ':vcs_info:*' max-exports 3 -zstyle ':vcs_info:*' nvcsformats "${prompt_glyph} " '%3~' '' +zstyle ':vcs_info:*' nvcsformats "${prompt_glyph}" '%3~' '' zstyle ':vcs_info:*' formats "${yellow}%u%c%b${vcs_branch_glyph}%f" '%S|' "$FX[bold]%r$FX[no-bold]" zstyle ':vcs_info:*' actionformats "${red}%K{white}%a${vcs_action_glyph}%k%f" '%S|' "$FX[bold]%r$FX[no-bold]"