Phase out rm

This commit is contained in:
Jorge Bucaran 2020-11-13 19:47:25 +09:00
parent 861cd38133
commit eab5c67f0b

View file

@ -18,7 +18,7 @@ function fisher -a cmd -d "fish plugin manager"
echo " -h or --help print this help message" echo " -h or --help print this help message"
case ls list case ls list
string match --entire --regex -- "$argv[2]" $_fisher_plugins string match --entire --regex -- "$argv[2]" $_fisher_plugins
case install update remove rm case install update remove
isatty || read -laz stdin && set -a argv $stdin isatty || read -laz stdin && set -a argv $stdin
set -l install_plugins set -l install_plugins
set -l update_plugins set -l update_plugins
@ -42,10 +42,10 @@ function fisher -a cmd -d "fish plugin manager"
if set -q argv[2] if set -q argv[2]
for plugin in $new_plugins for plugin in $new_plugins
if contains -- "$plugin" $old_plugins if contains -- "$plugin" $old_plugins
if test "$cmd" = install || test "$cmd" = update if test "$cmd" = remove
set -a update_plugins $plugin
else
set -a remove_plugins $plugin set -a remove_plugins $plugin
else
set -a update_plugins $plugin
end end
else if test "$cmd" != install else if test "$cmd" != install
echo "fisher: plugin not installed: \"$plugin\"" >&2 && return 1 echo "fisher: plugin not installed: \"$plugin\"" >&2 && return 1