summaryrefslogtreecommitdiff
path: root/examples/modular_commands/commandset_basic.py
diff options
context:
space:
mode:
Diffstat (limited to 'examples/modular_commands/commandset_basic.py')
-rw-r--r--examples/modular_commands/commandset_basic.py31
1 files changed, 1 insertions, 30 deletions
diff --git a/examples/modular_commands/commandset_basic.py b/examples/modular_commands/commandset_basic.py
index 25ba976d..105530e8 100644
--- a/examples/modular_commands/commandset_basic.py
+++ b/examples/modular_commands/commandset_basic.py
@@ -4,39 +4,10 @@ A simple example demonstrating a loadable command set
"""
from typing import List
-from cmd2 import Cmd, CommandSet, Statement, register_command, with_category, with_default_category
+from cmd2 import Cmd, CommandSet, Statement, with_category, with_default_category
from cmd2.utils import CompletionError
-@register_command
-@with_category("AAA")
-def do_unbound(cmd: Cmd, statement: Statement):
- """This is an example of registering an unbound function
-
- :param cmd:
- :param statement:
- :return:
- """
- cmd.poutput('Unbound Command: {}'.format(statement.args))
-
-
-@register_command
-@with_category("AAA")
-def do_func_with_help(cmd: Cmd, statement: Statement):
- """
- This is an example of registering an unbound function
-
- :param cmd:
- :param statement:
- :return:
- """
- cmd.poutput('Unbound Command: {}'.format(statement.args))
-
-
-def help_func_with_help(cmd: Cmd):
- cmd.poutput('Help for func_with_help')
-
-
@with_default_category('Basic Completion')
class BasicCompletionCommandSet(CommandSet):
# List of strings used with completion functions