Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update manpage and completions. #19267

Merged
merged 1 commit into from
Feb 9, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
50 changes: 50 additions & 0 deletions completions/bash/brew
Original file line number Diff line number Diff line change
Expand Up @@ -1133,6 +1133,38 @@ _brew_formula() {
__brew_complete_formulae
}

_brew_formula_analytics() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "${cur}" in
-*)
__brewcomp "
--all-core-formulae-json
--brew-command-run
--brew-command-run-options
--brew-test-bot-test
--build-error
--cask-install
--days-ago
--debug
--help
--homebrew-devcmdrun-developer
--homebrew-os-arch-ci
--homebrew-prefixes
--homebrew-versions
--install
--install-on-request
--json
--os-version
--quiet
--setup
--verbose
"
return
;;
*) ;;
esac
}

_brew_formulae() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "${cur}" in
Expand All @@ -1149,6 +1181,22 @@ _brew_formulae() {
esac
}

_brew_generate_analytics_api() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "${cur}" in
-*)
__brewcomp "
--debug
--help
--quiet
--verbose
"
return
;;
*) ;;
esac
}

_brew_generate_cask_api() {
local cur="${COMP_WORDS[COMP_CWORD]}"
case "${cur}" in
Expand Down Expand Up @@ -3029,7 +3077,9 @@ _brew() {
extract) _brew_extract ;;
fetch) _brew_fetch ;;
formula) _brew_formula ;;
formula-analytics) _brew_formula_analytics ;;
formulae) _brew_formulae ;;
generate-analytics-api) _brew_generate_analytics_api ;;
generate-cask-api) _brew_generate_cask_api ;;
generate-cask-ci-matrix) _brew_generate_cask_ci_matrix ;;
generate-formula-api) _brew_generate_formula_api ;;
Expand Down
30 changes: 30 additions & 0 deletions completions/fish/brew.fish
Original file line number Diff line number Diff line change
Expand Up @@ -780,13 +780,43 @@ __fish_brew_complete_arg 'formula' -l verbose -d 'Make some output more verbose'
__fish_brew_complete_arg 'formula' -a '(__fish_brew_suggest_formulae_all)'


__fish_brew_complete_cmd 'formula-analytics' 'Query Homebrew\'s analytics'
__fish_brew_complete_arg 'formula-analytics' -l all-core-formulae-json -d 'Output a different JSON format containing the JSON data for all Homebrew/homebrew-core formulae'
__fish_brew_complete_arg 'formula-analytics' -l brew-command-run -d 'Output `brew` commands run'
__fish_brew_complete_arg 'formula-analytics' -l brew-command-run-options -d 'Output `brew` commands run with options'
__fish_brew_complete_arg 'formula-analytics' -l brew-test-bot-test -d 'Output `brew test-bot` steps run'
__fish_brew_complete_arg 'formula-analytics' -l build-error -d 'Output the number of build errors for the formulae'
__fish_brew_complete_arg 'formula-analytics' -l cask-install -d 'Output the number of installations of casks'
__fish_brew_complete_arg 'formula-analytics' -l days-ago -d 'Query from the specified days ago until the present. The default is 30 days'
__fish_brew_complete_arg 'formula-analytics' -l debug -d 'Display any debugging information'
__fish_brew_complete_arg 'formula-analytics' -l help -d 'Show this message'
__fish_brew_complete_arg 'formula-analytics' -l homebrew-devcmdrun-developer -d 'Output devcmdrun/HOMEBREW_DEVELOPER'
__fish_brew_complete_arg 'formula-analytics' -l homebrew-os-arch-ci -d 'Output OS/Architecture/CI'
__fish_brew_complete_arg 'formula-analytics' -l homebrew-prefixes -d 'Output Homebrew prefixes'
__fish_brew_complete_arg 'formula-analytics' -l homebrew-versions -d 'Output Homebrew versions'
__fish_brew_complete_arg 'formula-analytics' -l install -d 'Output the number of specifically requested installations or installation as dependencies of the formula. This is the default'
__fish_brew_complete_arg 'formula-analytics' -l install-on-request -d 'Output the number of specifically requested installations of the formula'
__fish_brew_complete_arg 'formula-analytics' -l json -d 'Output JSON. This is required: plain text support has been removed'
__fish_brew_complete_arg 'formula-analytics' -l os-version -d 'Output OS versions'
__fish_brew_complete_arg 'formula-analytics' -l quiet -d 'Make some output more quiet'
__fish_brew_complete_arg 'formula-analytics' -l setup -d 'Install the necessary gems, require them and exit without running a query'
__fish_brew_complete_arg 'formula-analytics' -l verbose -d 'Make some output more verbose'


__fish_brew_complete_cmd 'formulae' 'List all locally installable formulae including short names'
__fish_brew_complete_arg 'formulae' -l debug -d 'Display any debugging information'
__fish_brew_complete_arg 'formulae' -l help -d 'Show this message'
__fish_brew_complete_arg 'formulae' -l quiet -d 'Make some output more quiet'
__fish_brew_complete_arg 'formulae' -l verbose -d 'Make some output more verbose'


__fish_brew_complete_cmd 'generate-analytics-api' 'Generates analytics API data files for formulae.brew.sh'
__fish_brew_complete_arg 'generate-analytics-api' -l debug -d 'Display any debugging information'
__fish_brew_complete_arg 'generate-analytics-api' -l help -d 'Show this message'
__fish_brew_complete_arg 'generate-analytics-api' -l quiet -d 'Make some output more quiet'
__fish_brew_complete_arg 'generate-analytics-api' -l verbose -d 'Make some output more verbose'


__fish_brew_complete_cmd 'generate-cask-api' 'Generate `homebrew/cask` API data files for https://formulae.brew.sh'
__fish_brew_complete_arg 'generate-cask-api' -l debug -d 'Display any debugging information'
__fish_brew_complete_arg 'generate-cask-api' -l dry-run -d 'Generate API data without writing it to files'
Expand Down
2 changes: 2 additions & 0 deletions completions/internal_commands_list.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,9 @@ environment
extract
fetch
formula
formula-analytics
formulae
generate-analytics-api
generate-cask-api
generate-cask-ci-matrix
generate-formula-api
Expand Down
36 changes: 36 additions & 0 deletions completions/zsh/_brew
Original file line number Diff line number Diff line change
Expand Up @@ -170,7 +170,9 @@ __brew_internal_commands() {
'extract:Look through repository history to find the most recent version of formula and create a copy in tap'
'fetch:Download a bottle (if available) or source packages for formulae and binaries for casks'
'formula:Display the path where formula is located'
'formula-analytics:Query Homebrew'\''s analytics'
'formulae:List all locally installable formulae including short names'
'generate-analytics-api:Generates analytics API data files for formulae.brew.sh'
'generate-cask-api:Generate `homebrew/cask` API data files for https://formulae.brew.sh'
'generate-cask-ci-matrix:Generate a GitHub Actions matrix for a given pull request URL or list of cask names'
'generate-formula-api:Generate `homebrew/core` API data files for https://formulae.brew.sh'
Expand Down Expand Up @@ -991,6 +993,31 @@ _brew_formula() {
'*::formula:__brew_formulae'
}

# brew formula-analytics
_brew_formula_analytics() {
_arguments \
'(--json --setup)--all-core-formulae-json[Output a different JSON format containing the JSON data for all Homebrew/homebrew-core formulae]' \
'(--install --cask-install --install-on-request --build-error --os-version --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-prefixes --homebrew-versions --brew-command-run-options --brew-test-bot-test)--brew-command-run[Output `brew` commands run]' \
'(--install --cask-install --install-on-request --build-error --os-version --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-prefixes --homebrew-versions --brew-command-run --brew-test-bot-test)--brew-command-run-options[Output `brew` commands run with options]' \
'(--install --cask-install --install-on-request --build-error --os-version --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-prefixes --homebrew-versions --brew-command-run --brew-command-run-options)--brew-test-bot-test[Output `brew test-bot` steps run]' \
'(--install --cask-install --install-on-request --os-version --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-prefixes --homebrew-versions --brew-command-run --brew-command-run-options --brew-test-bot-test)--build-error[Output the number of build errors for the formulae]' \
'(--install --install-on-request --build-error --os-version --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-prefixes --homebrew-versions --brew-command-run --brew-command-run-options --brew-test-bot-test)--cask-install[Output the number of installations of casks]' \
'--days-ago[Query from the specified days ago until the present. The default is 30 days]' \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'(--install --cask-install --install-on-request --build-error --os-version --homebrew-os-arch-ci --homebrew-prefixes --homebrew-versions --brew-command-run --brew-command-run-options --brew-test-bot-test)--homebrew-devcmdrun-developer[Output devcmdrun/HOMEBREW_DEVELOPER]' \
'(--install --cask-install --install-on-request --build-error --os-version --homebrew-devcmdrun-developer --homebrew-prefixes --homebrew-versions --brew-command-run --brew-command-run-options --brew-test-bot-test)--homebrew-os-arch-ci[Output OS/Architecture/CI]' \
'(--install --cask-install --install-on-request --build-error --os-version --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-versions --brew-command-run --brew-command-run-options --brew-test-bot-test)--homebrew-prefixes[Output Homebrew prefixes]' \
'(--install --cask-install --install-on-request --build-error --os-version --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-prefixes --brew-command-run --brew-command-run-options --brew-test-bot-test)--homebrew-versions[Output Homebrew versions]' \
'(--cask-install --install-on-request --build-error --os-version --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-prefixes --homebrew-versions --brew-command-run --brew-command-run-options --brew-test-bot-test)--install[Output the number of specifically requested installations or installation as dependencies of the formula. This is the default]' \
'(--install --cask-install --build-error --os-version --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-prefixes --homebrew-versions --brew-command-run --brew-command-run-options --brew-test-bot-test)--install-on-request[Output the number of specifically requested installations of the formula]' \
'(--all-core-formulae-json --setup)--json[Output JSON. This is required: plain text support has been removed]' \
'(--install --cask-install --install-on-request --build-error --homebrew-devcmdrun-developer --homebrew-os-arch-ci --homebrew-prefixes --homebrew-versions --brew-command-run --brew-command-run-options --brew-test-bot-test)--os-version[Output OS versions]' \
'--quiet[Make some output more quiet]' \
'(--json --all-core-formulae-json)--setup[Install the necessary gems, require them and exit without running a query]' \
'--verbose[Make some output more verbose]'
}

# brew formulae
_brew_formulae() {
_arguments \
Expand All @@ -1000,6 +1027,15 @@ _brew_formulae() {
'--verbose[Make some output more verbose]'
}

# brew generate-analytics-api
_brew_generate_analytics_api() {
_arguments \
'--debug[Display any debugging information]' \
'--help[Show this message]' \
'--quiet[Make some output more quiet]' \
'--verbose[Make some output more verbose]'
}

# brew generate-cask-api
_brew_generate_cask_api() {
_arguments \
Expand Down
76 changes: 76 additions & 0 deletions docs/Manpage.md
Original file line number Diff line number Diff line change
Expand Up @@ -2281,6 +2281,82 @@ form of *`user`*`/`*`repo`*`/`*`formula`*.

Display the path where *`formula`* is located.

### `formula-analytics`

Query Homebrew's analytics.

`--days-ago`

: Query from the specified days ago until the present. The default is 30 days.

`--install`

: Output the number of specifically requested installations or installation as
dependencies of the formula. This is the default.

`--cask-install`

: Output the number of installations of casks.

`--install-on-request`

: Output the number of specifically requested installations of the formula.

`--build-error`

: Output the number of build errors for the formulae.

`--os-version`

: Output OS versions.

`--homebrew-devcmdrun-developer`

: Output devcmdrun/HOMEBREW\_DEVELOPER.

`--homebrew-os-arch-ci`

: Output OS/Architecture/CI.

`--homebrew-prefixes`

: Output Homebrew prefixes.

`--homebrew-versions`

: Output Homebrew versions.

`--brew-command-run`

: Output `brew` commands run.

`--brew-command-run-options`

: Output `brew` commands run with options.

`--brew-test-bot-test`

: Output `brew test-bot` steps run.

`--json`

: Output JSON. This is required: plain text support has been removed.

`--all-core-formulae-json`

: Output a different JSON format containing the JSON data for all
Homebrew/homebrew-core formulae.

`--setup`

: Install the necessary gems, require them and exit without running a query.

### `generate-analytics-api`

Generates analytics API data files for formulae.brew.sh.

The generated files are written to the current directory.

### `generate-cask-api` \[`--dry-run`\]

Generate `homebrew/cask` API data files for <https://formulae.brew.sh>. The
Expand Down
54 changes: 54 additions & 0 deletions manpages/brew.1
Original file line number Diff line number Diff line change
Expand Up @@ -1448,6 +1448,60 @@ Extract the specified \fIversion\fP of \fIformula\fP instead of the most recent\
Overwrite the destination formula if it already exists\.
.SS "\fBformula\fP \fIformula\fP \fR[\.\.\.]"
Display the path where \fIformula\fP is located\.
.SS "\fBformula\-analytics\fP"
Query Homebrew\[u2019]s analytics\.
.TP
\fB\-\-days\-ago\fP
Query from the specified days ago until the present\. The default is 30 days\.
.TP
\fB\-\-install\fP
Output the number of specifically requested installations or installation as dependencies of the formula\. This is the default\.
.TP
\fB\-\-cask\-install\fP
Output the number of installations of casks\.
.TP
\fB\-\-install\-on\-request\fP
Output the number of specifically requested installations of the formula\.
.TP
\fB\-\-build\-error\fP
Output the number of build errors for the formulae\.
.TP
\fB\-\-os\-version\fP
Output OS versions\.
.TP
\fB\-\-homebrew\-devcmdrun\-developer\fP
Output devcmdrun/HOMEBREW_DEVELOPER\.
.TP
\fB\-\-homebrew\-os\-arch\-ci\fP
Output OS/Architecture/CI\.
.TP
\fB\-\-homebrew\-prefixes\fP
Output Homebrew prefixes\.
.TP
\fB\-\-homebrew\-versions\fP
Output Homebrew versions\.
.TP
\fB\-\-brew\-command\-run\fP
Output \fBbrew\fP commands run\.
.TP
\fB\-\-brew\-command\-run\-options\fP
Output \fBbrew\fP commands run with options\.
.TP
\fB\-\-brew\-test\-bot\-test\fP
Output \fBbrew test\-bot\fP steps run\.
.TP
\fB\-\-json\fP
Output JSON\. This is required: plain text support has been removed\.
.TP
\fB\-\-all\-core\-formulae\-json\fP
Output a different JSON format containing the JSON data for all Homebrew/homebrew\-core formulae\.
.TP
\fB\-\-setup\fP
Install the necessary gems, require them and exit without running a query\.
.SS "\fBgenerate\-analytics\-api\fP"
Generates analytics API data files for formulae\.brew\.sh\.
.P
The generated files are written to the current directory\.
.SS "\fBgenerate\-cask\-api\fP \fR[\fB\-\-dry\-run\fP]"
Generate \fBhomebrew/cask\fP API data files for
.UR https://formulae\.brew\.sh
Expand Down
Loading