mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-26 02:12:33 +01:00
13 lines
362 B
Bash
13 lines
362 B
Bash
set_theme() {
|
|
local themes
|
|
themes=({$OMZ,$ZSH}/themes/$1.zsh-theme(N))
|
|
source $themes[1] || omz_log_msg "theme: $1 was not found. falling back to default." && source $ZSH/themes/default.zsh-theme
|
|
}
|
|
|
|
random_theme() {
|
|
local themes
|
|
themes=({$OMZ,$ZSH}/themes/*.zsh-theme(N))
|
|
source $themes[$RANDOM%$#themes+1]
|
|
}
|
|
|
|
# compdef "_files -g '*.zsh'" set_theme
|