Skip to content

Add SubMenu class #218

@T0nd0Tara

Description

@T0nd0Tara

Let's say you have a rootMenu and a printMenu, I think it's weird to allow the user to enter a sub menu just for printing.
I would just like to add multiple commands to the same printMenu for a cleaner code instead of adding commands like print a, print b

The sub menu can be inherited from Menu, and when you type help for example it'd look like that:

Commands available:
 - help
        This help message
 - exit
        Quit the session
 - print
        A custom menu message if exists
        - a
               This prints a
        - b
               This prints b

writing just print into the main Menu can result in printing an error / the sub menu help function

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions