diff options
Diffstat (limited to 'cmd2/constants.py')
-rw-r--r-- | cmd2/constants.py | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/cmd2/constants.py b/cmd2/constants.py index 9fd58b01..9e8e7780 100644 --- a/cmd2/constants.py +++ b/cmd2/constants.py @@ -16,3 +16,28 @@ MULTILINE_TERMINATOR = ';' LINE_FEED = '\n' DEFAULT_SHORTCUTS = {'?': 'help', '!': 'shell', '@': 'run_script', '@@': '_relative_run_script'} + +# Used as the command name placeholder in disabled command messages. +COMMAND_NAME = "<COMMAND_NAME>" + +# All command functions start with this +COMMAND_FUNC_PREFIX = 'do_' + +# All help functions start with this +HELP_FUNC_PREFIX = 'help_' + +# All command completer functions start with this +COMPLETER_FUNC_PREFIX = 'complete_' + +############################################################################################################ +# The following are optional attributes added to do_* command functions +############################################################################################################ + +# The custom help category a command belongs to +CMD_ATTR_HELP_CATEGORY = 'help_category' + +# The argparse parser for the command +CMD_ATTR_ARGPARSER = 'argparser' + +# Whether or not tokens are unquoted before sending to argparse +CMD_ATTR_PRESERVE_QUOTES = 'preserve_quotes' |