Skip to content

Add a shell completions command (fix #881) - #919

Open
MsfPablo wants to merge 1 commit into
sharkdp:masterfrom
MsfPablo:fix-881
Open

Add a shell completions command (fix #881)#919
MsfPablo wants to merge 1 commit into
sharkdp:masterfrom
MsfPablo:fix-881

Conversation

@MsfPablo

Copy link
Copy Markdown

Fixes #881

Add a hidden --generate-completions <SHELL> flag that prints a shell
completion script to stdout. Supported shells: bash, zsh, fish,
powershell, elvish.

This addresses #881 by giving package managers (mise, aqua) and users
a way to source completions even when they are not pre-bundled.

Usage:

hyperfine --generate-completions fish | source
hyperfine --generate-completions bash > ~/.local/share/bash-completion/completions/hyperfine

Disclosure

This change was authored with assistance from Claude (Anthropic).
The implementation follows the issue description, the existing
clap_complete build-time wiring, and the conventions of peer tools
(bat --completion, rg --generate, fd --gen-completions).

🤖 Generated with Claude Code

Add a hidden --generate-completions <SHELL> flag that prints a shell
completion script to stdout. Supported shells: bash, zsh, fish,
powershell, elvish.

This addresses sharkdp#881 by giving package managers (mise, aqua) and users
a way to source completions even when they are not pre-bundled.

Co-Authored-By: Claude <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add a shell completions command

1 participant