Merge pull request #2202 from kevinxucs/themes-random

themes plugin now picks a random theme if no argument is provided.
This commit is contained in:
Robby Russell 2013-12-02 22:43:52 -08:00
commit 182652b00a

View File

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