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:
commit
563d066821
@ -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 }
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user