fisher/completions/fisher.fish
Jorge Bucaran ebec1eaa01
Fisherman 1.0 RC
* 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.

* Large documentation rewrite. Better, simpler, more concise
  and more consistent.

* Fisherman now detects if users have modified their fish
  prompt using fish_config and if so, uninstalls $fisher_prompt.
2016-02-29 23:13:29 +09:00

38 lines
1.2 KiB
Fish

set -l IFS ";"
complete -xc fisher
complete -c fisher -n "__fish_use_subcommand" -s h -l help -d "Show usage help"
complete -c fisher -n "__fish_use_subcommand" -s v -l version -d "Show version information"
complete -c fisher -a "fisherman" -d "Update Fisherman" -n "__fish_seen_subcommand_from update"
__fisher_help_guides | while read -l guide info
complete -c fisher -n "__fish_seen_subcommand_from help" -a $guide -d "$info"
end
__fisher_help_commands | while read -l command info
complete -c fisher -n "__fish_use_subcommand" -a $command -d "$info"
complete -c fisher -n "__fish_seen_subcommand_from help" -a $command -d "$info"
eval fisher_$command -h | __fisher_complete fisher $command
end
set -l plugins (
if test -s $fisher_file
__fisher_file < $fisher_file | __fisher_name
end
)
begin
awk -F '\n' -v RS='' -v OFS=';' ' { print $1, $3 } ' $fisher_cache/.index ^ /dev/null
__fisher_cache_list
end | sort -ut ';' -k1,1 | while read -l name info
if contains -- $name $plugins
complete -c fisher -n "__fish_seen_subcommand_from u update uninstall" -a "$name" -d "$info"
else
complete -c fisher -n "__fish_seen_subcommand_from i install" -a "$name" -d "$info"
end
end