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

More clarification to command usage #8

Closed sanekmihailow closed 4 years ago

sanekmihailow commented 5 years ago

I've wasted about 1hr to figure out that you must specify command name inside command decorator if you need to access it from click-shell's shell

clarkperkins commented 4 years ago

Hi @sanekmihailow, so sorry I have taken so long to respond to this. I'm happy to clarify some of the instructions in the README - but I think the issue that you might have been running into is the fact that click internally replaces underscores with dashes in command names.

Using the example provided in the README, I'm able to run this:

$ python my_app.py
Starting my app...
my-app > the-command
the_command is running
my-app >

I think what I'll do instead is change the example prompt to one that doesn't have an underscore to reduce confusion. Thanks for pointing this out!

clarkperkins commented 4 years ago

Clarification added in #15. Please feel free to re-open this if you're still running into issues!