Better error message on no fish_plugins (#646)

This commit is contained in:
Jorge Bucaran 2021-01-14 20:58:35 +09:00
parent 72a40f13ce
commit 3edac36e38
No known key found for this signature in database
GPG Key ID: E54BA3C0E646DB30

View File

@ -27,8 +27,10 @@ function fisher -a cmd -d "Fish plugin manager"
set --local new_plugins
if ! set --query argv[2]
if test "$cmd" != update || test ! -e $fish_plugins
if test "$cmd" != update
echo "fisher: Not enough arguments for command: \"$cmd\"" >&2 && return 1
else if test ! -e $fish_plugins
echo "fisher: fish_plugins file not found: \"$cmd\"" >&2 && return 1
end
set arg_plugins (string match --regex --invert '^\s*$' -- <$fish_plugins)
end