|
|
@@ -83,7 +83,12 @@ least one of these before using this command.""", file=sys.stderr)
|
|
|
os.close(fd)
|
|
|
fd = None
|
|
|
|
|
|
- if re.compile("^.*[$ \t'].*$").match(editor):
|
|
|
+ if platform_utils.isWindows():
|
|
|
+ # Split on spaces, respecting quoted strings
|
|
|
+ import shlex
|
|
|
+ args = shlex.split(editor)
|
|
|
+ shell = False
|
|
|
+ elif re.compile("^.*[$ \t'].*$").match(editor):
|
|
|
args = [editor + ' "$@"', 'sh']
|
|
|
shell = True
|
|
|
else:
|