argh
argh copied to clipboard
A few help and error reporting improvements
Hi!
I've added a few features related to help and error reporting:
- a new ‘help_text’ attribute that denotes a pseudo-argument containing the generated help – it comes handy if you need to construct “long help”;
- a new TopLevelCommand instance method ‘report_error_and_exit‘ – helps with reporting higher level errors / inconsistencies in (combinations of) arguments;
- a new ‘verbose_error‘ attribute – it harmonizes the internal error reporting style with ‘report_error_and_exit‘ output for UI consistency.
I've included an example utilising all of these additions at argh/examples/help_text_example.rs, please check it out.
Hope you find it useful.