1
0
Fork 0
mirror of https://github.com/ohmyzsh/ohmyzsh.git synced 2024-11-22 13:50:09 +00:00

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

This commit is contained in:
Kaiwen Xu 2013-10-28 11:06:10 -04:00
parent 90c28b786a
commit f731d6c16f

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))