Skip to content

feat: add --gen-completions for runtime shell completion generation#885

Open
leno23 wants to merge 1 commit into
sharkdp:masterfrom
leno23:feat/gen-completions-881
Open

feat: add --gen-completions for runtime shell completion generation#885
leno23 wants to merge 1 commit into
sharkdp:masterfrom
leno23:feat/gen-completions-881

Conversation

@leno23
Copy link
Copy Markdown

@leno23 leno23 commented May 25, 2026

Summary

  • Add --gen-completions <SHELL> (alias --generate-shell-completion) to print shell completions to stdout
  • Supports bash, fish, zsh, powershell, and elvish (matching build-time generated completions)
  • Makes it easy to source completions from tool managers like mise/aqua without bundled files

Fixes #881

Test plan

  • cargo test gen_completions
  • cargo build
  • hyperfine --gen-completions fish | source (manual)

Made with Cursor

Allow generating bash/fish/zsh/powershell/elvish completions to stdout
via --gen-completions (alias --generate-shell-completion).

Fixes sharkdp#881

Co-authored-by: Cursor <cursoragent@cursor.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