summaryrefslogtreecommitdiff
path: root/cmd2.py
diff options
context:
space:
mode:
authorJared Crapo <jared@kotfu.net>2017-08-19 23:23:32 -0600
committerJared Crapo <jared@kotfu.net>2017-08-19 23:23:32 -0600
commitdc0ad81e6858aa9387c7dbd88f5721b6762f51b1 (patch)
tree9421eb4793bd062ca2f13c5586433b5803123805 /cmd2.py
parentf49d88a5bc5d981c78c2242a53ac34f8576b89ee (diff)
downloadcmd2-git-dc0ad81e6858aa9387c7dbd88f5721b6762f51b1.tar.gz
Ensure editor and the file to edit can have spaces in them
Diffstat (limited to 'cmd2.py')
-rwxr-xr-xcmd2.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd2.py b/cmd2.py
index b885fa28..67f6c9bb 100755
--- a/cmd2.py
+++ b/cmd2.py
@@ -1633,7 +1633,7 @@ Edited files are run on close if the ``autorun_on_edit`` settable parameter is T
f.write(history_item or '')
f.close()
- os.system('%s %s' % (self.editor, filename))
+ os.system('"{}" "{}"'.format(self.editor, filename))
if self.autorun_on_edit or history_item:
self.do_load(filename)