File tree Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Expand file tree Collapse file tree 2 files changed +9
-1
lines changed Original file line number Diff line number Diff line change 23
23
import codecs
24
24
import platform
25
25
import re
26
+ import shlex
26
27
27
28
import beets
28
29
from beets import ui
@@ -1503,7 +1504,12 @@ def config_edit():
1503
1504
1504
1505
if 'EDITOR' in os .environ :
1505
1506
editor = os .environ ['EDITOR' ]
1506
- args = [editor , editor , path ]
1507
+ try :
1508
+ editor = shlex .split (editor )
1509
+ except ValueError : # Malformed shell tokens.
1510
+ editor = [editor ]
1511
+ args = editor + [path ]
1512
+ args .insert (1 , args [0 ])
1507
1513
elif platform .system () == 'Darwin' :
1508
1514
args = ['open' , 'open' , '-n' , path ]
1509
1515
elif platform .system () == 'Windows' :
Original file line number Diff line number Diff line change 68
68
twice in the artist string. Thanks to Marc Addeo. :bug: `1179 ` :bug: `1181 `
69
69
* :doc: `/plugins/lastgenre `: Match songs more robustly when they contain
70
70
dashes. Thanks to :user: `djl `. :bug: `1156 `
71
+ * The :ref: `config-cmd ` command can now use ``$EDITOR `` variables with
72
+ arguments.
71
73
72
74
.. _API changes : http://developer.echonest.com/forums/thread/3650
73
75
.. _Plex : https://plex.tv/
You can’t perform that action at this time.
0 commit comments