Compare commits
1 Commits
Author | SHA1 | Date |
---|---|---|
John Bintz | 7689c03176 |
|
@ -37,7 +37,12 @@ module Qwandry
|
|||
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))
|
||||
|
||||
if File.directory?(paths.first)
|
||||
Dir.chdir(paths.first) { system(*(editor_and_options)) }
|
||||
else
|
||||
system(*(editor_and_options + paths))
|
||||
end
|
||||
end
|
||||
|
||||
private
|
||||
|
|
Loading…
Reference in New Issue