mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 01:48:08 +08:00

Since 4414d5c8885b5cd53c7ab42f70bd2824050907f0 (in fish 3.0.0) we don't autoload completions if the command doesn't exist. So there is no need to check inside the scripts anymore. Whats more, a few (like pip and cabal) checked `command -q` instead of `type -q`, meaning they'd fail if someone used a function instead of a command of that name. If the *command* actually needs to exist, checks like that are still warranted, like in `npm` where aliasing it to `nvm` is popular. A teensy additional bit: Make `sysctl -w` the same as `sysctl --write`. That description was bogus.
11 lines
235 B
Fish
11 lines
235 B
Fish
function __fish_complete_cabal
|
|
set -l cmd (commandline -poc)
|
|
if test (count $cmd) -gt 1
|
|
cabal $cmd[2..-1] --list-options
|
|
else
|
|
cabal --list-options
|
|
end
|
|
end
|
|
|
|
complete -c cabal -a '(__fish_complete_cabal)'
|