-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
feat: add shell completions #87
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
One more thing: how do I actually use this? Specifically in https://github.com/juspay/nix-dev-home ? |
Okay, I tested this PR in https://github.com/srid/nixos-config - but I don't see any completions. I typed |
When I manually source the completion script by generating it then it works. |
When I add When I add What can we do in |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cargo.toml
Outdated
@@ -33,6 +33,8 @@ nix_rs = { version = "0.5.0", features = ["clap"] } | |||
tracing-subscriber = { version = "0.3.18", features = ["env-filter"] } | |||
tracing = "0.1.37" | |||
nix_health = "0.4.1" | |||
clap_complete = "4.4.0" | |||
async-trait = "0.1.73" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This dependency is no longer used.
src/cli.rs
Outdated
command::NixCmd, | ||
config::NixConfig, | ||
flake::{system::System, url::FlakeUrl}, | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Undo this re-arrangement of imports as it is not necessary for this PR.
Add Shell Completions in nixci using clap_complete similar to how we have in ripgrep