From f731d6c16fd49e8140250a90e91d01f49d13da17 Mon Sep 17 00:00:00 2001 From: Kaiwen Xu Date: Mon, 28 Oct 2013 11:06:10 -0400 Subject: [PATCH] themes plugin now picks a random theme if no argument is provided. --- plugins/themes/themes.plugin.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugins/themes/themes.plugin.zsh b/plugins/themes/themes.plugin.zsh index 8bab257e..7519b025 100644 --- a/plugins/themes/themes.plugin.zsh +++ b/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))