mirror of
https://github.com/jorgebucaran/fisher
synced 2024-10-09 09:36:53 +02:00
Teach ls to handle multiple arguments. Close #243.
This commit is contained in:
parent
5133e180bb
commit
986ea3741e
1 changed files with 51 additions and 38 deletions
27
fisher.fish
27
fisher.fish
|
@ -1070,17 +1070,29 @@ function __fisher_list
|
||||||
end
|
end
|
||||||
|
|
||||||
|
|
||||||
function __fisher_list_plugin_directory -a item
|
function __fisher_list_plugin_directory
|
||||||
set -l fd $__fisher_stderr
|
if test -z "$argv"
|
||||||
|
return 1
|
||||||
|
end
|
||||||
|
|
||||||
set -e argv[1]
|
for item in $argv
|
||||||
set -l path "$fisher_config/$item"
|
if test ! -d "$fisher_config/$item"
|
||||||
|
__fisher_log error "@$item@ is not installed" $__fisher_stderr
|
||||||
if test ! -d "$path"
|
|
||||||
__fisher_log error "$item is not installed" $__fisher_stderr
|
|
||||||
|
|
||||||
return 1
|
return 1
|
||||||
end
|
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"
|
pushd "$path"
|
||||||
|
|
||||||
|
@ -1118,6 +1130,7 @@ function __fisher_list_plugin_directory -a item
|
||||||
|
|
||||||
popd
|
popd
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
||||||
|
|
||||||
function __fisher_log -a log message fd
|
function __fisher_log -a log message fd
|
||||||
|
|
Loading…
Reference in a new issue