Merge pull request #20367 from Homebrew/brew-edit-to-open-several-files

extend/kernel: allow exec_editor to open multiple files at once
This commit is contained in:
Carlo Cabrera 2025-08-03 16:01:10 +00:00 committed by GitHub
commit 563d066821
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

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 }