-
-
Notifications
You must be signed in to change notification settings - Fork 1
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/completion #54
Feat/completion #54
Conversation
src/action/completion.rs
Outdated
} | ||
} | ||
|
||
pub fn completion(args: CompletionArgs) { |
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.
Probably my bad for not writing about coding styles, but the pattern uses cmd
for the main action function. That way, so we can call action::completion::cmd
.
pub fn completion(args: CompletionArgs) { | |
pub fn cmd(args: CompletionArgs) { |
We can be more practical and change how it displays the value, altering the |
Hey, I just found out that there is a way to define enums as arguments. https://www.rustadventure.dev/introducing-clap/clap-v4/introducing-enums-as-clap-arguments Could you implement that for the shell flag? |
Co-authored-by: Eduardo Rodrigues <[email protected]>
Oh, that's great! I am definitively checking this out ASAP Man, I wish Clap docs had more examples since it relies a lot in macros😓 |
Co-authored-by: Eduardo Rodrigues <[email protected]>
Co-authored-by: Eduardo Rodrigues <[email protected]>
Yeah, their docs on macros are pretty scarce. I was considering refactoring it to the builder format, but it would take some time to do so. |
Merging on a separate branch so we can work fully on #36 before actually releasing. |
9b3a77b
into
EduardoRodriguesF:completion
So, the completion command works the following way:
quartz completion --shell <shell>
The only thing I am kind of struggling to implement is this detailed description that github CLI provides. I couldn't find a way to implement this
flags
section specifying the available shells.