Update plugins on install if they are already installed, close #599

This commit is contained in:
Jorge Bucaran 2020-11-05 04:23:34 +09:00
parent 3077649891
commit f97dc3b47d
No known key found for this signature in database
GPG key ID: E54BA3C0E646DB30

View file

@ -67,9 +67,7 @@ function fisher -a cmd -d "fish plugin manager"
else
for plugin in (_fisher_plugin_parse $argv[2..-1])
if contains -- "$plugin" $old_plugins
if test "$cmd" = install
echo "fisher: \"$plugin\" is already installed (try `fisher update $plugin`)" >&2 && return 1
else if test "$cmd" = update
if test "$cmd" = install || test "$cmd" = update
set -a update_plugins $plugin
else
set -a remove_plugins $plugin