diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-10-04 00:05:46 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-10-04 00:05:46 -0400 |
commit | dcd9011873f7adb1d05c5c5791688159ce2195c3 (patch) | |
tree | 164df0201faca98cd5d0e049184e157a6ab90391 /cmd2/cmd2.py | |
parent | 8ef11cd0f06a3a565503a40d7fc55b9d9f53ad15 (diff) | |
download | cmd2-git-dcd9011873f7adb1d05c5c5791688159ce2195c3.tar.gz |
Fixed issue introduced in the recent batch of changes that appended to history after running a command.
This is to avoid out of order history that would result if a command made another call to onecmd().
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r-- | cmd2/cmd2.py | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 420ef396..f3827667 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -2005,12 +2005,12 @@ class Cmd(cmd.Cmd): else: func = self.cmd_func(statement.command) if func: - stop = func(statement) - # Since we have a valid command store it in the history if statement.command not in self.exclude_from_history: self.history.append(statement.raw) + stop = func(statement) + else: self.default(statement) stop = False |