From 02383017268004c4873797c16a667389bead1b83 Mon Sep 17 00:00:00 2001 From: LE Manh Cuong Date: Fri, 14 Aug 2015 09:55:46 +0700 Subject: [PATCH] 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 7d110603c..04693da05 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 d90c6e316..04f3ce8e7 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 {