Closed SolitudeSF closed 5 years ago
Yeah..I noticed that and was already working on it. Seems to be ok now, right?
yep
Cool. Sorry for the misfire.
You might (or might not) appreciate the new prefix matching of enum values in your pinggraph
program which I notice uses several enums (and even specifies their strings). So, now you can say, for example, pinggraph -ts
instead of -tshort
or pinggraph -sbl
instead of -s block
.
i appreciate every opportunity to type less. thanks!
If you engineer your enum
strings with knowledge of this new cligen
feature then you can probably get that keystroke down to 1 char pretty easily (much like chosing parameter names so that auto-inferred short option keys for long options do not collide). Probably obvious, I know.
In the longer run, I hope to get the same capability into long-option and subcommand matching, but that is much more work. Anyway, you're welcome and enjoy!
Off topic, but of all the cligen uses in the Nimble package database, yours is the only one that I think will break with the new release. You're probably going to want to change:
dispatch pinggraph,
version = ("version", "0.1.4"),
...
to
clCfg.version = "0.1.4"
dispatch
...
or even better
const nimbleFile = staticRead "../pinggraph.nimble"
clCfg.version = versionFromNimble(nimbleFile)
dispatch
...
Wrong git tag on the latest release. Actually prevents from installing it with
nimble install cligen