Closed duran55 closed 7 months ago
I was actually having a think about this too. Controllers would probably need to set up an Argparse parser that the UI class can subscribe to. I want to keep away from hard-coding commands that are in the controller into the UI class.
If you need a bandaid fix in the meantime, you can hack in this kind of thing:
def i(self, index: int) -> None:
return self.install(index)
Added a command for 'q' which will alias 'exit'.
Since the addition of tab completion, you can already type the shortest unique string for a command then use tab complete to find the rest of it, which is just one extra keystroke. As for help, 'h' (or any unknown command) will already print the help menu. You'll get an extra error saying 'h' isn't a command but it won't hurt anything and still does what we need, so no changes there.
It would be good to have short command aliases for these two commands: q for quit, h for help. And maybe for other commands too.