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

Allow to customize help flag. #43

Merged
merged 5 commits into from
Nov 20, 2017

Conversation

lambdafu
Copy link
Contributor

Another little helper: Allows to customize the help flag without fully exposing help_ptr_. This makes it possible to translate the string, for example. Inspired by taywee/args.

@lambdafu lambdafu force-pushed the lambdafu/addhelpflag branch from 18610aa to 3b67be7 Compare November 20, 2017 03:02
@codecov
Copy link

codecov bot commented Nov 20, 2017

Codecov Report

Merging #43 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #43   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           9      9           
  Lines        1168   1174    +6     
  Branches      239    240    +1     
=====================================
+ Hits         1168   1174    +6
Impacted Files Coverage Δ
include/CLI/App.hpp 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1b02682...3b67be7. Read the comment docs.

@codecov
Copy link

codecov bot commented Nov 20, 2017

Codecov Report

Merging #43 into master will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@          Coverage Diff          @@
##           master    #43   +/-   ##
=====================================
  Coverage     100%   100%           
=====================================
  Files           9      9           
  Lines        1171   1179    +8     
  Branches      240    242    +2     
=====================================
+ Hits         1171   1179    +8
Impacted Files Coverage Δ
include/CLI/App.hpp 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 79cd791...aba829b. Read the comment docs.

@henryiii
Copy link
Collaborator

Does it really need to throw if the help pointer is already set? Couldn't it just deregister the old help pointer instead? That way, someone who just wants to change the help string or flag name doesn't have to know about the false argument to App.

@henryiii
Copy link
Collaborator

Other than the answer to that question, it looks good. I added a /// comment, those are rendered into Doxygen API docs, and moved to using this internally as well.

@lambdafu
Copy link
Contributor Author

Deregistering would be better, but I don't know how to do that :)

@henryiii
Copy link
Collaborator

Okay, I can add that, just a second..

@henryiii henryiii force-pushed the lambdafu/addhelpflag branch from adaba5b to aba829b Compare November 20, 2017 16:07
@henryiii henryiii merged commit f7e10d0 into CLIUtils:master Nov 20, 2017
@henryiii
Copy link
Collaborator

Thanks!

@henryiii henryiii added this to the v1.3 milestone Nov 22, 2017
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