mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
Try again. This works.
This commit is contained in:
parent
cf5be77c2e
commit
15892d6e76
1 changed files with 5 additions and 6 deletions
|
|
@ -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
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue