`ipset list --name` is a privileged operation, and it prints an
"Operation not permitted" error when done as a normal user.
What's worse, this did it on loading (the command substitution wasn't
quoted), so we'd print the error as soon as you did `ipset `.
Only do the operation when necessary, and don't print the error.
This'll effectively only make it work for root shells (not e.g. `sudo
ipset`), but I don't want to sprinkle `sudo` in the completion.
(Also why does listing stuff require root? That's not how it works
e.g. for ips. But I don't actually know what ipset is for, so maybe
there is a good reason.)
[ci skip]
A key frustration with the prior version of mkvextract completions was
that even in a position where a filename would be expected, no
completions for a filename were offered. This update introduces more
rigorous argument handling, most importantly restricting
track/attachment completion to when both a mode and a file are
specified.
For some reason Ubuntu's version of screen includes timestamps in the
output of `screen -list`. The timestamps aren't present on other
distributions (tested on Fedora and Arch Linux), nor when building from
source. This commit fixes the regex so that with or without the
timestamp, fish will correctly show suggestions for screen sessions.
Arch changed the version string to include the package rel, so it
looks like
systemd 241 (241.7-2-arch)
which would break our simple `string replace` and `test`.
Fixes#5689.
[ci skip]
This was treated as a glob where it was still enabled, most likely removing the "-E" option from argparse,
which caused `sudo -E` to not be parsed correctly, breaking completion.
(There was no error because the glob was used with `set`)
Fixes#5675.
[ci skip]
Just a bunch of rewriting descriptions and some arguments.
Most arguments here are uncompleteable, and most of these options will
never be used.
[ci skip]
These are files with staged modifications, and additional unstaged
ones.
In practice what happened was that you ran
git add somefile
then editted it some more and tried to
git add <TAB>
which didn't offer it anymore.
Now, we offer it if either modified or modified-staged is set.
Currently modified-staged isn't ever set alone, but through
all-staged, so we still need to keep offering the file then.
(This shows that the current switch/case might have some holes)
Fixes#5648.
[ci skip]
I hope this is now complete.
Also, shorten enough descriptions to make `string match --<TAB>`
show a two column pager with 80 cols.
We really should have shown more retraint in the design of `string`,
not all of the flags required both a long and short option created.
* brew.fish: Add `update-reset` subcommand
This command resets all tap's remotes to the latest available upstream. Ideal for debugging before reporting bugs or just housekeeping.
Add missing newlines.
* Add `brew.fish` changes to CHANGELOG.md
Don't do it when the relative path is simple (purely descending),
unless the token starts with ":/".
Also stop offering directories - if they need to be disambiguated, the
normal completion logic will take care of that.
Fixes#5574.
[ci skip]
shorter descriptions that can fit in a terminal window, and option arguments added.
hide one option that is only functional on Cygwin unless we are on Cygwin
On `set fish_color_cwd <TAB>`, a bunch of named colors are
shown in the pager. Each and every one has a description of "Color".
These are all very obviously colors, and none are not colors,
the description does not tell us anything specific about the item.
Descriptions in situations like this are actually a hinderance
because of the way they cause less to fit into the pager. Remove it
This was an oversight from the previous commit. Not that it matters
much, because we already removed $files.
Still, this would fail if someone defined a global $files, so let's fix it.
[ci skip]
We can't complete these, and now the user can do
```
set -g __fish_git_alias_$alias $command
```
e.g.
```
set -g __fish_git_alias_co checkout
```
if the arguments in the alias end up going to `git alias`.
Fixes#5412.
[ci skip]
This enables fuzzy-matching outside of the current directory again.
As it turns out, the performance impact here isn't as large as I
thought - it's massively dependent on caching.
Fixes#5476.
I had previously introduced a lot of updates and fixes to npm registry
based completions for `yarn` but hadn't ported them to `npm` as well
(although they can be dropped in as-is). This patch shares the code
between the two, which resides in an explicitly sourced multi-function
fish script.
The informational message is only shown the first time an attempt at
completing `yarn add` is made per session. This should vastly improve
the discoverability of this feature as regular yarn/npm users would
never have `all-the-package-names` installed normally.
This checks if uname exists (we already call it elsewhere without
check, nobody has complained, uname is in POSIX), then calls to see if
it's "Linux", and only then offers any completions.
Since we don't have any other version to offer, the check is worse
than useless.