Classic case of not seeing `and` as a new command:
`__fish_git_using_command config and anotherthing`
causes `and anotherthing` to be passed as arguments to
`__fish_git_using_command` instead of being executed.
[ci skip]
A function file for a function used only by one completion (and
unlikely to be used anywhere else).
If another user shows up, we can move it out again.
Part of #5279
[ci skip]
This should be the last call to `grep` outside of a script
specifically related to `grep`.
(With the exception of `zpool`, which I've already written, but which
will probably be merged later)
Also prevents file completions where they are not approprite, and
additionally shortened the descriptions to fit in two pager columns
in an 80-wide terminal for some platforms.
Apparently that's actually faster than jq, and it's more likely to be
installed.
Also it should convince the arch packager to remove the jq dependency.
The indentation is weird, though.
[ci skip]
+ tweaks for Linux: shorter descriptions, suppress file completions
+ Add correct completions for macOS, NetBSD, FreeBSD, OpenBSD, DragonFly
+ Solaris dmesg has no options, so complete nothing there
These aren't perfect, but the tool is pretty much hostile to proper
completions - it includes a "--machine-readable" option, but `vagrant
global-status --machine-readable` prints great output like
```
1551816037,,ui,info,id
1551816037,,ui,info,name
1551816037,,ui,info,provider
1551816037,,ui,info,state
1551816037,,ui,info,directory
1551816037,,ui,info,
1551816037,,ui,info,-------------------------------------------------------------------------
1551816037,,ui,info,d3ea265
1551816037,,ui,info,default
1551816037,,ui,info,virtualbox
1551816037,,ui,info,poweroff
1551816037,,ui,info,/home/alfa/dev/oi-userland
1551816037,,ui,info,
1551816037,,ui,info,fdf42c4
1551816037,,ui,info,default
1551816037,,ui,info,virtualbox
1551816037,,ui,info,poweroff
1551816037,,ui,info,/home/alfa/dev/vagrant/NetBSD
1551816037,,ui,info,
1551816037,,ui,info,f8f6eff
1551816037,,ui,info,default
1551816037,,ui,info,virtualbox
1551816037,,ui,info,poweroff
1551816037,,ui,info,/home/alfa/dev/vagrant/fedora
1551816037,,ui,info,
1551816037,,ui,info, \nThe above shows information about all known Vagrant environments\non this machine. This data is cached and may not be completely\nup-to-date (use "vagrant global-status --prune" to prune invalid\nentries). To interact with any of the machines%!(VAGRANT_COMMA) you can go to that\ndirectory and run Vagrant%!(VAGRANT_COMMA) or you can use the ID directly with\nVagrant commands from any directory. For example:\n"vagrant destroy 1a2b3c4d"
```
and still takes 500ms to do so. The actual information is in a json
file, which we can't expect to read, and it doesn't have linebreaks or
such which we could use to hack-parse it.
So this is the best we can do for the most important bits (the
machineids), so let's just add this as-is.
[ci skip]
`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]