Skip to content

How do I create cascaded/nested menus #1545

@viralmutant

Description

@viralmutant

I am totally new here so this might be a naive question.

Trying to build an interactive prompt for my application and going through the documentation I could not understand if this is even possible or not. Basically, I want to implement something like cascaded menus. No GUI here, pure command line

Starting the application, there would be bunch of options. Choose and option and you now have some more options, specific to this choice only. Quit that and you are back to previous menu, the objecs created in the child menu still intact.
There could be deep nesting here

If someone has used 'ntdsutil' on Windows server, they might relate to it. Adding some pics for reference
Screenshot 2022-01-19 155300

Here, user presses ntdsutil and it opens an interactive session. They choose 'metadata cleanup` and go one level down.

Screenshot 2022-01-19 155324

Choose connections and you are taken further down. Make a connection and press q, you are back to previous menu where you can play around with those connections.

Can I achieve similar thing with prompt toolkit ?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions