summaryrefslogtreecommitdiff
path: root/cmd2
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2018-12-21 00:20:42 -0500
committerKevin Van Brunt <kmvanbrunt@gmail.com>2018-12-21 00:20:42 -0500
commit6e89905732253a65086aaaaae233db88d1256687 (patch)
tree96aacc0cdde59f3528b4130cd170cf93df1471d7 /cmd2
parent25c8d65bc6f885cc2620c554f7211f7b566ad2ac (diff)
downloadcmd2-git-6e89905732253a65086aaaaae233db88d1256687.tar.gz
Restored default behavior of setting cmd_echo to False before running a py script
Diffstat (limited to 'cmd2')
-rw-r--r--cmd2/cmd2.py4
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())