Skip to content

Add shell completion - #251

Merged
sharkdp merged 4 commits into
sharkdp:masterfrom
friedz:shell-completion
Aug 31, 2025
Merged

sharkdp merged 4 commits into
sharkdp:masterfrom
friedz:shell-completion

Conversation

@friedz

@friedz friedz commented Aug 3, 2025 •

Copy link
Copy Markdown
Contributor

I added a command line argument to run clap_generate for all the shells it supports out of the box. See #155 and fish being one of the shells probably also #223

I tried to have the generation be run at compile time but while it doesn't look like it's impossible it seems impractical. Perhaps a similar result can be archived by running hexyl --shell-completion <SHELL> > <completion file> in the CI for all supported shells.

@gforien

gforien commented Aug 22, 2025 •

Copy link
Copy Markdown

Hi, I frequently use hexyl and it would be nice to have shell completions
I've opened a draft PR to generate shell completions at install time for homebrew
Homebrew/homebrew-core#234469

@Rondom

Rondom commented Aug 22, 2025

Copy link
Copy Markdown

Running it at compilation time would also not work when cross-compiling.

@friedz

friedz commented Aug 22, 2025 •

Copy link
Copy Markdown
Contributor Author

Running it at compilation time would also not work when cross-compiling.

I'm pretty sure it could but that would require having access to all the code necessary for the completion in the build.rs

@sharkdp
sharkdp merged commit 585d062 into sharkdp:master Aug 31, 2025
@sharkdp

sharkdp commented Aug 31, 2025

Copy link
Copy Markdown
Owner

Thank you!

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.

4 participants