Add completion-cmds for shell completion and change brew committer#50
Merged
Conversation
We don't really want to be using an account we don't own to be listed as the committer on our homebrew tap. Given that we're using a PAT, set that user as the committer. This has the added benefit of making it easier to discover who to contact when the PAT expires.
wfchandler
force-pushed
the
wc/change-brew-bot
branch
3 times, most recently
from
July 4, 2025 17:17
ce22dd9 to
dfe7833
Compare
Add a new `dist.completion-cmds` option which takes a map of binary
names to the subcommand to execute to generate shell completions.
This hooks in very easily with the Homebrew
`generate_completions_from_executable` helper function. We allow three
options for completion generation, `clap-env`, which will use
`clap_complete`'s environment variable option to trigger shell
completion, or `subcommand`, which specifies the subcommand and
parameter format, flag or arg, for the command. All options take an
array of shells.
```toml
[dist.completion-cmds.mybin]
trigger = "clap-env"
shells = ["bash","fish"]
[dist.completion-cmds.otherbin]
trigger.subcommand = {{ name = "completions", format = "flag" }}
shells = ["bash","fish","pwsh","zsh"]
```
wfchandler
force-pushed
the
wc/change-brew-bot
branch
from
July 4, 2025 17:47
dfe7833 to
e7e28e8
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.
Add completion-cmds for shell completion
Add a new
dist.completion-cmdsoption which takes a map of binarynames to the subcommand to execute to generate shell completions.
This hooks in very easily with the homebrew
generate_completions_from_executablehelper function, which willdefault to generating completions for bash, zsh, and fish.
Don't use axobot for homebrew commits
We don't really want to be using an account we don't own to be listed as
the committer on our homebrew tap.
Given that we're using a PAT, set that user as the committer. This has
the added benefit of making it easier to discover who to contact when
the PAT expires.