浏览代码

Improve emotty plugin (#5999)

* The display_emotty function show the name of the displayed emotty set

* Unless an emotty set was given show the emotty set configured
  in $emotty_set
Alexis Hildebrandt 7 年之前
父节点
当前提交
88d21fea6c
共有 1 个文件被更改,包括 2 次插入1 次删除
  1. 2 1
      plugins/emotty/emotty.plugin.zsh

+ 2 - 1
plugins/emotty/emotty.plugin.zsh

@@ -32,7 +32,8 @@ function emotty() {
 }
 
 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