summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorkotfu <kotfu@kotfu.net>2018-05-05 21:34:07 -0600
committerkotfu <kotfu@kotfu.net>2018-05-05 21:34:07 -0600
commit19e1d228404432d9e2c386dd64bf24a58ddc2e8d (patch)
treec452f64ee675bf1d18163a86bf098bd36b7aac65 /cmd2/cmd2.py
parent132a7882a70b2fc096ac83f072deb8e38bbb21f8 (diff)
downloadcmd2-git-19e1d228404432d9e2c386dd64bf24a58ddc2e8d.tar.gz
Refactor self.complete() for #380
Use self.statement_parser() instead of self.parseline()
Diffstat (limited to 'cmd2/cmd2.py')
-rwxr-xr-xcmd2/cmd2.py9
1 files changed, 3 insertions, 6 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index ad2038d4..db4cef2e 100755
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -1577,12 +1577,9 @@ class Cmd(cmd.Cmd):
if begidx > 0:
# Parse the command line
- command, args, expanded_line = self.parseline(line)
-
- # use these lines instead of the one above
- # statement = self.command_parser.parse_command_only(line)
- # command = statement.command
- # expanded_line = statement.command_and_args
+ statement = self.statement_parser.parse_command_only(line)
+ command = statement.command
+ expanded_line = statement.command_and_args
# We overwrote line with a properly formatted but fully stripped version
# Restore the end spaces since line is only supposed to be lstripped when