From 6a4fbde8d55d3498f49a86aaa981d03a88c0d3fa Mon Sep 17 00:00:00 2001 From: Shrikant Sharat Date: Tue, 5 Jun 2012 17:02:40 +0530 Subject: [PATCH] On spot theme switching works. --- antigen.zsh | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/antigen.zsh b/antigen.zsh index 9215814..ef45a0d 100644 --- a/antigen.zsh +++ b/antigen.zsh @@ -188,7 +188,8 @@ bundle-load () { # If the name ends with `.theme`, it is handled as if it were a zsh-theme # plugin. if [[ $name == *.theme ]]; then - source "$bundle_dir/${name%.theme}.zsh-theme" + local theme_file="$bundle_dir/${name%.theme}.zsh-theme" + test -f "$theme_file" && source "$theme_file" fi # Add to $fpath, for completion(s) @@ -206,7 +207,7 @@ bundle-lib () { bundle-theme () { local url="$ANTIGEN_DEFAULT_REPO_URL" local name="${1:-robbyrussell}" - bundle "$url" --name=$name.theme --loc=themes/$name.zsh-theme + bundle-install "$url" --name=$name.theme --loc=themes/$name.zsh-theme } bundle-apply () { -- 2.0.0