Merge pull request #10771 from MikeMcQuaid/speedup_brew_version
Speedup `brew --version`.
This commit is contained in:
commit
14576d7b1a
@ -188,9 +188,9 @@ update-preinstall() {
|
|||||||
# last $HOMEBREW_AUTO_UPDATE_SECS.
|
# last $HOMEBREW_AUTO_UPDATE_SECS.
|
||||||
if [[ "$HOMEBREW_COMMAND" = "cask" ]]
|
if [[ "$HOMEBREW_COMMAND" = "cask" ]]
|
||||||
then
|
then
|
||||||
tap_fetch_head="$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-cask/.git/FETCH_HEAD"
|
tap_fetch_head="$HOMEBREW_CASK_REPOSITORY/.git/FETCH_HEAD"
|
||||||
else
|
else
|
||||||
tap_fetch_head="$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core/.git/FETCH_HEAD"
|
tap_fetch_head="$HOMEBREW_CORE_REPOSITORY/.git/FETCH_HEAD"
|
||||||
fi
|
fi
|
||||||
if [[ -f "$tap_fetch_head" &&
|
if [[ -f "$tap_fetch_head" &&
|
||||||
-n "$(find "$tap_fetch_head" -type f -mtime -"${HOMEBREW_AUTO_UPDATE_SECS}"s 2>/dev/null)" ]]
|
-n "$(find "$tap_fetch_head" -type f -mtime -"${HOMEBREW_AUTO_UPDATE_SECS}"s 2>/dev/null)" ]]
|
||||||
@ -314,6 +314,15 @@ then
|
|||||||
HOMEBREW_USER_AGENT_VERSION="2.X.Y"
|
HOMEBREW_USER_AGENT_VERSION="2.X.Y"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
HOMEBREW_CASK_REPOSITORY="$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-cask"
|
||||||
|
HOMEBREW_CORE_REPOSITORY="$HOMEBREW_LIBRARY/Taps/homebrew/homebrew-core"
|
||||||
|
|
||||||
|
# Don't need shellcheck to follow these `source`.
|
||||||
|
# shellcheck disable=SC1090
|
||||||
|
case "$*" in
|
||||||
|
--version|-v) source "$HOMEBREW_LIBRARY/Homebrew/cmd/--version.sh"; homebrew-version; exit 0 ;;
|
||||||
|
esac
|
||||||
|
|
||||||
if [[ -n "$HOMEBREW_MACOS" ]]
|
if [[ -n "$HOMEBREW_MACOS" ]]
|
||||||
then
|
then
|
||||||
HOMEBREW_PRODUCT="Homebrew"
|
HOMEBREW_PRODUCT="Homebrew"
|
||||||
|
|||||||
@ -1,30 +0,0 @@
|
|||||||
# typed: true
|
|
||||||
# frozen_string_literal: true
|
|
||||||
|
|
||||||
require "cli/parser"
|
|
||||||
|
|
||||||
module Homebrew
|
|
||||||
extend T::Sig
|
|
||||||
|
|
||||||
module_function
|
|
||||||
|
|
||||||
sig { returns(CLI::Parser) }
|
|
||||||
def __version_args
|
|
||||||
Homebrew::CLI::Parser.new do
|
|
||||||
description <<~EOS
|
|
||||||
Print the version numbers of Homebrew, Homebrew/homebrew-core and Homebrew/homebrew-cask
|
|
||||||
(if tapped) to standard output.
|
|
||||||
EOS
|
|
||||||
|
|
||||||
named_args :none
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def __version
|
|
||||||
__version_args.parse
|
|
||||||
|
|
||||||
puts "Homebrew #{HOMEBREW_VERSION}"
|
|
||||||
puts "#{CoreTap.instance.full_name} #{CoreTap.instance.version_string}"
|
|
||||||
puts "#{Tap.default_cask_tap.full_name} #{Tap.default_cask_tap.version_string}" if Tap.default_cask_tap.installed?
|
|
||||||
end
|
|
||||||
end
|
|
||||||
31
Library/Homebrew/cmd/--version.sh
Normal file
31
Library/Homebrew/cmd/--version.sh
Normal file
@ -0,0 +1,31 @@
|
|||||||
|
#: * `--version`, `-v`
|
||||||
|
#:
|
||||||
|
#: Print the version numbers of Homebrew, Homebrew/homebrew-core and Homebrew/homebrew-cask (if tapped) to standard output.
|
||||||
|
|
||||||
|
version_string() {
|
||||||
|
local repo="$1"
|
||||||
|
if ! [ -d "$repo" ]; then
|
||||||
|
echo "N/A"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
local pretty_revision
|
||||||
|
pretty_revision="$(git -C "$repo" rev-parse --short --verify --quiet HEAD)"
|
||||||
|
if [ -z "$pretty_revision" ]; then
|
||||||
|
echo "(no Git repository)"
|
||||||
|
return
|
||||||
|
fi
|
||||||
|
|
||||||
|
local git_last_commit_date
|
||||||
|
git_last_commit_date=$(git -C "$repo" show -s --format='%cd' --date=short HEAD)
|
||||||
|
echo "(git revision ${pretty_revision}; last commit ${git_last_commit_date})"
|
||||||
|
}
|
||||||
|
|
||||||
|
homebrew-version() {
|
||||||
|
echo "Homebrew $HOMEBREW_VERSION"
|
||||||
|
echo "Homebrew/homebrew-core $(version_string "$HOMEBREW_CORE_REPOSITORY")"
|
||||||
|
|
||||||
|
if [ -d "$HOMEBREW_CASK_REPOSITORY" ]; then
|
||||||
|
echo "Homebrew/homebrew-cask $(version_string "$HOMEBREW_CASK_REPOSITORY")"
|
||||||
|
fi
|
||||||
|
}
|
||||||
@ -32,14 +32,14 @@ module GitRepositoryExtension
|
|||||||
# Gets the full commit hash of the HEAD commit.
|
# Gets the full commit hash of the HEAD commit.
|
||||||
sig { params(safe: T::Boolean).returns(T.nilable(String)) }
|
sig { params(safe: T::Boolean).returns(T.nilable(String)) }
|
||||||
def git_head(safe: false)
|
def git_head(safe: false)
|
||||||
popen_git("rev-parse", "--verify", "-q", "HEAD", safe: safe)
|
popen_git("rev-parse", "--verify", "--quiet", "HEAD", safe: safe)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Gets a short commit hash of the HEAD commit.
|
# Gets a short commit hash of the HEAD commit.
|
||||||
sig { params(length: T.nilable(Integer), safe: T::Boolean).returns(T.nilable(String)) }
|
sig { params(length: T.nilable(Integer), safe: T::Boolean).returns(T.nilable(String)) }
|
||||||
def git_short_head(length: nil, safe: false)
|
def git_short_head(length: nil, safe: false)
|
||||||
short_arg = length.present? ? "--short=#{length}" : "--short"
|
short_arg = length.present? ? "--short=#{length}" : "--short"
|
||||||
popen_git("rev-parse", short_arg, "--verify", "-q", "HEAD", safe: safe)
|
popen_git("rev-parse", short_arg, "--verify", "--quiet", "HEAD", safe: safe)
|
||||||
end
|
end
|
||||||
|
|
||||||
# Gets the relative date of the last commit, e.g. "1 hour ago"
|
# Gets the relative date of the last commit, e.g. "1 hour ago"
|
||||||
|
|||||||
@ -170,13 +170,6 @@ class Tap
|
|||||||
path.git_head
|
path.git_head
|
||||||
end
|
end
|
||||||
|
|
||||||
# git HEAD in short format for this {Tap}.
|
|
||||||
def git_short_head
|
|
||||||
raise TapUnavailableError, name unless installed?
|
|
||||||
|
|
||||||
path.git_short_head(length: 4)
|
|
||||||
end
|
|
||||||
|
|
||||||
# Time since last git commit for this {Tap}.
|
# Time since last git commit for this {Tap}.
|
||||||
def git_last_commit
|
def git_last_commit
|
||||||
raise TapUnavailableError, name unless installed?
|
raise TapUnavailableError, name unless installed?
|
||||||
@ -184,13 +177,6 @@ class Tap
|
|||||||
path.git_last_commit
|
path.git_last_commit
|
||||||
end
|
end
|
||||||
|
|
||||||
# Last git commit date for this {Tap}.
|
|
||||||
def git_last_commit_date
|
|
||||||
raise TapUnavailableError, name unless installed?
|
|
||||||
|
|
||||||
path.git_last_commit_date
|
|
||||||
end
|
|
||||||
|
|
||||||
# The issues URL of this {Tap}.
|
# The issues URL of this {Tap}.
|
||||||
# e.g. `https://github.com/user/homebrew-repo/issues`
|
# e.g. `https://github.com/user/homebrew-repo/issues`
|
||||||
sig { returns(T.nilable(String)) }
|
sig { returns(T.nilable(String)) }
|
||||||
@ -204,16 +190,6 @@ class Tap
|
|||||||
name
|
name
|
||||||
end
|
end
|
||||||
|
|
||||||
sig { returns(String) }
|
|
||||||
def version_string
|
|
||||||
return "N/A" unless installed?
|
|
||||||
|
|
||||||
pretty_revision = git_short_head
|
|
||||||
return "(no Git repository)" unless pretty_revision
|
|
||||||
|
|
||||||
"(git revision #{pretty_revision}; last commit #{git_last_commit_date})"
|
|
||||||
end
|
|
||||||
|
|
||||||
# True if this {Tap} is an official Homebrew tap.
|
# True if this {Tap} is an official Homebrew tap.
|
||||||
def official?
|
def official?
|
||||||
user == "Homebrew"
|
user == "Homebrew"
|
||||||
|
|||||||
@ -1,23 +1,19 @@
|
|||||||
# typed: false
|
# typed: false
|
||||||
# frozen_string_literal: true
|
# frozen_string_literal: true
|
||||||
|
|
||||||
describe "brew --caskroom", :integration_test do
|
require "cmd/shared_examples/args_parse"
|
||||||
let(:local_transmission) {
|
|
||||||
Cask::CaskLoader.load(cask_path("local-transmission"))
|
|
||||||
}
|
|
||||||
|
|
||||||
let(:local_caffeine) {
|
describe "brew --caskroom" do
|
||||||
Cask::CaskLoader.load(cask_path("local-caffeine"))
|
it_behaves_like "parseable arguments"
|
||||||
}
|
|
||||||
|
|
||||||
it "outputs Homebrew's caskroom" do
|
it "prints Homebrew's Caskroom", :integration_test do
|
||||||
expect { brew "--caskroom" }
|
expect { brew_sh "--caskroom" }
|
||||||
.to output("#{HOMEBREW_PREFIX/"Caskroom"}\n").to_stdout
|
.to output("#{ENV["HOMEBREW_PREFIX"]}/Caskroom\n").to_stdout
|
||||||
.and not_to_output.to_stderr
|
.and not_to_output.to_stderr
|
||||||
.and be_a_success
|
.and be_a_success
|
||||||
end
|
end
|
||||||
|
|
||||||
it "outputs the caskroom path of casks" do
|
it "prints the Caskroom for Casks", :integration_test do
|
||||||
expect { brew "--caskroom", cask_path("local-transmission"), cask_path("local-caffeine") }
|
expect { brew "--caskroom", cask_path("local-transmission"), cask_path("local-caffeine") }
|
||||||
.to output("#{HOMEBREW_PREFIX/"Caskroom"/"local-transmission"}\n" \
|
.to output("#{HOMEBREW_PREFIX/"Caskroom"/"local-transmission"}\n" \
|
||||||
"#{HOMEBREW_PREFIX/"Caskroom"/"local-caffeine\n"}").to_stdout
|
"#{HOMEBREW_PREFIX/"Caskroom"/"local-caffeine\n"}").to_stdout
|
||||||
|
|||||||
@ -6,7 +6,14 @@ require "cmd/shared_examples/args_parse"
|
|||||||
describe "brew --cellar" do
|
describe "brew --cellar" do
|
||||||
it_behaves_like "parseable arguments"
|
it_behaves_like "parseable arguments"
|
||||||
|
|
||||||
it "returns the Cellar subdirectory for a given Formula", :integration_test do
|
it "prints Homebrew's Cellar", :integration_test do
|
||||||
|
expect { brew_sh "--cellar" }
|
||||||
|
.to output("#{ENV["HOMEBREW_CELLAR"]}\n").to_stdout
|
||||||
|
.and not_to_output.to_stderr
|
||||||
|
.and be_a_success
|
||||||
|
end
|
||||||
|
|
||||||
|
it "prints the Cellar for a Formula", :integration_test do
|
||||||
expect { brew "--cellar", testball }
|
expect { brew "--cellar", testball }
|
||||||
.to output(%r{#{HOMEBREW_CELLAR}/testball}o).to_stdout
|
.to output(%r{#{HOMEBREW_CELLAR}/testball}o).to_stdout
|
||||||
.and not_to_output.to_stderr
|
.and not_to_output.to_stderr
|
||||||
|
|||||||
@ -6,9 +6,16 @@ require "cmd/shared_examples/args_parse"
|
|||||||
describe "brew --prefix" do
|
describe "brew --prefix" do
|
||||||
it_behaves_like "parseable arguments"
|
it_behaves_like "parseable arguments"
|
||||||
|
|
||||||
it "prints a given Formula's prefix", :integration_test do
|
it "prints Homebrew's prefix", :integration_test do
|
||||||
expect { brew "--prefix", testball }
|
expect { brew_sh "--prefix" }
|
||||||
.to output("#{HOMEBREW_PREFIX}/opt/testball\n").to_stdout
|
.to output("#{ENV["HOMEBREW_PREFIX"]}\n").to_stdout
|
||||||
|
.and not_to_output.to_stderr
|
||||||
|
.and be_a_success
|
||||||
|
end
|
||||||
|
|
||||||
|
it "prints the prefix for a Formula", :integration_test do
|
||||||
|
expect { brew_sh "--prefix", "wget" }
|
||||||
|
.to output("#{ENV["HOMEBREW_PREFIX"]}/opt/wget\n").to_stdout
|
||||||
.and not_to_output.to_stderr
|
.and not_to_output.to_stderr
|
||||||
.and be_a_success
|
.and be_a_success
|
||||||
end
|
end
|
||||||
|
|||||||
@ -6,7 +6,14 @@ require "cmd/shared_examples/args_parse"
|
|||||||
describe "brew --repository" do
|
describe "brew --repository" do
|
||||||
it_behaves_like "parseable arguments"
|
it_behaves_like "parseable arguments"
|
||||||
|
|
||||||
it "prints the path of a given Tap", :integration_test do
|
it "prints Homebrew's repository", :integration_test do
|
||||||
|
expect { brew_sh "--repository" }
|
||||||
|
.to output("#{ENV["HOMEBREW_REPOSITORY"]}\n").to_stdout
|
||||||
|
.and not_to_output.to_stderr
|
||||||
|
.and be_a_success
|
||||||
|
end
|
||||||
|
|
||||||
|
it "prints a Tap's repository", :integration_test do
|
||||||
expect { brew "--repository", "foo/bar" }
|
expect { brew "--repository", "foo/bar" }
|
||||||
.to output("#{HOMEBREW_LIBRARY}/Taps/foo/homebrew-bar\n").to_stdout
|
.to output("#{HOMEBREW_LIBRARY}/Taps/foo/homebrew-bar\n").to_stdout
|
||||||
.and not_to_output.to_stderr
|
.and not_to_output.to_stderr
|
||||||
|
|||||||
@ -4,10 +4,8 @@
|
|||||||
require "cmd/shared_examples/args_parse"
|
require "cmd/shared_examples/args_parse"
|
||||||
|
|
||||||
describe "brew --version" do
|
describe "brew --version" do
|
||||||
it_behaves_like "parseable arguments"
|
it "prints the Homebrew's version", :integration_test do
|
||||||
|
expect { brew_sh "--version" }
|
||||||
it "prints the Homebrew version", :integration_test do
|
|
||||||
expect { brew "--version" }
|
|
||||||
.to output(/^Homebrew #{Regexp.escape(HOMEBREW_VERSION)}\n/o).to_stdout
|
.to output(/^Homebrew #{Regexp.escape(HOMEBREW_VERSION)}\n/o).to_stdout
|
||||||
.and not_to_output.to_stderr
|
.and not_to_output.to_stderr
|
||||||
.and be_a_success
|
.and be_a_success
|
||||||
|
|||||||
@ -124,6 +124,15 @@ RSpec.shared_context "integration test" do # rubocop:disable RSpec/ContextWordin
|
|||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def brew_sh(*args)
|
||||||
|
Bundler.with_clean_env do
|
||||||
|
stdout, stderr, status = Open3.capture3("#{ENV["HOMEBREW_PREFIX"]}/bin/brew", *args)
|
||||||
|
$stdout.print stdout
|
||||||
|
$stderr.print stderr
|
||||||
|
status
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def setup_test_formula(name, content = nil, bottle_block: nil)
|
def setup_test_formula(name, content = nil, bottle_block: nil)
|
||||||
case name
|
case name
|
||||||
when /^testball/
|
when /^testball/
|
||||||
|
|||||||
@ -210,9 +210,7 @@ describe Tap do
|
|||||||
setup_git_repo
|
setup_git_repo
|
||||||
|
|
||||||
expect(homebrew_foo_tap.git_head).to eq("0453e16c8e3fac73104da50927a86221ca0740c2")
|
expect(homebrew_foo_tap.git_head).to eq("0453e16c8e3fac73104da50927a86221ca0740c2")
|
||||||
expect(homebrew_foo_tap.git_short_head).to eq("0453")
|
|
||||||
expect(homebrew_foo_tap.git_last_commit).to match(/\A\d+ .+ ago\Z/)
|
expect(homebrew_foo_tap.git_last_commit).to match(/\A\d+ .+ ago\Z/)
|
||||||
expect(homebrew_foo_tap.git_last_commit_date).to eq("2017-01-22")
|
|
||||||
end
|
end
|
||||||
|
|
||||||
specify "#private?" do
|
specify "#private?" do
|
||||||
|
|||||||
@ -245,21 +245,6 @@ _brew___repository() {
|
|||||||
__brew_complete_tapped
|
__brew_complete_tapped
|
||||||
}
|
}
|
||||||
|
|
||||||
_brew___version() {
|
|
||||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
|
||||||
case "$cur" in
|
|
||||||
-*)
|
|
||||||
__brewcomp "
|
|
||||||
--debug
|
|
||||||
--help
|
|
||||||
--quiet
|
|
||||||
--verbose
|
|
||||||
"
|
|
||||||
return
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
_brew__s() {
|
_brew__s() {
|
||||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
case "$cur" in
|
case "$cur" in
|
||||||
@ -287,21 +272,6 @@ _brew__s() {
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
_brew__v() {
|
|
||||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
|
||||||
case "$cur" in
|
|
||||||
-*)
|
|
||||||
__brewcomp "
|
|
||||||
--debug
|
|
||||||
--help
|
|
||||||
--quiet
|
|
||||||
--verbose
|
|
||||||
"
|
|
||||||
return
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
}
|
|
||||||
|
|
||||||
_brew_abv() {
|
_brew_abv() {
|
||||||
local cur="${COMP_WORDS[COMP_CWORD]}"
|
local cur="${COMP_WORDS[COMP_CWORD]}"
|
||||||
case "$cur" in
|
case "$cur" in
|
||||||
@ -2316,9 +2286,7 @@ _brew() {
|
|||||||
--prefix) _brew___prefix ;;
|
--prefix) _brew___prefix ;;
|
||||||
--repo) _brew___repo ;;
|
--repo) _brew___repo ;;
|
||||||
--repository) _brew___repository ;;
|
--repository) _brew___repository ;;
|
||||||
--version) _brew___version ;;
|
|
||||||
-S) _brew__s ;;
|
-S) _brew__s ;;
|
||||||
-v) _brew__v ;;
|
|
||||||
abv) _brew_abv ;;
|
abv) _brew_abv ;;
|
||||||
analytics) _brew_analytics ;;
|
analytics) _brew_analytics ;;
|
||||||
audit) _brew_audit ;;
|
audit) _brew_audit ;;
|
||||||
|
|||||||
@ -271,13 +271,6 @@ __fish_brew_complete_arg '--repository' -l verbose -d 'Make some output more ver
|
|||||||
__fish_brew_complete_arg '--repository' -a '(__fish_brew_suggest_taps_installed)'
|
__fish_brew_complete_arg '--repository' -a '(__fish_brew_suggest_taps_installed)'
|
||||||
|
|
||||||
|
|
||||||
__fish_brew_complete_cmd '--version' 'Print the version numbers of Homebrew, Homebrew/homebrew-core and Homebrew/homebrew-cask (if tapped) to standard output'
|
|
||||||
__fish_brew_complete_arg '--version' -l debug -d 'Display any debugging information'
|
|
||||||
__fish_brew_complete_arg '--version' -l help -d 'Show this message'
|
|
||||||
__fish_brew_complete_arg '--version' -l quiet -d 'Make some output more quiet'
|
|
||||||
__fish_brew_complete_arg '--version' -l verbose -d 'Make some output more verbose'
|
|
||||||
|
|
||||||
|
|
||||||
__fish_brew_complete_cmd '-S' 'Perform a substring search of cask tokens and formula names for text'
|
__fish_brew_complete_cmd '-S' 'Perform a substring search of cask tokens and formula names for text'
|
||||||
__fish_brew_complete_arg '-S' -l cask -d 'Without text, list all locally available casks (including tapped ones, no online search is performed). With text, search online and locally for casks'
|
__fish_brew_complete_arg '-S' -l cask -d 'Without text, list all locally available casks (including tapped ones, no online search is performed). With text, search online and locally for casks'
|
||||||
__fish_brew_complete_arg '-S' -l closed -d 'Search for only closed GitHub pull requests'
|
__fish_brew_complete_arg '-S' -l closed -d 'Search for only closed GitHub pull requests'
|
||||||
@ -297,13 +290,6 @@ __fish_brew_complete_arg '-S' -l ubuntu -d 'Search for text in the given package
|
|||||||
__fish_brew_complete_arg '-S' -l verbose -d 'Make some output more verbose'
|
__fish_brew_complete_arg '-S' -l verbose -d 'Make some output more verbose'
|
||||||
|
|
||||||
|
|
||||||
__fish_brew_complete_cmd '-v' 'Print the version numbers of Homebrew, Homebrew/homebrew-core and Homebrew/homebrew-cask (if tapped) to standard output'
|
|
||||||
__fish_brew_complete_arg '-v' -l debug -d 'Display any debugging information'
|
|
||||||
__fish_brew_complete_arg '-v' -l help -d 'Show this message'
|
|
||||||
__fish_brew_complete_arg '-v' -l quiet -d 'Make some output more quiet'
|
|
||||||
__fish_brew_complete_arg '-v' -l verbose -d 'Make some output more verbose'
|
|
||||||
|
|
||||||
|
|
||||||
__fish_brew_complete_cmd 'abv' 'Display brief statistics for your Homebrew installation'
|
__fish_brew_complete_cmd 'abv' 'Display brief statistics for your Homebrew installation'
|
||||||
__fish_brew_complete_arg 'abv' -l all -d 'Print JSON of all available formulae'
|
__fish_brew_complete_arg 'abv' -l all -d 'Print JSON of all available formulae'
|
||||||
__fish_brew_complete_arg 'abv' -l analytics -d 'List global Homebrew analytics data or, if specified, installation and build error data for formula (provided neither `HOMEBREW_NO_ANALYTICS` nor `HOMEBREW_NO_GITHUB_API` are set)'
|
__fish_brew_complete_arg 'abv' -l analytics -d 'List global Homebrew analytics data or, if specified, installation and build error data for formula (provided neither `HOMEBREW_NO_ANALYTICS` nor `HOMEBREW_NO_GITHUB_API` are set)'
|
||||||
|
|||||||
@ -337,15 +337,6 @@ _brew___repository() {
|
|||||||
'::tap:__brew_any_tap'
|
'::tap:__brew_any_tap'
|
||||||
}
|
}
|
||||||
|
|
||||||
# brew --version
|
|
||||||
_brew___version() {
|
|
||||||
_arguments \
|
|
||||||
'--debug[Display any debugging information]' \
|
|
||||||
'--help[Show this message]' \
|
|
||||||
'--quiet[Make some output more quiet]' \
|
|
||||||
'--verbose[Make some output more verbose]'
|
|
||||||
}
|
|
||||||
|
|
||||||
# brew -S
|
# brew -S
|
||||||
_brew__s() {
|
_brew__s() {
|
||||||
_arguments \
|
_arguments \
|
||||||
@ -367,15 +358,6 @@ _brew__s() {
|
|||||||
'--verbose[Make some output more verbose]'
|
'--verbose[Make some output more verbose]'
|
||||||
}
|
}
|
||||||
|
|
||||||
# brew -v
|
|
||||||
_brew__v() {
|
|
||||||
_arguments \
|
|
||||||
'--debug[Display any debugging information]' \
|
|
||||||
'--help[Show this message]' \
|
|
||||||
'--quiet[Make some output more quiet]' \
|
|
||||||
'--verbose[Make some output more verbose]'
|
|
||||||
}
|
|
||||||
|
|
||||||
# brew abv
|
# brew abv
|
||||||
_brew_abv() {
|
_brew_abv() {
|
||||||
_arguments \
|
_arguments \
|
||||||
|
|||||||
@ -749,8 +749,7 @@ If *`user`*`/`*`repo`* are provided, display where tap *`user`*`/`*`repo`*'s dir
|
|||||||
|
|
||||||
### `--version`, `-v`
|
### `--version`, `-v`
|
||||||
|
|
||||||
Print the version numbers of Homebrew, Homebrew/homebrew-core and Homebrew/homebrew-cask
|
Print the version numbers of Homebrew, Homebrew/homebrew-core and Homebrew/homebrew-cask (if tapped) to standard output.
|
||||||
(if tapped) to standard output.
|
|
||||||
|
|
||||||
## DEVELOPER COMMANDS
|
## DEVELOPER COMMANDS
|
||||||
|
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user