Try again. This works.

This commit is contained in:
Simon Gomizelj 2011-12-02 12:54:42 -05:00
commit 15892d6e76

View file

@ -1,14 +1,13 @@
set_theme() { set_theme() {
local theme local themes
themes=({$OMZ,$ZSH}/themes/$1.zsh-theme(N))
theme=({$OMZ,$ZSH}/themes/$1-theme(N)) source $themes[1]
source $theme[1]
} }
random_theme() { random_theme() {
local themes local themes
themes=($ZSH/themes/*zsh-theme(N)) themes=({$OMZ,$ZSH}/themes/*.zsh-theme(N))
source "$themes[$RANDOM%$#themes+1]" source $themes[$RANDOM%$#themes+1]
} }
# compdef "_files -g '*.zsh'" set_theme # compdef "_files -g '*.zsh'" set_theme