Compare commits
No commits in common. "myvim" and "master" have entirely different histories.
|
@ -35,14 +35,9 @@ module Qwandry
|
||||||
paths = package.is_a?(String) ? [package] : package.paths
|
paths = package.is_a?(String) ? [package] : package.paths
|
||||||
# Editors may have options, 'mate -w' for instance
|
# Editors may have options, 'mate -w' for instance
|
||||||
editor_and_options = editor.strip.split(/\s+/)
|
editor_and_options = editor.strip.split(/\s+/)
|
||||||
|
|
||||||
# Launch the editor with its options and any paths that we have been passed
|
|
||||||
|
|
||||||
if File.directory?(paths.first)
|
# Launch the editor with its options and any paths that we have been passed
|
||||||
Dir.chdir(paths.first) { system(*(editor_and_options)) }
|
system(*(editor_and_options + paths))
|
||||||
else
|
|
||||||
system(*(editor_and_options + paths))
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
|
|
||||||
private
|
private
|
||||||
|
|
Loading…
Reference in New Issue