-
Notifications
You must be signed in to change notification settings - Fork 397
Version add #452
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
Version add #452
Conversation
Codecov Report
@@ Coverage Diff @@
## master #452 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 12 12
Lines 3687 3724 +37
=========================================
+ Hits 3687 3724 +37
Continue to review full report at Codecov.
|
include/CLI/App.hpp
Outdated
| } | ||
| /// Set the version as a string | ||
| App *version(const std::string &versionString) { | ||
| set_version_flag("-v,--version", versionString); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
-v is commonly also used for verbose by programs (including cp, rm, wget, curl, mv).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So is -V basically it's a guess which one will be equivalent to --version and which to --verbose. Each default is equally good/bad.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok, I removed the "-v" from the default since it seems that could mean any number of different things from common applications.
|
closes #436 |
|
I am not really sure we need to have the |
|
I am fine removing it, hadn't thought about the ambiguity on whether it would be accessing the version. |
|
Do we want to keep the |
|
No (I'd missed that, actually), but that's what I would expect "version()" to do; the dual use might be also a bit confusing. |
…flags, similar to help flags
|
removed all |
|
I'm sorry, I meant "Yes, we could keep it" - somehow I stared with No then (I think) explained why we should keep it. I was just saying that version() returning a string and version(string) could possibly be confusing, so it was another reason that it might be nice to remove version(string). |
|
ok, I will that one back in :) |
Add a version operation, similar to config and help, to print out the version and exit. Supports adding the version via a string or callback.
We had been doing this in our application and it might seem to be something that is pretty common to want in applications