summaryrefslogtreecommitdiff
path: root/plugins/themes/themes.plugin.zsh
diff options
context:
space:
mode:
authorRobby Russell <robby@planetargon.com>2013-12-02 22:43:52 -0800
committerRobby Russell <robby@planetargon.com>2013-12-02 22:43:52 -0800
commit182652b00a4616c853ffe6362ce4446e954164ad (patch)
treeb1312941a0ee18a1e088cff114751fc803b8c943 /plugins/themes/themes.plugin.zsh
parent9a40ae9b5f463614ec16d39df4268b53d745ce8c (diff)
parentf731d6c16fd49e8140250a90e91d01f49d13da17 (diff)
downloadzsh-182652b00a4616c853ffe6362ce4446e954164ad.tar.gz
zsh-182652b00a4616c853ffe6362ce4446e954164ad.tar.bz2
zsh-182652b00a4616c853ffe6362ce4446e954164ad.zip
Merge pull request #2202 from kevinxucs/themes-random
themes plugin now picks a random theme if no argument is provided.
Diffstat (limited to 'plugins/themes/themes.plugin.zsh')
-rw-r--r--plugins/themes/themes.plugin.zsh2
1 files changed, 1 insertions, 1 deletions
diff --git a/plugins/themes/themes.plugin.zsh b/plugins/themes/themes.plugin.zsh
index 8bab257ea..7519b0253 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))