diff options
Diffstat (limited to 'examples/help_categories.py')
-rwxr-xr-x | examples/help_categories.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/help_categories.py b/examples/help_categories.py index f638e0df..e58bac02 100755 --- a/examples/help_categories.py +++ b/examples/help_categories.py @@ -140,6 +140,18 @@ class HelpCategories(cmd2.Cmd): """Version command""" self.poutput(cmd2.__version__) + @cmd2.with_category("Command Management") + def do_disable_commands(self, _): + """Disable the Application Management commands""" + self.disable_category(self.CMD_CAT_APP_MGMT, "Application Management is currently disabled") + self.poutput("The Application Management commands have been disabled") + + @cmd2.with_category("Command Management") + def do_enable_commands(self, _): + """Enable the Application Management commands""" + self.enable_category(self.CMD_CAT_APP_MGMT) + self.poutput("The Application Management commands have been enabled") + if __name__ == '__main__': c = HelpCategories() |