diff options
author | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-10-02 23:14:35 -0400 |
---|---|---|
committer | Kevin Van Brunt <kmvanbrunt@gmail.com> | 2018-10-02 23:14:35 -0400 |
commit | 957137a886e76f5b32f62f667673a72a813f8c0d (patch) | |
tree | b50adf03610e1d039a709f73d796f57fc539602b /cmd2/pyscript_bridge.py | |
parent | 1c0616a61740f1407f684a1dbe816fa547873b13 (diff) | |
download | cmd2-git-957137a886e76f5b32f62f667673a72a813f8c0d.tar.gz |
Default cmd_echo to True in PyscriptBridge so things like 'py app.help()' will show output
Diffstat (limited to 'cmd2/pyscript_bridge.py')
-rw-r--r-- | cmd2/pyscript_bridge.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/cmd2/pyscript_bridge.py b/cmd2/pyscript_bridge.py index b66fd701..9d865b6b 100644 --- a/cmd2/pyscript_bridge.py +++ b/cmd2/pyscript_bridge.py @@ -247,7 +247,7 @@ class PyscriptBridge(object): def __init__(self, cmd2_app): self._cmd2_app = cmd2_app self._last_result = None - self.cmd_echo = False + self.cmd_echo = True def __getattr__(self, item: str): """ @@ -271,10 +271,10 @@ class PyscriptBridge(object): raise AttributeError("'{}' object has no attribute '{}'".format(self._cmd2_app.pyscript_name, item)) def __dir__(self): - """Return a custom set of attribute names to match the available commands""" - commands = list(self._cmd2_app.get_all_commands()) - commands.insert(0, 'cmd_echo') - return commands + """Return a custom set of attribute names""" + attributes = self._cmd2_app.get_all_commands() + attributes.insert(0, 'cmd_echo') + return attributes def __call__(self, args: str, echo: Optional[bool]=None) -> CommandResult: """ |