-
Notifications
You must be signed in to change notification settings - Fork 2.1k
feat: add nushell completions #11311
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
base: master
Are you sure you want to change the base?
Conversation
- `clap_complete` doesn't come with nushell completions built-in but they have another crate `clap_complete_nushell` that does. Sucks it isn't supported by default, see clap-rs/clap#5880. This PR implements a wrapper around the enum with nushell included to support nushell completions too. - moved `clap_complete` to workspace dependency to prevent conflicting versions between foundry-common and cast/anvil/forge.
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, smol ask
Implementation makes sense though I'm a bit concerned about leaking these internals into Foundry |
What is the concern? I guess I can publish a mini crate that wraps this and exposes this functionality so the code stays the same as before? But I think security wise this is probably better to have the code in foundry and trust only the official clap crates. |
That as you stated this logic is a concern of the library and not the implementation. That said, I am OK with merging this considering this is a small ask and the discussion upstream looks stale. |
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, pending @grandizzy
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
Motivation
Getting command completions in nushell.
Solution
clap_complete
doesn't come with nushell completions built-in but they have another crateclap_complete_nushell
that does. Sucks it isn't supported by default, see Why are the nushell completions not part of the completions crate? clap-rs/clap#5880. This PR implements a wrapper around the enum with nushell included to support nushell completions too.clap_complete
to workspace dependency to prevent conflicting versions between foundry-common and cast/anvil/forge.PR Checklist