浏览代码

themes plugin now picks a random theme if no argument is provided.

Kaiwen Xu 10 年之前
父节点
当前提交
f731d6c16f
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1 1
      plugins/themes/themes.plugin.zsh

+ 1 - 1
plugins/themes/themes.plugin.zsh

@@ -1,6 +1,6 @@
 function theme
 {
-    if [ "$1" = "random" ]; then
+    if [ -z "$1" ] || [ "$1" = "random" ]; then
 	themes=($ZSH/themes/*zsh-theme)
 	N=${#themes[@]}
 	((N=(RANDOM%N)+1))