Skip to content

Allow to customize help flag. - #43

Merged
henryiii merged 5 commits into
CLIUtils:masterfrom
lambdafu:lambdafu/addhelpflag
Nov 20, 2017
Merged

henryiii merged 5 commits into
CLIUtils:masterfrom
lambdafu:lambdafu/addhelpflag

Conversation

@lambdafu

Copy link
Copy Markdown
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

codecov Bot commented Nov 20, 2017

Copy link
Copy Markdown

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

codecov Bot commented Nov 20, 2017 •

Copy link
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
Contributor Author

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

@henryiii

Copy link
Copy Markdown
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
Copy Markdown
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