Merge pull request #6504 from dawidd6/cat
cat: check for HOMEBREW_BAT and set 'bat' as pager
This commit is contained in:
		
						commit
						4f3d65c972
					
				@ -25,6 +25,11 @@ 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 = if ENV["HOMEBREW_BAT"].nil?
 | 
			
		||||
      "cat"
 | 
			
		||||
    else
 | 
			
		||||
      "#{HOMEBREW_PREFIX}/bin/bat"
 | 
			
		||||
    end
 | 
			
		||||
    safe_system pager, formulae.first.path, *Homebrew.args.passthrough
 | 
			
		||||
  end
 | 
			
		||||
end
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -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
 | 
			
		||||
 | 
			
		||||
@ -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\.
 | 
			
		||||
.
 | 
			
		||||
 | 
			
		||||
		Loading…
	
	
			
			x
			
			
		
	
		Reference in New Issue
	
	Block a user