From d15338c1a9b3d1464220316f5b302d05b9c7f542 Mon Sep 17 00:00:00 2001 From: LFDM <1986gh@gmail.com> Date: Sun, 5 Jan 2014 00:16:01 +0100 Subject: [PATCH] Refactors sourcing the zsh theme. --- oh-my-zsh.sh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/oh-my-zsh.sh b/oh-my-zsh.sh index 66a25fa62..e09d9513f 100644 --- a/oh-my-zsh.sh +++ b/oh-my-zsh.sh @@ -69,13 +69,14 @@ _source_zsh_theme() { source "$RANDOM_THEME" echo "[oh-my-zsh] Random theme '$theme_name' loaded..." - elif [ ! "$ZSH_THEME" = "" ]; then + elif [ "$ZSH_THEME" != "" ]; then + echo ho local theme_path local zsh_path # custom themes take precedence over built-in themes! + theme_path="themes/$ZSH_THEME.zsh-theme" for zsh_path in $ZSH_CUSTOM $ZSH; do - theme_path="themes/$ZSH_THEME.zsh-theme" if [ -f "$zsh_path/$theme_path" ]; then source "$zsh_path/$theme_path" break