fork/fish-shell

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

amiyzkuShortened some which.fish completions. (#10347)bb6b3101f

master
1.3 KiB19 linesraw
1if which -v >/dev/null 2>/dev/null # GNU
2    complete -c which -s a -l all -d "Print all matching executables in PATH, not just the first"
3    complete -c which -s i -l read-alias -d "Read aliases from stdin, reporting matching ones on stdout"
4    complete -c which -l skip-alias -d "Ignore option '--read-alias'"
5    complete -c which -l read-functions -d "Read shell function definitions from stdin, reporting matching ones on stdout"
6    complete -c which -l skip-functions -d "Ignore option '--read-functions'"
7    complete -c which -l skip-dot -d "Skip dirs in PATH that start with a dot"
8    complete -c which -l skip-tilde -d "Skip dirs in PATH that start with tilde and executables in \$HOME"
9    complete -c which -l show-dot -d "For matches in PATH dirs that start with a dot, print './programname'"
10    complete -c which -l show-tilde -d "Output a tilde when a dir matches the \$HOME"
11    complete -c which -l tty-only -d "Stop processing options on the right if not on tty"
12    complete -c which -s v -s V -l version -d "Display version and exit"
13    complete -c which -l help -d "Display help and exit"
14else # OSX
15    complete -c which -s a -d "Print all matching executables in PATH, not just the first"
16    complete -c which -s s -d "Print no output, only return 0 if found"
17end
18
19complete -c which -a "(__fish_complete_subcommand)" -x