Add shell completions (CLI subcommand + nix packaging)#107
Open
antono wants to merge 2 commits into
Open
Conversation
- Generate bash/zsh/fish/elvish/powershell scripts via clap_complete - Emit before any config/index setup runs - Surface previously-hidden `profile` + new `completions` in help
- postInstall installs bash/zsh/fish completions via installShellFiles - bump rust-overlay to rustc 1.95 (Cargo.lock sysinfo 0.39.2 needs >=1.95)
Contributor
|
✅ Quick checks success |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
codanna completions <bash|zsh|fish|elvish|powershell>subcommand, generated from the clap definitions viaclap_completeso it stays in sync with the CLI automatically.installShellFiles+postInstall), so they're installed automatically with the package — no extra config for home-manager / NixOS users.profilecommand (and the newcompletions) in the custom help text.Details
completionsis emitted immediately after argument parsing — before any config/index/provider setup — so it works without an initialized project.rust-overlayinflake.lockto a rustc 1.95 revision. This is required because the committedCargo.lockpinssysinfo 0.39.2(needs rustc ≥1.95); the flake previously resolved to 1.94 and failed to build.Testing
cargo checkandcargo fmt --allclean..#packages.defaultwith the committedflake.lock; confirmed completions ship to:share/bash-completion/completions/codanna.bashshare/zsh/site-functions/_codannashare/fish/vendor_completions.d/codanna.fishretrievesubcommands complete correctly.Usage