diff options
author | Marc Cornellà <marc.cornella@live.com> | 2015-08-16 22:26:33 +0200 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2015-08-16 22:26:33 +0200 |
commit | 88243b846adc61c3e34a60f4c0ae53e3eb8b9e93 (patch) | |
tree | e2874bd564e96caf21d1de93e78236f8db129097 /plugins/emoji/emoji.plugin.zsh | |
parent | 192de6bcffb0294e19f4203f6f7dc1a7f3e427be (diff) | |
download | zsh-88243b846adc61c3e34a60f4c0ae53e3eb8b9e93.tar.gz zsh-88243b846adc61c3e34a60f4c0ae53e3eb8b9e93.tar.bz2 zsh-88243b846adc61c3e34a60f4c0ae53e3eb8b9e93.zip |
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.
Diffstat (limited to 'plugins/emoji/emoji.plugin.zsh')
-rw-r--r-- | plugins/emoji/emoji.plugin.zsh | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/emoji/emoji.plugin.zsh b/plugins/emoji/emoji.plugin.zsh index a98d0b714..adb11bb53 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 )) |