How to implement a command similar to git branch
#5674
Answered
by
epage
okou19900722
asked this question in
Q&A
-
how to implement it with clap derive? Thanks |
Beta Was this translation helpful? Give feedback.
Answered by
epage
Aug 14, 2024
Replies: 1 comment 1 reply
-
If I understand #[derive(Parser)]
struct Branch {
#[arg(short = 'D')]
delete: bool,
name: Option<String>,
} |
Beta Was this translation helpful? Give feedback.
1 reply
Answer selected by
okou19900722
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If I understand
git branch
correctly,-D
is a flag, rather than an option, so this would be