diff options
-rw-r--r-- | cmd2/cmd2.py | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py index 56d74ec8..c4f653ca 100644 --- a/cmd2/cmd2.py +++ b/cmd2/cmd2.py @@ -2968,6 +2968,10 @@ class Cmd(cmd.Cmd): :param filename: filename of *.py script file to run """ expanded_filename = os.path.expanduser(filename) + + # cmd_echo defaults to False for scripts. The user can always toggle this value in their script. + bridge.cmd_echo = False + try: with open(expanded_filename) as f: interp.runcode(f.read()) |