Teach ls to handle multiple arguments. Close #243.

This commit is contained in:
Jorge Bucaran 2016-04-30 04:11:51 +09:00 committed by Jorge Bucaran
parent 5133e180bb
commit 986ea3741e

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"
@ -1118,6 +1130,7 @@ function __fisher_list_plugin_directory -a item
popd
end
end
function __fisher_log -a log message fd