These are chat archives for kbknapp/clap-rs

20th
Aug 2017
John
@GreeeneJD
Aug 20 2017 00:10
Hi, everyone. I have a question. I need some help with clap. I'm writing some tool and stuck on one problem. I want implement each subcommand as a separate program. And my problem is how to get raw arguments after subcommand. I don't need only one or some of them. I just want to send everything what I got after subcommand to another program as args. Is it possible to do it?
I tried a lot but without success
Jeroen Bollen
@Binero
Aug 20 2017 00:11
You want something like
myprogram --param1 subcommand --param2
And you want to get param2?
John
@GreeeneJD
Aug 20 2017 00:12
myprogram subcommand --param2 -f -a -e --param1 arg1 (and so on)
Kevin K.
@kbknapp
Aug 20 2017 00:13
@Binero try Arg::empty_values(false)
John
@GreeeneJD
Aug 20 2017 00:13
I want to get whole line --param2 -f -a -e --param1 arg1 (and so on) and send it as args to another program
Jeroen Bollen
@Binero
Aug 20 2017 00:13
@kbknapp I will try that when I get back to programming, probably tomorrow.
Kevin K.
@kbknapp
Aug 20 2017 00:14
@GreeeneJD look at the docs for external subcommands
I'm on mobile but let me see if I can find them ;)
John
@GreeeneJD
Aug 20 2017 00:15
Ok. I'll look it
I think there's also an example in the examples directory of the repo
John
@GreeeneJD
Aug 20 2017 00:36
@kbknapp Kevin. Thank you a lot!
Some day ago i tried to find your email address to say thank you for you great crate but i didn't found it. But i found you here) So thank you a lot and for help too (it's works)
Kevin K.
@kbknapp
Aug 20 2017 00:51
No problem! Anytime :)
Denis Lisov
@tanriol
Aug 20 2017 09:20
@Binero In cargo run -- repack --iboot -p2048, does it read -p2048 as a file name instead of an option?
Jeroen Bollen
@Binero
Aug 20 2017 11:40
@tanriol I haven't applied the potential fix yet, but as it was, it did not read the 'p2048' as a file name.
When doing value_ofit gave me None.