mirror of
https://github.com/fish-shell/fish-shell
synced 2024-12-27 05:13:10 +00:00
43df5ba828
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.
22 lines
950 B
Fish
22 lines
950 B
Fish
# plain vi (as bundled with SunOS 5.8)
|
|
# todo:
|
|
# -wn : Set the default window size to n
|
|
# +command : same as -c command
|
|
|
|
# Check if vi is really vim
|
|
if vi --version >/dev/null 2>/dev/null
|
|
complete -c vi -w vim
|
|
else
|
|
complete -c vi -s s -d 'Suppress all interactive user feedback'
|
|
complete -c vi -s C -d 'Encrypt/decrypt text'
|
|
complete -c vi -s l -d 'Set up for editing LISP programs'
|
|
complete -c vi -s L -d 'List saved file names after crash'
|
|
complete -c vi -s R -d 'Read-only mode'
|
|
complete -c vi -s S -d 'Use linear search for tags if tag file not sorted'
|
|
complete -c vi -s v -d 'Start in display editing state'
|
|
complete -c vi -s V -d 'Verbose mode'
|
|
complete -c vi -s x -d 'Encrypt/decrypt text'
|
|
complete -c vi -r -s r -d 'Recover file after crash'
|
|
complete -c vi -r -s t -d 'Edit the file containing a tag'
|
|
complete -c vi -r -c t -d 'Begin editing by executing the specified editor command'
|
|
end
|