This was intended to stop showing the user "unimportant" variables,
but it just didn't complete them entirely, even if the current token
starts with a dunder (or `fish` of all things!).
Because completions sort `_` last, let's just complete these always
and let the user filter them.
The `snap interfaces` command prints out a deprecation notice to stderr. This breaks the completion
support for interfaces, connect and disconnect commands like so:
```
$ snap connect <TAB>error: no interfaces found
error: no interfaces found
...
'snap interfaces' is deprecated; use 'snap connections'.
'snap interfaces' is deprecated; use 'snap connections'.
'snap interfaces' is deprecated; use 'snap connections'.
error: no interfaces found
error: no interfaces found
'snap interfaces' is deprecated; use 'snap connections'.
```
Ultimately, the snap command completion should switch to `snap connections`. However, for now try to
workaround the notice by redirecting stderr.
Signed-off-by: Maciek Borzecki <maciek.borzecki@gmail.com>
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.
The local-exported variable will have disappeared by the time the
function is called.
"-V"/"--inherit-variable" is meant for something like this.
Fixes#7011
Add missing options:
--path causes the specified variable to be treated as a path variable, meaning it will automatically be split on colons, and joined using colons when quoted (echo "$PATH") or exported.
--unpath causes the specified variable to not be treated as a path variable. Variables with a name ending in "PATH" are automatically path variables, so this can be used to treat such a variable normally.
[ci skip]
* Fix issue if md5sum is used instead of md5
Both have a different output which results in different array sized
Signed-off-by: Ron Gebauer <ron.gebauer@raytion.com>
* Add feedback
Signed-off-by: Ron Gebauer <ron.gebauer@raytion.com>
This was a weird one. We split the aliases correctly even with
multiple lines, but then broke it all again when we just printed the
description.
Note that it would be possible to use `string split0` here, but since
anything longer than a line is likely too long for a description
anyway we don't bother.
Fixes#6946.