Teach ls to handle multiple arguments. Close #243.

This commit is contained in:
Jorge Bucaran 2016-04-30 04:11:51 +09:00
parent 4b27433300
commit 566cfa5d8b
No known key found for this signature in database
GPG key ID: E54BA3C0E646DB30

View file

@ -1070,17 +1070,29 @@ function __fisher_list
end
function __fisher_list_plugin_directory -a item
set -l fd $__fisher_stderr
function __fisher_list_plugin_directory
if test -z "$argv"
return 1
end
set -e argv[1]
set -l path "$fisher_config/$item"
if test ! -d "$path"
__fisher_log error "$item is not installed" $__fisher_stderr
for item in $argv
if test ! -d "$fisher_config/$item"
__fisher_log error "@$item@ is not installed" $__fisher_stderr
return 1
end
end
set -l fd $__fisher_stderr
set -l uniq_items
for item in $argv
if contains -- "$item" $uniq_items
continue
end
set uniq_items $uniq_items "$item"
set -l path "$fisher_config/$item"
pushd "$path"
@ -1117,6 +1129,7 @@ function __fisher_list_plugin_directory -a item
end > $fd
popd
end
end