These are chat archives for kbknapp/clap-rs

21st
Mar 2017
Mike Lubinets
@mersinvald
Mar 21 2017 12:44

Hello! I need to make such CLI interface:

./my_program --in <file> --out <file> --mode <mode>
             --in <file> --out <file> --mode <mode>
             --in <file> --out <file> --mode <mode>
...

I couldn't find similar example in examples folder.
Could you please give me some hints how it can be done in clap terms?

Kevin K.
@kbknapp
Mar 21 2017 12:57
Make for each arg (in, out, mode) set multiple(true).number_of_values(3)
Sorry number of values 1
Mike Lubinets
@mersinvald
Mar 21 2017 13:00

And what about cases like

--mode <> --mode <> --mode <>

Will those be correct?

Kevin K.
@kbknapp
Mar 21 2017 13:10
Yep That's what the above example will do
Or rather allow
Mike Lubinets
@mersinvald
Mar 21 2017 13:12
Ok, then I'll just handle it after.
Thank you!
Mike Lubinets
@mersinvald
Mar 21 2017 13:52
How can I add an additional usage line with custom text?