-
Notifications
You must be signed in to change notification settings - Fork 13
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(iota): Add shell completions #4608
base: develop
Are you sure you want to change the base?
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.
I would either put all this under a non-default feature or remove the checked-in completions.
If we publish them, then the command is not very useful for the masses and it's adding dependencies for not much.
I would put this behind a feature flag and only use that feature when we release binaries to generate the completions. |
I think that's reasonable. |
oop Co-authored-by: Thibault Martinez <[email protected]>
@@ -363,6 +363,8 @@ pub enum IotaCommand { | |||
/// Invoke Iota's move-analyzer via CLI | |||
#[clap(name = "analyzer", hide = true)] | |||
Analyzer, | |||
#[cfg(feature = "gen-completions")] | |||
GenerateCompletions(crate::completions::CompletionCommand), |
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.
kinda bothers me that the command variant doesn't match the command type
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.
If anyone else wants to change this, vote here 😆 It doesn't bother me, personally.
Description of change
Adds the ability to generate shell completion files using
clap_completion
to the CLI. These files are also included in these changes. Let me know if you think these should be checked in, or whether users should be required to generate them themselves. Of course, if they are checked it they must be updated whenever the CLI changes. This could be checked in CI.Links to any relevant issues
Closes #4495