diff options
| -rw-r--r-- | editor.py | 7 |
1 files changed, 6 insertions, 1 deletions
| @@ -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: |
