Skip to content

Commit dcecc2b

Browse files
committedOct 16, 2017
Support editors with spaces with shlex
Fixes fmoo#11.
1 parent a51b6ff commit dcecc2b

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed
 

‎editor.py

+2-1
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@
88
import os.path
99
import subprocess
1010
import tempfile
11+
import shlex
1112
from distutils.spawn import find_executable
1213

1314

@@ -75,7 +76,7 @@ def get_tty_filename():
7576

7677
def edit(filename=None, contents=None, use_tty=None):
7778
editor = get_editor()
78-
args = [editor] + get_editor_args(os.path.basename(os.path.realpath(editor)))
79+
args = shlex.split(editor) + get_editor_args(os.path.basename(os.path.realpath(editor)))
7980

8081
if use_tty is None:
8182
use_tty = sys.stdin.isatty() and not sys.stdout.isatty()

0 commit comments

Comments
 (0)
Please sign in to comment.