Skip to content

Add shell completion generation command - #906

Open
pollychen-lab wants to merge 2 commits into
sharkdp:masterfrom
pollychen-lab:fix/issue-881-completion-command
Open

Add shell completion generation command#906
pollychen-lab wants to merge 2 commits into
sharkdp:masterfrom
pollychen-lab:fix/issue-881-completion-command

Conversation

@pollychen-lab

Copy link
Copy Markdown

Summary

  • add a generate-shell-completion <SHELL> subcommand that writes completions to stdout
  • reuse the existing Clap command definition and clap_complete shell support used by the build script
  • add integration coverage for completion generation and invalid shell handling

Fixes #881.

Validation

  • cargo fmt --check
  • cargo test --test integration_tests shell_completion
  • cargo test
  • cargo run --quiet -- generate-shell-completion fish > /tmp/... and verified the output contains Fish completion entries for hyperfine
  • git diff --check

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: 573f895821

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment thread src/cli.rs
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