cat: look for HOMEBREW_BAT

This commit is contained in:
Dawid Dziurla 2019-09-30 15:40:20 +02:00
parent b31b14f786
commit 25454a9257
No known key found for this signature in database
GPG Key ID: 7B6D8368172E9B0B
4 changed files with 16 additions and 2 deletions

View File

@ -25,7 +25,11 @@ module Homebrew
raise "`brew cat` doesn't support multiple arguments" if args.remaining.size > 1
cd HOMEBREW_REPOSITORY
pager = ENV["HOMEBREW_VISUAL"] || "cat"
pager = if ENV["HOMEBREW_BAT"].nil?
"cat"
else
"#{HOMEBREW_PREFIX}/bin/bat"
end
safe_system pager, formulae.first.path, *Homebrew.args.passthrough
end
end

View File

@ -143,6 +143,9 @@ Note that environment variables must have a value set to be detected. For exampl
to retrieve these access credentials from AWS). If they are not set,
the `S3` download strategy will download with a public (unsigned) URL.
* `HOMEBREW_BAT`:
If set, Homebrew will use `bat` for the `brew cat` command.
* `HOMEBREW_BOTTLE_DOMAIN`:
By default, Homebrew uses `https://homebrew.bintray.com/` as its download
mirror for bottles. If set, instructs Homebrew to instead use the specified

View File

@ -1077,6 +1077,9 @@ Note that environment variables must have a value set to be detected. For exampl
to retrieve these access credentials from AWS). If they are not set,
the `S3` download strategy will download with a public (unsigned) URL.
* `HOMEBREW_BAT`:
If set, Homebrew will use `bat` for the `brew cat` command.
* `HOMEBREW_BOTTLE_DOMAIN`:
By default, Homebrew uses `https://homebrew.bintray.com/` as its download
mirror for bottles. If set, instructs Homebrew to instead use the specified

View File

@ -1,7 +1,7 @@
.\" generated with Ronn/v0.7.3
.\" http://github.com/rtomayko/ronn/tree/0.7.3
.
.TH "BREW" "1" "September 2019" "Homebrew" "brew"
.TH "BREW" "1" "October 2019" "Homebrew" "brew"
.
.SH "NAME"
\fBbrew\fR \- The missing package manager for macOS
@ -1336,6 +1336,10 @@ If set, Homebrew will only check for autoupdates once per this seconds interval\
When using the \fBS3\fR download strategy, Homebrew will look in these variables for access credentials (see \fIhttps://docs\.aws\.amazon\.com/cli/latest/userguide/cli\-chap\-getting\-started\.html#cli\-environment\fR to retrieve these access credentials from AWS)\. If they are not set, the \fBS3\fR download strategy will download with a public (unsigned) URL\.
.
.TP
\fBHOMEBREW_BAT\fR
If set, Homebrew will use \fBbat\fR for the \fBbrew cat\fR command\.
.
.TP
\fBHOMEBREW_BOTTLE_DOMAIN\fR
By default, Homebrew uses \fBhttps://homebrew\.bintray\.com/\fR as its download mirror for bottles\. If set, instructs Homebrew to instead use the specified URL\. For example, \fBHOMEBREW_BOTTLE_DOMAIN=http://localhost:8080\fR will cause all bottles to download from the prefix \fBhttp://localhost:8080/\fR\.
.