These are chat archives for kbknapp/clap-rs

Dec 2017
Dec 24 2017 21:52
Is it possible to only parse known args? I get an error if I provide an unknown argument, but I'd like it to be ignored.
Kevin K.
Dec 24 2017 23:40
Yes, but it also depends on your exact use case
If you can post an example I can tell you which option may be best
If not, check out AppSettings::TrailingVarArg, or AppSettings::AllowExternalSuBcommands
Autocorrect screwed up the capitalization of that last ones
Dec 24 2017 23:51
Basically, what I want to do is do two phases of argument parsing
audioconv --codec opus --bitrate 64000
for instance
the bitrate argument depends on what codec is selected
so the first pass detects the codec, and then parses again using a codec specific parser