click-contrib / click-repl

Subcommand REPL for click apps
MIT License
215 stars 41 forks source link

add cli call to README examples #45

Closed toejough closed 5 years ago

toejough commented 5 years ago

I took the example code as "how you run a click-repl app", and was confused when the examples didn't work at all. I figured it out for the 'advanced usage' example, but when I read the initial example of how to use register_repl I assumed that that replaced the cli() call.

Of course, it doesn't. The fact that register_repl only registers the repl command is implied by the name, but for such a small example snippet, where everything else needed to function is included, not including the cli() line implied to me that it wasn't necessary.

This update just makes the cli() call explicit in both examples, and hopefully nobody else will suffer from my confusion.

Related issue: #44

untitaker commented 5 years ago

Thanks, makes sense