cat: use HOMEBREW_VISUAL as pager if set

This commit is contained in:
Dawid Dziurla 2019-09-29 18:01:38 +02:00
parent db18713c8a
commit b31b14f786
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B

View File

@ -25,6 +25,7 @@ module Homebrew
raise "`brew cat` doesn't support multiple arguments" if args.remaining.size > 1
cd HOMEBREW_REPOSITORY
safe_system "cat", formulae.first.path, *Homebrew.args.passthrough
pager = ENV["HOMEBREW_VISUAL"] || "cat"
safe_system pager, formulae.first.path, *Homebrew.args.passthrough
end
end