diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-05-24 14:31:29 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2019-05-24 14:31:29 -0400 |
commit | da5f03fb515d0a751d356a0f664ccb4b3df83eb1 (patch) | |
tree | fcf13c46e58fc9238e7ceef794e02ba7596fb1e8 /cmd2/cmd2.py | |
parent | 1178bda4d68608a2cd6e34a6bd60639debc92cf1 (diff) | |
download | cmd2-git-da5f03fb515d0a751d356a0f664ccb4b3df83eb1.tar.gz |
Running commands from history stops if a command returns True for its stop value. The command loop will also terminate.
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r-- | cmd2/cmd2.py | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index a4d84adf..51d5b5b6 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -3408,11 +3408,7 @@ class Cmd(cmd.Cmd): self.perror("If this is what you want to do, specify '1:' as the range of history.", traceback_war=False) else: - # TODO: Call runcmds_plus_hooks and return its stop value - for runme in history: - self.pfeedback(runme) - if runme: - self.onecmd_plus_hooks(runme) + return self.runcmds_plus_hooks(history) elif args.edit: import tempfile fd, fname = tempfile.mkstemp(suffix='.txt', text=True) |