Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion editor.py
Original file line numberDiff line numberDiff line change
Expand Up@@ -8,6 +8,7 @@
import os.path
import subprocess
import tempfile
import shlex
from distutils.spawn import find_executable


Expand DownExpand Up@@ -75,7 +76,7 @@ def get_tty_filename():

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

if use_tty is None:
use_tty = sys.stdin.isatty() and not sys.stdout.isatty()
Expand Down