Closed halloleo closed 3 years ago
As per https://github.com/c-blake/cligen/commit/43f80c2fdfddf1d2fb4794b00ae72ccca58c60b0, somewhere after import cligen and before your dispatch just do:
clCfg.helpSyntax = ""
This won't make mycmd --help-syntax
illegal, but will suppress it in the help table. For non-internal options you can follow tests/OmitInHelpTable.nim
.
I personally think suppressing syntax help is a little user-hostile since cligen
expands otherwise typical syntax quite a bit, but to each his own.
Thanks for this. You are very helpful, @c-blake.
Works as advertised - and is certainly good enough for me. :smile:
One question though: Where does the helpSyntax
field come from? In ClCfg's description I cannot find it..
Ups, sorry, my bad. I just saw that in the source code the helpSyntax
field is listed.
I try to suppress the
--help-syntax
option, so I added{"--help-syntax": "SUPPRESS"}
to the help dictionary, but cligen complains because--help-syntax
is not an API option.How can I suppress
--help-syntax
?