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

Full help/usage display and modification example #975

Merged
merged 6 commits into from
Oct 7, 2024

Conversation

tansy
Copy link
Contributor

@tansy tansy commented Jan 8, 2024

Example of help modification as documentation supplement.

Copy link

codecov bot commented Jan 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e4ee3af) to head (0ff4e33).
Report is 40 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##              main      #975     +/-   ##
===========================================
  Coverage   100.00%   100.00%             
===========================================
  Files           17        17             
  Lines         4546      4680    +134     
  Branches         0      1005   +1005     
===========================================
+ Hits          4546      4680    +134     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@phlptp
Copy link
Collaborator

phlptp commented Jan 10, 2024

Thanks this looks good, I will integrate after we get the release out so it gets tested and built with all the other examples, but I think this will be helpful.

@tansy
Copy link
Contributor Author

tansy commented Jan 10, 2024

That 'no parameter option' was my guess, and I just noticed, that it has `level' parameter. I think that needs correction.

Shall it be
encode->add_option("-R, --remove", nullptr, "remove input file");
or
encode->add_flag("-R, --remove", "remove input file");?

Also I world add an option to make space between shirt and long option description (-h,--help -> -h, --help), but don't know how.

examples/help_usage.cpp Outdated Show resolved Hide resolved
examples/help_usage.cpp Outdated Show resolved Hide resolved
@phlptp
Copy link
Collaborator

phlptp commented Oct 7, 2024

Going to merge this, as the failures are unrelated (an update in test runners). Will clean it up soon in a subsequent PR.

@phlptp phlptp merged commit 79b1430 into CLIUtils:main Oct 7, 2024
53 of 55 checks passed
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.

2 participants