Skip to content

Positional arguments order in clap 3.x #2260

Answered by pksunkara
JohnnyJayJay asked this question in Q&A
Discussion options

You must be logged in to vote

You can use the index(0) method.

#[clap(short, long, value_name = "FILE", index = 1)]
#[clap(short, long, value_name = "SUBCOMMAND", index = 0)]

Replies: 3 comments 7 replies

Comment options

You must be logged in to vote
1 reply
@JohnnyJayJay
Comment options

Comment options

You must be logged in to vote
5 replies
@JohnnyJayJay
Comment options

@pksunkara
Comment options

@JohnnyJayJay
Comment options

@pksunkara
Comment options

@JohnnyJayJay
Comment options

Answer selected by pksunkara
Comment options

You must be logged in to vote
1 reply
@mokeyish
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants