mirror of
https://github.com/jorgebucaran/fisher
synced 2024-09-10 15:07:40 +02:00
Install functions if index check fails.
This commit is contained in:
parent
c2db6177a9
commit
bd7b529581
1 changed files with 4 additions and 7 deletions
|
@ -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
|
||||
|
|
Loading…
Reference in a new issue