extend/kernel: allow exec_editor to open multiple files at once

This commit is contained in:
Alexander Bayandin 2025-08-03 16:35:53 +01:00
parent 65d3c6e950
commit 358291e841

View File

@ -389,10 +389,10 @@ module Kernel
editor
end
sig { params(filename: T.any(String, Pathname)).void }
def exec_editor(filename)
puts "Editing #{filename}"
with_homebrew_path { safe_system(*which_editor.shellsplit, filename) }
sig { params(filenames: T.any(String, Pathname)).void }
def exec_editor(*filenames)
puts "Editing #{filenames.join "\n"}"
with_homebrew_path { safe_system(*which_editor.shellsplit, *filenames) }
end
sig { params(args: T.any(String, Pathname)).void }