click-contrib / click-repl

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

Fix for issue #92 #97

Closed flacoste closed 1 year ago

flacoste commented 1 year ago

I've added three tests:

Not sure yet on how to make them pass, welcoming any ideas.

flacoste commented 1 year ago

After investigation, I realized that calling the group() command on every subcommand is part of click's expected behavior so it should be preserved. Once it's known, it's still possible to take advantage of the group context caching. The fix for the arguments is to use group.invoke() to make the dispatch by passing the new args in the context.

GhostOps77 commented 1 year ago

Hi @flacoste , any updates on making these test cases?