Replies: 2 comments 1 reply
-
Hi @jbakosi , Answer to question 2: you can specify the description of the parameters by using the syntax:
Answer to question 1: the library doesn't allow real "optional parameters", however, you can repeat the same command several times (see the command "add" in the "complete.cpp" example):
in this case, the "z" parameter is sort of optional. You can use this feature to mimic optional parameters, however, this results in having the same command repeated in the help description. |
Beta Was this translation helpful? Give feedback.
-
Thanks for the answers @daniele77. 3 is only a workaround and it may be confusing to list the command twice in the help, and 2 encloses the string passed in angled brackets which are usually understood as mandatory, so it may also be confusing. How much effort do you think would it take to add support for truly optional arguments? If not too bad, I could look into it and try to add it (with potentially some help from you.) |
Beta Was this translation helpful? Give feedback.
-
Is it possible to have optional command arguments? What I'd like to do is the following.
Instead:
I would like
So my question is two-fold:
<string> <int>
?Thanks.
Beta Was this translation helpful? Give feedback.
All reactions