From cf9d9469feed9c2c1999091e752daf7e59fafcfa Mon Sep 17 00:00:00 2001 From: Jorge Bucaran Date: Tue, 1 Mar 2016 18:27:27 +0900 Subject: [PATCH] Install functions if index check fails. --- functions/fisher_install.fish | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/functions/fisher_install.fish b/functions/fisher_install.fish index 35f6414..371ea73 100644 --- a/functions/fisher_install.fish +++ b/functions/fisher_install.fish @@ -82,13 +82,6 @@ function fisher_install -d "Install plugins" printf "%s\t%s\n" (__fisher_url_from_path $fisher_cache/$item) $item else - if functions -q "$item" - if set -l path (__fisher_function_to_plugin $item) - printf "%s\t%s" "$path" $item - continue - end - end - if test ! -s $fisher_cache/.index printf "$indicator Updating Index %s\n" $name > $stderr @@ -102,6 +95,10 @@ function fisher_install -d "Install plugins" if set -l url (fisher_search --url --name=$item --index=$fisher_cache/.index) debug "Index %s" $item printf "%s\t%s\n" $url $item + + else if functions -q "$item" + set -l path (__fisher_function_to_plugin $item) + printf "%s\t%s" "$path" $item else set total (math $total - 1) printf "fisher: '%s' not found or index out of date.\n" $item > $stderr