Fix for issues gh:6 and gh:7. Split up any parameters the EDITOR has and merge those with the paths. Now EDITOR can be mate -w if you want.
This commit is contained in:
parent
cca2e7d46a
commit
b00d4f2a70
|
@ -70,7 +70,11 @@ module Qwandry
|
|||
end
|
||||
|
||||
paths = package.is_a?(String) ? [package] : package.paths
|
||||
system editor, *paths
|
||||
# Editors may have options, 'mate -w' for instance
|
||||
editor_and_options = editor.strip.split(/\s+/)
|
||||
|
||||
# Launch the editor with its options and any paths that we have been passed
|
||||
system(*(editor_and_options + paths))
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in New Issue