TeXitoi / structopt

Parse command line arguments by defining a struct.
Other
2.7k stars 149 forks source link

Add StructOpt::gen_help to generate help string #529

Closed yanganto closed 1 year ago

yanganto commented 1 year ago

Hi there, Thanks for providing this fantastic crate, I love it so much.

If there is a way to generate the help string from struct directly will be really helpful for me.

This method may be a good idea to do. <Opt as StructOpt>::gen_help()

Such that I can avoid getting the help string by calling the program itself again like following https://github.com/yanganto/s3rs/blob/master/src/command/mod.rs#L539-L547

If there is anything more I can do in this PR please kindly let me know. Thank you for reviewing.

TeXitoi commented 1 year ago

Hi.

StructOpt does not get new features. The complete functionalities are now present in clap since v3, so new features go on clap.

Also, note that you can implement this from outside structopt, so this PR will not solve something that's not solvable from the outside.

Thanks for the contribution.

yanganto commented 1 year ago

Got it, thanks for the info.