summaryrefslogtreecommitdiffstats
path: root/editor.py
diff options
context:
space:
mode:
Diffstat (limited to 'editor.py')
-rw-r--r--editor.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/editor.py b/editor.py
index 96d7ce4c..7980f2b4 100644
--- a/editor.py
+++ b/editor.py
@@ -83,7 +83,12 @@ least one of these before using this command.""", file=sys.stderr)
83 os.close(fd) 83 os.close(fd)
84 fd = None 84 fd = None
85 85
86 if re.compile("^.*[$ \t'].*$").match(editor): 86 if platform_utils.isWindows():
87 # Split on spaces, respecting quoted strings
88 import shlex
89 args = shlex.split(editor)
90 shell = False
91 elif re.compile("^.*[$ \t'].*$").match(editor):
87 args = [editor + ' "$@"', 'sh'] 92 args = [editor + ' "$@"', 'sh']
88 shell = True 93 shell = True
89 else: 94 else: