diff options
author | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-03-14 20:47:22 -0400 |
---|---|---|
committer | Todd Leonhardt <todd.leonhardt@gmail.com> | 2019-03-14 20:47:22 -0400 |
commit | 88d8b57221662b42cfcd7490314c2869c4ea9bfe (patch) | |
tree | eec3c8b233c65bc2727ce589c15742ad764f56a9 /examples | |
parent | cd8183d463e50f0a5c9a9ff548554dc3c71124da (diff) | |
download | cmd2-git-88d8b57221662b42cfcd7490314c2869c4ea9bfe.tar.gz |
Converted class attributes which aren't intended to be dynamically settable to instance attributes
The following are now instance attributes:
- allow_cli_args
- default_to_shell
- quit_on_sigint
The following class attribute was deleted due to lack of use:
- reserved_words
The following instance attribute was deleted due to lack of use:
- keywords
Diffstat (limited to 'examples')
-rwxr-xr-x | examples/hooks.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/examples/hooks.py b/examples/hooks.py index b6f6263e..dd21e58a 100755 --- a/examples/hooks.py +++ b/examples/hooks.py @@ -87,7 +87,7 @@ class CmdLineApp(cmd2.Cmd): func = self.cmd_func(data.statement.command) if func is None: # check if the entered command might be an abbreviation - possible_cmds = [cmd for cmd in self.keywords if cmd.startswith(data.statement.command)] + possible_cmds = [cmd for cmd in self.get_all_commands() if cmd.startswith(data.statement.command)] if len(possible_cmds) == 1: raw = data.statement.raw.replace(data.statement.command, possible_cmds[0], 1) data.statement = self.statement_parser.parse(raw) |