click-contrib / click-repl

Subcommand REPL for click apps
MIT License
219 stars 40 forks source link

fix when commands does not exist on command (e.g. it's a multicommand) #34

Closed davidc closed 6 years ago

untitaker commented 7 years ago

Hmm. What's the point of having a repl if you can only invoke one command? Also how would you add the repl command if you don't have a multicommand?

davidc commented 7 years ago

It has many commands, they just aren't in a 'commands' dictionary, MultiCommand doesn't have such a field. See for example http://click.pocoo.org/5/commands/#custom-multi-commands

And I don't have a 'repl' command either, I enter repl automatically if no command line arguments are given.

untitaker commented 6 years ago

The proper fix is to use list_commands as in https://github.com/click-contrib/click-repl/issues/39