Skip to content

Commit 953aa31

Browse files
committed
Fix bug for startup script with spaces
1 parent 63aa28c commit 953aa31

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

cmd2/cmd2.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -452,7 +452,7 @@ def __init__(self, completekey: str='tab', stdin=None, stdout=None, persistent_h
452452
if startup_script is not None:
453453
startup_script = os.path.expanduser(startup_script)
454454
if os.path.exists(startup_script) and os.path.getsize(startup_script) > 0:
455-
self.cmdqueue.append('load {}'.format(startup_script))
455+
self.cmdqueue.append("load '{}'".format(startup_script))
456456

457457
############################################################################################################
458458
# The following variables are used by tab-completion functions. They are reset each time complete() is run

0 commit comments

Comments
 (0)