fork/fish-shell

git clone https://git.julia.blue/fork/fish-shell

Fabian Boehmcompletions: More shortening5dc07c9e7

master
2.3 KiB29 linesraw
1complete navi --no-files
2
3set --local sub_commands fn help info repo widget
4set --local options best-match cheatsh finder fzf-overrides fzf-overrides-var help path print query tag-rules tldr version
5
6# subcommands
7complete navi -n "not __fish_seen_subcommand_from $sub_commands && \
8    not __fish_contains_opt -s h -s p -s q -s V $options" -a "$sub_commands"
9
10set --local internal_functions "url::open welcome widget::last_command map::expand"
11complete navi -n "__fish_seen_subcommand_from fn && not __fish_seen_subcommand_from $internal_functions" \
12    -k -a $internal_functions
13
14set --local supported_shells "bash zsh fish elvish"
15complete navi -n "__fish_seen_subcommand_from widget && not __fish_seen_subcommand_from $supported_shells" -k -a $supported_shells
16
17# options
18complete navi -n "not __fish_seen_subcommand_from $sub_commands" -l best-match -d "Returns the best match"
19complete navi -n "not __fish_seen_subcommand_from $sub_commands" -x -l cheatsh -d "Searches for cheatsheets using the cheat.sh repository"
20complete navi -n "not __fish_seen_subcommand_from $sub_commands" -x -l finder -a "fzf skim" -d "Finder application to use"
21complete navi -n "not __fish_seen_subcommand_from $sub_commands" -x -l fzf-overrides -d "Finder overrides for snippet selection"
22complete navi -n "not __fish_seen_subcommand_from $sub_commands" -x -l fzf-overrides-var -d "Finder overrides for variable selection"
23complete navi -n "not __fish_seen_subcommand_from $sub_commands" -x -s h -l help -d "Print help information"
24complete navi -n "not __fish_seen_subcommand_from $sub_commands" -r -s p -l path -d "Colon-separated list of paths containing .cheat files"
25complete navi -n "not __fish_seen_subcommand_from $sub_commands" -l print -d "Instead of executing a snippet, prints it to stdout"
26complete navi -n "not __fish_seen_subcommand_from $sub_commands" -x -s q -l query -d "Prepopulates the search field"
27complete navi -n "not __fish_seen_subcommand_from $sub_commands" -x -l tag-rules -d "[Experimental] Comma-separated list as filter for tags. ! represents negation"
28complete navi -n "not __fish_seen_subcommand_from $sub_commands" -x -l tldr -d "Searches for cheatsheets using the tldr-pages repository"
29complete navi -n "not __fish_seen_subcommand_from $sub_commands" -x -s V -l version -d "Print version information"