Automatic shell completion generation

* Add automatic shell completion generation.
Add automatic generation of shell completion scripts for various shells
(the ones supported by `clap_complete`). The scripts can be generated
using the `generate-shell-completion` xtask, which outputs the shell
script to stdout.

* Improve shell completion generation xtask.
General improvements to both the shell completion generation as well as
the xtask package itself. Update the README to match the new additions.
This commit is contained in:
Thomas Frans
2023-03-09 19:02:11 +01:00
committed by GitHub
parent c457efc6fc
commit e8adff444c
6 changed files with 113 additions and 17 deletions

View File

@@ -172,13 +172,20 @@ cargo deb
You can find the package under `target/debian`.
#### Packaging Information
The following files are provided and should be bundled together with ncspot:
- LICENSE
- images/logo.svg (optional)
- misc/ncspot.desktop (for Linux systems)
- misc/ncspot.1 (for Linux systems)
- misc/ncspot.bash (bash completions)
- misc/\_ncspot (zsh completions)
- misc/ncspot.fish (fish completions)
- misc/ncspot.elv (elvish completions)
- misc/\_ncspot.ps1 (powershell completions)
Some of these files have to be generated. Execute `cargo xtask --help` for more information.
### Audio Backends
By default `ncspot` is built using the PulseAudio backend. To make it use the