Use `apt-cache show` instead of `apt-cache packagenames` to efficiently
print package names and a brief description instead of the placeholder
(localized) "Package" text that was previously printed. This applies to
both available and installed packages (for inistall and remove operations,
respectively).
TODO: update `__fish_print_packages` for non-debian platforms to do the
same.
Utilized the `--install` flag added in commit #8c09d6e.
Limit `eopkg remove/autoremove/check ...` completions to installed packages.
Limit `eopkg install/upgrade/info ...` completions to available packages.
Added a new flag `--installed` via `argparse` to `__fish_print_packages`
which indicates that only installed packages should be listed.
TODO: Other non-debian/apt platforms should take advantage of this flag/
behavior as well.
It was only introduced in 2.16, which was released in January 2018.
Instead, we just use a bare "--ignored", which is equivalent to "--ignored=traditional".
The difference to "--ignored=matching" mode shouldn't matter to us here.
Fixes#5074.
I'm not sure what was wrong with the old syntax, but I needed to switch
the outer quotes to ' and the inner quotes to " in order for the
completions to work when they weren't explicitly sourced.
Additionally, realized that the overload for __fish_complete_suffix can
be used to get the filtered list of kernel modules from /boot/kernel in
the initial run.
Allows the most painful of curl's arguments to be completed by fish by
restoring file-based completions for paths prefixed with `@` (which are
typically used after parameters like --data).
As defined in the `go help packages`:
Many commands apply to a set of packages:
go action [packages]
Usually, [packages] is a list of import paths.
This patch introduces automatic lookup of said packages from GOPATH
using `go list`, and provides them as options go subcmds.
I'm not sure what was up with the old completions,
`$__fish_service_commands` is not set anywhere and completions for the
command (not the service) were not being generated on my machine.
macOS and (AFAICT) most Linux distributions ship with the Info-ZIP
version of unzip, which has the `unzip -h` flag; but other
implementations of unzip do not necessarily have it (i.e. FreeBSD).
`unzip` under FreeBSD does not support `unzip -h`. Under both Linux and
FreeBSD, `unzip -v` presents the list of options, though. Using this
instead of `unzip -h` to detect the Debian-patched version of the
Info-ZIP unzip program.
These completions are apparently based on an auto-generated version,
so there's a whole bunch of rewording to be done here.
Also for some reason some of the options are mentioned more than once?