Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Fix to random theme selection

 - themes array is 1-based

 - theme files names are located in indicies 1 through N inclusive

 - this resolves an issue where you would occasionally see: "no such
   file or directory. Random theme '' loaded..."
  • Loading branch information...
commit 5c1b341132119f08047a506e2c2b06fa0c0db52e 1 parent 2440954
@watsoncj watsoncj authored
Showing with 1 addition and 1 deletion.
  1. +1 −1  oh-my-zsh.sh
View
2  oh-my-zsh.sh
@@ -31,7 +31,7 @@ if [ "$ZSH_THEME" = "random" ]
then
themes=($ZSH/themes/*zsh-theme)
N=${#themes[@]}
- ((N=RANDOM%N))
+ ((N=(RANDOM%N)+1))
RANDOM_THEME=${themes[$N]}
source "$RANDOM_THEME"
echo "[oh-my-zsh] Random theme '$RANDOM_THEME' loaded..."

0 comments on commit 5c1b341

Please sign in to comment.
Something went wrong with that request. Please try again.