summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-07-19 10:06:19 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-07-19 10:06:19 -0400
commit920a9faa050441fbe064eed200f74dbdc0ba9663 (patch)
tree8c9007dd44d5d3e1ef5a5171783acbc606f2ca29 /cmd2/cmd2.py
parent128d94accb0a6a8ab7197d26dab2cdafd83a1922 (diff)
downloadcmd2-git-920a9faa050441fbe064eed200f74dbdc0ba9663.tar.gz
Changed all uses of sub-command to subcommand
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py20
1 files changed, 10 insertions, 10 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index d8bb3b1b..6ab35790 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -2327,7 +2327,7 @@ class Cmd(cmd.Cmd):
if saved_readline_settings is not None:
self._restore_readline(saved_readline_settings)
- # ----- Alias sub-command functions -----
+ # ----- Alias subcommand functions -----
def _alias_create(self, args: argparse.Namespace) -> None:
"""Create or overwrite an alias"""
@@ -2392,7 +2392,7 @@ class Cmd(cmd.Cmd):
" macro")
alias_parser = Cmd2ArgumentParser(description=alias_description, epilog=alias_epilog, prog='alias')
- # Add sub-commands to alias
+ # Add subcommands to alias
alias_subparsers = alias_parser.add_subparsers()
# alias -> create
@@ -2450,13 +2450,13 @@ class Cmd(cmd.Cmd):
"""Manage aliases"""
func = getattr(args, 'func', None)
if func is not None:
- # Call whatever sub-command function was selected
+ # Call whatever subcommand function was selected
func(self, args)
else:
- # No sub-command was provided, so call help
+ # No subcommand was provided, so call help
self.do_help('alias')
- # ----- Macro sub-command functions -----
+ # ----- Macro subcommand functions -----
def _macro_create(self, args: argparse.Namespace) -> None:
"""Create or overwrite a macro"""
@@ -2572,7 +2572,7 @@ class Cmd(cmd.Cmd):
" alias")
macro_parser = Cmd2ArgumentParser(description=macro_description, epilog=macro_epilog, prog='macro')
- # Add sub-commands to macro
+ # Add subcommands to macro
macro_subparsers = macro_parser.add_subparsers()
# macro -> create
@@ -2652,10 +2652,10 @@ class Cmd(cmd.Cmd):
"""Manage macros"""
func = getattr(args, 'func', None)
if func is not None:
- # Call whatever sub-command function was selected
+ # Call whatever subcommand function was selected
func(self, args)
else:
- # No sub-command was provided, so call help
+ # No subcommand was provided, so call help
self.do_help('macro')
def complete_help_command(self, text: str, line: str, begidx: int, endidx: int) -> List[str]:
@@ -2676,7 +2676,7 @@ class Cmd(cmd.Cmd):
if not tokens:
return []
- # Must have at least 3 args for 'help command sub-command'
+ # Must have at least 3 args for 'help command subcommand'
if len(tokens) < 3:
return []
@@ -2705,7 +2705,7 @@ class Cmd(cmd.Cmd):
help_parser = Cmd2ArgumentParser()
help_parser.add_argument('command', nargs=argparse.OPTIONAL, help="command to retrieve help for",
completer_method=complete_help_command)
- help_parser.add_argument('subcommand', nargs=argparse.REMAINDER, help="sub-command to retrieve help for",
+ help_parser.add_argument('subcommand', nargs=argparse.REMAINDER, help="subcommand to retrieve help for",
completer_method=complete_help_subcommand)
help_parser.add_argument('-v', '--verbose', action='store_true',
help="print a list of all commands with descriptions of each")