Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

A few help and error reporting improvements #190

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

optimistiCli
Copy link

@optimistiCli optimistiCli commented Apr 13, 2024

Hi!

I've added a few features related to help and error reporting:

  1. a new ‘help_text’ attribute that denotes a pseudo-argument containing the generated help – it comes handy if you need to construct “long help”;
  2. a new TopLevelCommand instance method ‘report_error_and_exit‘ – helps with reporting higher level errors / inconsistencies in (combinations of) arguments;
  3. 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant