How to skip the required arguments of the subcommand
?
#5916
Unanswered
chungquantin
asked this question in
Q&A
Replies: 1 comment 5 replies
-
I don't see a general way of doing this. The big problem with this is with the definition of #[derive(Parser)]
struct ExternalSubcommand {
#[arg(long)]
name: String
} What do we put in for |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi, I wonder if there are anyway to set a flag for that subcommand to avoid parsing checks? Let's say I want to check the arguments passed to the subcommand on the higher command level and handle the logic there, I don't want the error thrown for required arguments when I use the subcommand.
Note: I can't update the subcommand as it is from external crates.
One approach I found is to use
ignore_errors
but somehow the flag fails the--help
command which I don't find the root cause yet.Beta Was this translation helpful? Give feedback.
All reactions