-
Notifications
You must be signed in to change notification settings - Fork 8
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
Upgrade clap and clap_complete version #154
Conversation
[About the suggestions]
|
I just added both suggestions that I mentioned. Also realized, due to the shell completion approach, it is possible to support all 5 shells that |
[About the comment] Therefore, I think we should write some test code to check this. Comparing command was the previous implementation and we now need a new way to check this. |
I will be back on weekend 🙇 |
Let me know what you think of the updated test. |
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.
Sorry for the late 🙇.
Looks good overall. I have a question about takes_value
. Could you take a look?
|
||
let args: Vec<&Arg> = command |
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.
[Comment]
Good. Maybe we should move this test to another test case. Let's do this later.
Suggestion: |
@TheRustyPickle good. Thank you for caring. When you are ready, please utilize 're-request' review feature in github 🙇♂️ |
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.
Looks good to me! Thank you so much!!! 🚀
.subcommands({ | ||
let mut cmd = get_common_subcommands(); | ||
cmd.push( | ||
Command::new("completion") |
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.
[comment]
Let's make completion
string as enum if it is possible. For example, ActionType::Completion
.
|
||
command | ||
.long("default") | ||
.action(ArgAction::SetTrue), |
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.
Good
The PR contains all the changes required for the cli to work with the latest clap version. I also took the liberty to upgrade clap_complete. Resolves #152
Comment
test_get_start_and_uds_client_command
had to be removed becauseclap::Command
no longer implementsPartialEq, Eq
. If you have any other suggestions, let me know.Suggestion
clap::error
hasrender().ansi()
function now. Enabling it can do this: image1 to image 2print
and theErr()
return, the error message gets printed twice. Remove theprint
and only return theErr()
here?Thank you, @24seconds!