summaryrefslogtreecommitdiff
path: root/plugins/emotty
diff options
context:
space:
mode:
authorTuowen Zhao <ztuowen@gmail.com>2018-04-25 15:36:48 -0600
committerTuowen Zhao <ztuowen@gmail.com>2018-04-25 15:36:48 -0600
commit1481f7aa67df42bdf45953231637194ac200d240 (patch)
tree7d41eb6b369e3ab0f25753623c966b69340e54cf /plugins/emotty
parentb7b623d6de696b81d213ec666d072851561d5c06 (diff)
parent9cd3701ac0297f4bdf9673ea0dffa8ffdaea63e8 (diff)
downloadzsh-1481f7aa67df42bdf45953231637194ac200d240.tar.gz
zsh-1481f7aa67df42bdf45953231637194ac200d240.tar.bz2
zsh-1481f7aa67df42bdf45953231637194ac200d240.zip
Merge branch 'master' of https://github.com/robbyrussell/oh-my-zsh
Diffstat (limited to 'plugins/emotty')
-rw-r--r--plugins/emotty/emotty.plugin.zsh5
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/emotty/emotty.plugin.zsh b/plugins/emotty/emotty.plugin.zsh
index b32dd1a4c..b0d24c322 100644
--- a/plugins/emotty/emotty.plugin.zsh
+++ b/plugins/emotty/emotty.plugin.zsh
@@ -26,13 +26,14 @@ 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 ))
+ (( tty = (${TTY##/dev/tty} % ${#${=emotty}}) + 1 ))
local character_name=${${=emotty}[tty]}
echo "${emoji[${character_name}]}${emoji2[emoji_style]}"
}
function display_emotty() {
- local name=$1
+ local name=${1:-$emotty_set}
+ echo $name
for i in ${=_emotty_sets[$name]}; do
printf "${emoji[$i]}${emoji2[emoji_style]} "
done