diff options
| author | Tuowen Zhao <ztuowen@gmail.com> | 2026-01-04 22:47:54 -0800 |
|---|---|---|
| committer | Tuowen Zhao <ztuowen@gmail.com> | 2026-01-04 22:47:54 -0800 |
| commit | 2aa4cb7a52b28722816ecfd55f3b06293332c55c (patch) | |
| tree | f02a9f3d59d109c70caf932a24e43368994e0e8c /plugins/emoji | |
| parent | 7e951c254e779ff0620537cf43ca69dd878387b4 (diff) | |
| parent | d23d3ea69fdb839088e6e5589557cce77b34aaf8 (diff) | |
| download | zsh-master.tar.gz zsh-master.tar.bz2 zsh-master.zip | |
Diffstat (limited to 'plugins/emoji')
| -rw-r--r-- | plugins/emoji/emoji.plugin.zsh | 18 | ||||
| -rw-r--r-- | plugins/emoji/update_emoji.py | 4 |
2 files changed, 11 insertions, 11 deletions
diff --git a/plugins/emoji/emoji.plugin.zsh b/plugins/emoji/emoji.plugin.zsh index f9e476ebf..f7be56cf7 100644 --- a/plugins/emoji/emoji.plugin.zsh +++ b/plugins/emoji/emoji.plugin.zsh @@ -24,7 +24,7 @@ unset _omz_emoji_plugin_dir # This is a combining character that can be placed after any other character to surround # it in a "keycap" symbol. -# The digits 0-9 are already in the emoji table as keycap_digit_<N>, keycap_ten, etc. +# The digits 0-9 are already in the emoji table as keycap_digit_<N>, keycap_ten, etc. # It's unclear whether this should be in the $emoji array, because those characters are all ones # which can be displayed on their own. @@ -63,9 +63,9 @@ function random_emoji() { [[ $list_size -eq 0 ]] && return 1 local random_index=$(( ( RANDOM % $list_size ) + 1 )) local name=${names[$random_index]} - if [[ "$group" == "flags" ]]; then + if [[ "$group" == "flags" ]]; then echo ${emoji_flags[$name]} - else + else echo ${emoji[$name]} fi } @@ -86,22 +86,22 @@ function display_emoji() { # terminals treat these emoji chars as single-width. local counter=1 for i in $names; do - if [[ "$group" == "flags" ]]; then + if [[ "$group" == "flags" ]]; then printf '%s ' "$emoji_flags[$i]" - else - printf '%s ' "$emoji[$i]" + else + printf '%s ' "$emoji[$i]" fi # New line every 20 emoji, to avoid weirdnesses if (($counter % 20 == 0)); then - printf "\n" + printf "\n" fi let counter=$counter+1 done print for i in $names; do - if [[ "$group" == "flags" ]]; then + if [[ "$group" == "flags" ]]; then echo "${emoji_flags[$i]} = $i" - else + else echo "${emoji[$i]} = $i" fi done diff --git a/plugins/emoji/update_emoji.py b/plugins/emoji/update_emoji.py index 18b3c060d..9e115a7fa 100644 --- a/plugins/emoji/update_emoji.py +++ b/plugins/emoji/update_emoji.py @@ -1,6 +1,6 @@ """ Update Emoji.py -Refeshes OMZ emoji database based on the latest Unicode spec +Refreshes OMZ emoji database based on the latest Unicode spec """ import re import json @@ -95,7 +95,7 @@ def name_to_omz(_name, _group, _subgroup, _status): shortname = snake_case(_name) # Special treatment by status # Enables us to have every emoji combination, - # even the one that are not officially sanctionned + # even the one that are not officially sanctioned # and are implemented by, say, only one vendor if _status == "unqualified": shortname += "_unqualified" |
