Commit cf728350 authored by Jeff Breazile's avatar Jeff Breazile

Update editor.py

Adding support for paths with one or more spaces as well as editors that take command line params:   "C:/Program Files (x86)/GitExtensions/GitExtensions.exe fileeditor".
parent b79aef1a
......@@ -84,8 +84,9 @@ class Editor(object):
fd = None
if re.compile("^.*[$ \t'].*$").match(editor):
args = [editor + ' "$@"', 'sh']
shell = True
editor = re.sub('["\']', '', editor) ## Removes " or ' from windows path like "C:/Program Files (x86)/GitExtensions/GitExtensions.exe" so they don't go into the Popen list.
args = editor.rsplit() ## supports multiple spaces in windows path, and editor arguments like "C:/Program Files (x86)/GitExtensions/GitExtensions.exe fileeditor".
shell = False
else:
args = [editor]
shell = False
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment