You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
How to remove/replace option's type annotation string? #151
Hi! First, thanks for this library, it works quite well for me!
At the moment I have one question: how to remove (or replace) annotation string near to the option?
For example, adding an option of type int prints in help something like this:
-p,--period INT
If desired type is really int, it is quite OK. Now I would like to change type of period to std::chrono::milliseconds (in general std::chrono::duration<TRep, TPeriod>). I have written needed parser to accomplish this task, modified option's target type, and now help prints me this:
-p,--period TEXT
Well, this looks a bit confusing for me. May I replace this annotation with custom one or just throw it away? E.g. -p,--period PERIOD, or just -p,--period.
Activity
henryiii commentedon Jul 27, 2018
That's its
type_name, and it is->type_name("PERIOD"), or->type_name("").(CLI11 1.6, in 1.5 you'd have to use
->set_custom_option("PERIOD"))akowalew commentedon Jul 30, 2018
Excellent. Thanks a lot!
henryiii commentedon Jul 30, 2018
NP!