completions/apt improvements and additions for apt completions
- completions/apt.fish: add completions for history related sub-commands of apt that were added in apt version 3.0
- completions/apt.fish: add completion for the comment option for the sub-commands where it is applicable
- completions/apt.fish: add completion for why and why-not sub-commands
- completions/apt.fish: add and change which sub-commands get completions for installed or all packages
- completions/apt.fish: add support for new source list format (currently incomplete)
TODOs:
- [x] If addressing an issue, a commit message mentions
Fixes issue #<issue-number> - [x] Changes to fish usage are reflected in user documentation/manpages.
- [x] Tests have been added for regressions fixed
- [x] User-visible changes noted in CHANGELOG.rst
- [x] Complete support for new source list format, ~~does not support multiple suites in one definition~~ the 5th commit fixes this
I am considering just simply not supporting multiple suites in one definition, for better context I will give an example of the of the sources list format:
/etc/apt/sourceslists.d/foo.sources
# Example comment
Types: deb deb-src
URIs: https://deb.debian.org/debian/
Suites: sid experimental
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
The Suites: section can have multiple values and from my testing apt does seem to work and understand them, in this case thoese values are sid and experimental but I think it is more common to users to define those in separated files
then you would have:
/etc/apt/sourceslists.d/bar.sources
# Example comment
Types: deb deb-src
URIs: https://deb.debian.org/debian/
Suites: sid
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
/etc/apt/sourceslists.d/baz.sources
# Example comment
Types: deb deb-src
URIs: https://deb.debian.org/debian/
Suites: experimental
Components: main contrib non-free non-free-firmware
Signed-By: /usr/share/keyrings/debian-archive-keyring.gpg
in this case the completions for repositories work fine in my testing
maybe we can outsource the source-list parsing to apt or to a python library?