cli-matic
cli-matic copied to clipboard
Adding `app --version`
It's common for terminal apps to be called like app --version
to print the version. Is this possible?
Originally posted by @thiru in https://github.com/l3nz/cli-matic/issues/35#issuecomment-480977084
@thiru Added as separate bug.
This should only be added as "--version" (with no shortcut) to global options.
So app --version
will work and print :app :version
, while app cmd --version
has no meaning.
Yes that would be perfect, thank you!
BTW, as per #69 , we could have recursive :version
keys, so a subcomand could have different (sub) version.
Sweet thanks!
Versions on sub-commands seem niche. I personally haven't found a need for them but still nice to have the option.
Hello @l3nz ,
Could you please share a working example on how exactly, this could be achieved with cli-matic "0.4.3"]
?
I have been trying to get the same use case working app --version
without success 😞 .