Convert remaining subcommands#22281
Merged
Merged
Conversation
MikeMcQuaid
force-pushed
the
subcommand-parser-support
branch
from
May 14, 2026 14:00
7ae6c50 to
00b6e04
Compare
MikeMcQuaid
force-pushed
the
other-subcommands
branch
from
May 14, 2026 14:21
66c92ff to
c8f491c
Compare
MikeMcQuaid
force-pushed
the
subcommand-parser-support
branch
2 times, most recently
from
May 15, 2026 15:33
ef0af09 to
4c22ef0
Compare
MikeMcQuaid
force-pushed
the
other-subcommands
branch
from
May 16, 2026 09:39
c8f491c to
fa53246
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
This PR converts remaining small state/action commands (analytics, completions, and developer) to the newer parser subcommand API and refreshes generated docs/completions.
Changes:
- Splits command behavior into
AbstractSubcommandsubclasses with defaultstatesubcommands. - Updates command entrypoints to dispatch through subcommand metadata.
- Regenerates tests, manpages, and shell completions for the converted commands.
Reviewed changes
Copilot reviewed 24 out of 24 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
Library/Homebrew/cmd/analytics.rb |
Delegates analytics actions to parser-defined subcommands. |
Library/Homebrew/analytics/subcommand.rb |
Loads and dispatches analytics subcommands. |
Library/Homebrew/analytics/subcommand/state.rb |
Adds default analytics state behavior. |
Library/Homebrew/analytics/subcommand/on.rb |
Adds analytics enable subcommand. |
Library/Homebrew/analytics/subcommand/off.rb |
Adds analytics disable subcommand. |
Library/Homebrew/analytics/subcommand/regenerate_uuid.rb |
Keeps legacy UUID command as a subcommand. |
Library/Homebrew/cmd/completions.rb |
Delegates completions actions to parser-defined subcommands. |
Library/Homebrew/completions/subcommand.rb |
Loads and dispatches completions subcommands. |
Library/Homebrew/completions/subcommand/state.rb |
Adds default completions state behavior. |
Library/Homebrew/completions/subcommand/link.rb |
Adds completions link subcommand. |
Library/Homebrew/completions/subcommand/unlink.rb |
Adds completions unlink subcommand. |
Library/Homebrew/cmd/developer.rb |
Delegates developer mode actions to parser-defined subcommands. |
Library/Homebrew/developer/subcommand.rb |
Loads and dispatches developer subcommands. |
Library/Homebrew/developer/subcommand/state.rb |
Adds default developer mode state behavior. |
Library/Homebrew/developer/subcommand/on.rb |
Adds developer mode enable subcommand. |
Library/Homebrew/developer/subcommand/off.rb |
Adds developer mode disable subcommand. |
Library/Homebrew/test/cmd/analytics_spec.rb |
Adds parser expectations for analytics default/extra args. |
Library/Homebrew/test/cmd/completions_spec.rb |
Adds parser expectations for completions default/extra args. |
Library/Homebrew/test/cmd/developer_spec.rb |
Adds parser expectations for developer default/extra args. |
docs/Manpage.md |
Regenerates markdown manpage entries for subcommands. |
manpages/brew.1 |
Regenerates roff manpage entries for subcommands. |
completions/bash/brew |
Regenerates bash completions for nested subcommands. |
completions/fish/brew.fish |
Regenerates fish completions for nested subcommands. |
completions/zsh/_brew |
Regenerates zsh completions for nested subcommands. |
Comments suppressed due to low confidence (2)
completions/zsh/_brew:842
- This nested zsh completion omits the global/default-subcommand options at the command level, so
brew completions --<TAB>stops suggesting valid flags such as--helpand--debug. Please make the top-level_argumentscall include the default subcommand's options (ideally in the completion generator) and regenerate the completions.
_arguments -C \
'1:subcommand:->subcommand' \
'*::arg:->args'
completions/zsh/_brew:1012
- This nested zsh completion omits valid global/default-subcommand flags before a subcommand is supplied, so
brew developer --<TAB>no longer suggests options like--helpor--debug. Please include the default subcommand's option specs in the top-level_argumentscall (or adjust the generator) and regenerate the file.
_arguments -C \
'1:subcommand:->subcommand' \
'*::arg:->args'
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
MikeMcQuaid
force-pushed
the
other-subcommands
branch
4 times, most recently
from
May 16, 2026 10:55
9afc089 to
eda8458
Compare
Rylan12
approved these changes
May 17, 2026
Rylan12
left a comment
Member
There was a problem hiding this comment.
I didn't verify that the code moves were identical, but the structure change looks good and like a nice cleanup!
github-merge-queue
Bot
removed this pull request from the merge queue due to failed status checks
May 17, 2026
github-merge-queue
Bot
removed this pull request from the merge queue due to a conflict with the base branch
May 17, 2026
MikeMcQuaid
force-pushed
the
other-subcommands
branch
from
May 17, 2026 14:36
eda8458 to
5e1889a
Compare
MikeMcQuaid
force-pushed
the
bundle-subcommand
branch
from
May 17, 2026 14:49
e59a327 to
f38cd4b
Compare
- Small state/action commands should use the same parser API. - Keep the legacy analytics UUID command visible but marked for removal. - Refresh generated manpages and completions after all conversions.
MikeMcQuaid
force-pushed
the
other-subcommands
branch
from
May 17, 2026 14:49
5e1889a to
b23d08d
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
brew lgtm(style, typechecking and tests) with your changes locally?OpenAI Codex 5.5 xhigh with local review and testing.