作者:手机用户2502859545 | 来源:互联网 | 2023-07-11 09:39
I would like to use clap's easy syntax for different stages in my program then just command line argument parsing. E.g. to parse remote commands with arguments read from sockets. I can already utilize clap using get_matches_from. But even get_matches_from_safe terminates my program when --help or --version gets passed to. I would like to have either an even safer _safe method or an app-setting, that completely blocks any terminate inside the clap crate and some kind of indication, if parsing did succeed or it should have terminated.
Would that be possible?
Best regards,
Drakulix
该提问来源于开源项目:clap-rs/clap
Thanks. This is exactly the behavior I expected at first, when using the safe-function. Hopefully this will be also more intuitive and useful to other users as well. Looking forward to the actual merge!