No answers given to this question. I’ve spent some more time on this. I’ve made a little bit of progress on this but I am still not able to have something such as:
Main Menu - Option 1 - Option 2 - Option 3 - Submenu 1
Submenu 1 - Option 1 - Option 2 - Submenu 2 - Back to Main
etc. My conclusion is that click isn’t the right tool to use for that. In fact, I’m not sure the alternative would necessarily make it much easier either (argparse, docopt, …). Maybe to do that the best approach would be to just build a class structure yourself.
Or then, go with an approach that’s closer to what the shell or docker use, don’t bother with any menu navigation and just launch atomic commands that act on the state of the application.
CLICK HERE to find out more related problems solutions.