diff options
author | David Bremner <david@tethera.net> | 2021-08-01 19:37:43 -0400 |
---|---|---|
committer | David Bremner <david@tethera.net> | 2021-08-01 19:37:43 -0400 |
commit | 4704a450aaaa9a787f4d1cb60c637ea16005e843 (patch) | |
tree | f9681753f7dc13b3df86b3c004c208a2f22bd85b | |
parent | d73a72446d4d9c51f6c64ca49f0c1922e1c5cb9f (diff) |
remove most cmd2 built-in commands
By default, support a kind of "kiosk"-mode.
-rw-r--r-- | mm3mod/__init__.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/mm3mod/__init__.py b/mm3mod/__init__.py index 3f22b6d..d43a770 100644 --- a/mm3mod/__init__.py +++ b/mm3mod/__init__.py @@ -11,10 +11,14 @@ class ModShell(cmd2.Cmd): intro = 'Type help or ? for a list of commands' def __init__(self, client, mlist): + super().__init__() self.client = client; self.mlist = mlist; self.prompt = '({:s}) '.format(mlist.list_name) - cmd2.Cmd.__init__(self) + for command in ['shell', 'load', 'pyscript', 'shortcuts', 'alias', + 'edit', 'history', 'py', 'set', 'unalias']: + method='do_{:s}'.format(command) + delattr(cmd2.Cmd,method) def print_held(self): self.held_messages = self.mlist.get_held_page (50,1) |