Skip to content

What does ArgAction use for? (clap crate) #4041

Answered by epage
aurexav asked this question in Q&A
Discussion options

You must be logged in to vote

Huh, never documented this in the reference. #4043 fixes that.

It opts you into clap v4's new semantics. In this particular example, it switches from the old default of ArgAction::StoreValue to ArgAction::Set. It also implies #[clap(value_parser)] which will cause the PathBuf to not go through UTF-8 validation and will implicitly set the completions to ValueHint::AnyPath.

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by aurexav
# for free to join this conversation on GitHub. Already have an account? # to comment
Category
Q&A
Labels
None yet
2 participants