fish-shell/share/completions/pip3.fish
Fabian Homborg 43df5ba828 completions: Stop checking for command existence
Since 4414d5c888 (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.
2020-05-18 20:48:36 +02:00

5 lines
365 B
Fish

# pip[2|3] emits (or emitted) completions with the wrong command name
# See discussion at https://github.com/fish-shell/fish-shell/pull/4448
# and pip bug at https://github.com/pypa/pip/pull/4755
# Keep this even after pip fix is upstreamed for users not on the latest pip
pip3 completion --fish 2>/dev/null | string replace -r -- " -c\s+pip\b" " -c pip3" | source