Skip to content

Commit 6e89905

Browse files
committed
Restored default behavior of setting cmd_echo to False before running a py script
1 parent 25c8d65 commit 6e89905

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

cmd2/cmd2.py

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2968,6 +2968,10 @@ def run(filename: str):
29682968
:param filename: filename of *.py script file to run
29692969
"""
29702970
expanded_filename = os.path.expanduser(filename)
2971+
2972+
# cmd_echo defaults to False for scripts. The user can always toggle this value in their script.
2973+
bridge.cmd_echo = False
2974+
29712975
try:
29722976
with open(expanded_filename) as f:
29732977
interp.runcode(f.read())

0 commit comments

Comments
 (0)