diff options
-rw-r--r-- | CHANGELOG.md | 5 | ||||
-rw-r--r-- | cmd2/pyscript_bridge.py | 2 |
2 files changed, 5 insertions, 2 deletions
diff --git a/CHANGELOG.md b/CHANGELOG.md index cfd0c78c..547bcc25 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -28,6 +28,8 @@ input from previous invocations of `cmd2` based apps now shows in the `history` command. * Text scripts now run immediately instead of adding their commands to `cmdqueue`. This allows easy capture of the entire script's output. + * Added member to CommandResult called stop which is the return value of onecmd_plus_hooks after it runs the given + command line. * Breaking changes * Replaced `unquote_redirection_tokens()` with `unquote_specific_tokens()`. This was to support the fix that allows terminators in alias and macro values. @@ -44,7 +46,8 @@ * HistoryItem class is no longer a subclass of `str`. If you are directly accessing the `.history` attribute of a `cmd2` based app, you will need to update your code to use `.history.get(1).statement.raw` instead. * Removed internally used `eos` command that was used to keep track of when a text script's commands ended - * Removed cmd2 member called _STOP_AND_EXIT since it was just a boolean value that should always be True + * Removed cmd2 member called _STOP_AND_EXIT since it was just a boolean value that should always be True + * Removed cmd2 member called _should_quit since PyscriptBridge now handles this logic * **Python 3.4 EOL notice** * Python 3.4 reached its [end of life](https://www.python.org/dev/peps/pep-0429/) on March 18, 2019 * This is the last release of `cmd2` which will support Python 3.4 diff --git a/cmd2/pyscript_bridge.py b/cmd2/pyscript_bridge.py index 944c7eae..e5633173 100644 --- a/cmd2/pyscript_bridge.py +++ b/cmd2/pyscript_bridge.py @@ -24,7 +24,7 @@ class CommandResult(namedtuple_with_defaults('CommandResult', ['stdout', 'stderr ---------------------- stdout: str - output captured from stdout while this command is executing stderr: str - output captured from stderr while this command is executing. None if no error captured. - stop: bool - return value of the command's corresponding do_* function + stop: bool - return value of onecmd_plus_hooks after it runs the given command line. data - possible data populated by the command. Any combination of these fields can be used when developing a scripting API for a given command. |