click-shell icon indicating copy to clipboard operation
click-shell copied to clipboard

How to add version option of click cli

Open rajnathsah opened this issue 3 years ago • 1 comments

I have created a cli using click using click-shell but struggling to add version option.

my command is testcmd and i have added version in setup.py. Importing package on python console, i can see version like

testcmd.version

But i want to have the option of printing version on logging to cmd also along with option like below

testcmd --version

rajnathsah avatar Jul 16 '21 13:07 rajnathsah

There is option in click to add version option but when added with click-shell, it does not work.

rajnathsah avatar Jul 19 '21 11:07 rajnathsah