2016-02-29 14:13:29 +00:00
|
|
|
function fisher_list -a key -d "List installed plugins"
|
|
|
|
switch "$key"
|
|
|
|
case -b --bare
|
|
|
|
__fisher_cache_list
|
|
|
|
|
|
|
|
case ""
|
|
|
|
set -l enabled (fisher_list $fisher_file)
|
|
|
|
set -l cache (__fisher_cache_list)
|
|
|
|
|
|
|
|
if test -z "$cache"
|
|
|
|
return 1
|
|
|
|
end
|
|
|
|
|
|
|
|
set -l indent " "
|
|
|
|
|
|
|
|
if test -z "$enabled"
|
|
|
|
set indent ""
|
|
|
|
end
|
|
|
|
|
|
|
|
for i in $cache
|
|
|
|
if contains -- $i $enabled
|
|
|
|
if test $i = "$fisher_prompt"
|
|
|
|
printf "%s%s\n" ">$indent" $i
|
|
|
|
|
|
|
|
else if test -L $fisher_cache/$i
|
|
|
|
|
|
|
|
printf "%s%s\n" "@$indent" $i
|
|
|
|
|
|
|
|
else
|
|
|
|
printf "%s%s\n" "*$indent" $i
|
|
|
|
end
|
|
|
|
else
|
|
|
|
printf "%s%s\n" "$indent$indent" $i
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
case -l --link
|
|
|
|
find $fisher_cache/* -maxdepth 0 -type l ^ /dev/null | sed 's|.*/||'
|
|
|
|
|
|
|
|
case --enabled
|
|
|
|
fisher_list $fisher_file
|
|
|
|
|
|
|
|
case --disabled
|
|
|
|
set -l enabled (fisher_list $fisher_file)
|
|
|
|
|
|
|
|
for name in (__fisher_cache_list)
|
|
|
|
if not contains -- $name $enabled
|
|
|
|
printf "%s\n" $name
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
case -
|
|
|
|
__fisher_file | __fisher_name
|
|
|
|
|
|
|
|
case -h
|
|
|
|
printf "Usage: fisher list [<file>] [--enabled] [--disabled] [--bare] [--link] \n\n"
|
Ahoy!! Fisherman 1.0.0 :anchor:
* Deprecate fisher --list in favor of a new command
fisher list. The behavior is roughly the same. See
fisher help list for usage. tl;dr: Use list to query
the local system / cache and search to query the index.
* Teach fisher_plugin_walk about fish_postexec,
fish_command_not_found and fish_preexec event emitters
and erase them during uninstall if they were defined in
a snippet.
* Fisherman now recognizes the following aliases by default:
i for install, u for update, l for list, s for search and
h for help.
* Rewrite documentation to be simpler and more consistent.
* Fisherman can install "functions" now. If you have created
a function interactively, you can run fisher install name
of the function and a directory will be created in
$PWD/name of the function and installed as usual.
* Fisherman now detects if users have modified their fish
prompt using fish_config and if so, uninstalls $fisher_prompt.
* Search results now truncate plugin descriptions based in
the width of the terminal screen.
* Install/Update/Uninstall CLI was retouched.
Looking behind and Ahead
========================
On Jan, 1st, Fisherman 0.1.0 departed from the bay of
"my hard drive" and today 1.0.0 has finally shipped.
Things are still a little rough and knotty, what did
you think? But 1.0.0 means all the basic things are
here.
Internally, we may still push some large changes, more
robust tests; at ~300 there are still areas a bit dry.
On the outside, Fisherman will change little, I hope.
That's a feature. If you want a more colorful CLI,
concurrent updates, or another bit here and there,
we may work something out.
This release means more time to focus on the plugin
ecosystem, but the adventures are far from over.
2016-03-01 08:36:20 +00:00
|
|
|
printf " -b --bare List plugin without decorators\n"
|
|
|
|
printf " -l --link List plugins that are symbolic links\n"
|
|
|
|
printf " --enabled List plugins that are enabled\n"
|
|
|
|
printf " --disabled List plugins that are disabled\n"
|
|
|
|
printf " -h --help Show usage help\n"
|
2016-02-29 14:13:29 +00:00
|
|
|
return
|
|
|
|
|
|
|
|
case \*
|
|
|
|
if test -s "$key"
|
|
|
|
fisher_list - < $key
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|