summaryrefslogtreecommitdiff
path: root/examples/hooks.py
diff options
context:
space:
mode:
authorTodd Leonhardt <todd.leonhardt@gmail.com>2019-03-18 22:49:42 -0400
committerGitHub <noreply@github.com>2019-03-18 22:49:42 -0400
commit2f24a8ad3eeb2fdf699d1e2a9d4f05429fe879c4 (patch)
treeb836270cf61175d1e4a434fd8cae08f0ffd998a2 /examples/hooks.py
parent96d176cc3d8198913693a42c7dd983cf69a165bd (diff)
parent57dd827963491439e40eb5dfe20811c14ea757ff (diff)
downloadcmd2-git-2f24a8ad3eeb2fdf699d1e2a9d4f05429fe879c4.tar.gz
Merge branch 'master' into load_generate_transcript
Diffstat (limited to 'examples/hooks.py')
-rwxr-xr-xexamples/hooks.py2
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)