mirror of
https://github.com/jorgebucaran/fisher
synced 2024-11-09 07:10:27 +00:00
ebf1de50a1
Notable changes: + Now fisher list does not show plugins that are disabled, but available in the cache. To preview these items use fisher list --disabled. + Welcome aboard @orangecms and @xrain0610. + Fisherman is now available in AUR, thanks @orangecms. + Fix load order during installation. Now snippets can safely invoke functions defined in the plugin function directory. Thanks @orangecms. #170. + Fisherman **installs and updates plugins ⌁concurrently**. Performance may vary, but if you can see 5 to 10 times faster network times, it's working well.
59 lines
1.6 KiB
Fish
59 lines
1.6 KiB
Fish
function fisher_list -a key -d "List installed plugins (l)"
|
|
set -l enabled
|
|
|
|
if test -f "$fisher_file"
|
|
set enabled (__fisher_list < $fisher_file)
|
|
end
|
|
|
|
switch "$key"
|
|
case ""
|
|
set -l indent
|
|
set -l links (command find $fisher_cache/* -maxdepth 0 -type l ^ /dev/null | sed 's|.*/||')
|
|
|
|
if test ! -z "$fisher_prompt"
|
|
set indent " "
|
|
end
|
|
|
|
for plugin in $links
|
|
if contains -- "$plugin" $enabled
|
|
set indent " "
|
|
break
|
|
end
|
|
end
|
|
|
|
for plugin in $enabled
|
|
if contains -- "$plugin" $links
|
|
printf "%s %s\n" "@" $plugin
|
|
|
|
else if test $plugin = "$fisher_prompt"
|
|
printf "%s %s\n" ">" $plugin
|
|
|
|
else
|
|
printf "$indent$indent%s\n" $plugin
|
|
end
|
|
end
|
|
|
|
case --enabled
|
|
if test ! -z "$enabled"
|
|
printf "%s\n" $enabled
|
|
end
|
|
|
|
case --disabled
|
|
for name in (__fisher_cache_list)
|
|
if not contains -- $name $enabled
|
|
printf "%s\n" $name
|
|
end
|
|
end
|
|
|
|
case -
|
|
__fisher_list
|
|
|
|
case -h
|
|
printf "Usage: fisher list [--enabled] [--disabled] [--help]\n\n"
|
|
printf " --enabled List plugins that are enabled\n"
|
|
printf " --disabled List plugins that are disabled\n"
|
|
printf " -h --help Show usage help\n"
|
|
return
|
|
end
|
|
end
|