clarkperkins / click-shell

An extension to click that easily turns your click app into a shell utility
BSD 3-Clause "New" or "Revised" License
88 stars 17 forks source link

How to add version option of click cli #45

Open rajnathsah opened 3 years ago

rajnathsah commented 3 years ago

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 commented 3 years ago

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