Skip to content

feat: add --completions flag for shell completion generation (1) - #931

Draft
marcospb19 wants to merge 5 commits into
mainfrom
completions-flag
Draft

feat: add --completions flag for shell completion generation (1)#931
marcospb19 wants to merge 5 commits into
mainfrom
completions-flag

Conversation

@marcospb19

@marcospb19 marcospb19 commented Mar 2, 2026

Copy link
Copy Markdown
Member

Reopening PR #896.

(Branch for this PR was erased, but it had our license.)

l1a added 5 commits December 11, 2025 22:44
# Please enter a commit message to explain why this merge is necessary,
# especially if it merges an updated upstream into a topic branch.
#
# Lines starting with '#' will be ignored, and an empty message aborts
# the commit.
# Conflicts:
#	src/cli/args.rs
@figsoda

figsoda commented Mar 2, 2026

Copy link
Copy Markdown
Member

Don't we already generate shell completions at build time? Are there any benefits to also do this at run time?

@marcospb19

Copy link
Copy Markdown
Member Author

Thanks, that's a valid point, maybe we should just leave it as it is, I mean, if you are packaging targetted for the latest commit in main you'll need to compile anyways, so you just need to set the env var at build time.

@marcospb19 marcospb19 closed this Mar 4, 2026
@dimpen

dimpen commented Sep 11, 2026

Copy link
Copy Markdown

This would be really helpful. I came across this issue looking for completions for zsh.
I'm installing with cargo so I don't have completions.

For example in my setup I'm using zinit for zsh and it needs a way to get the completions _ouch.
Since there's no static completions file in the repo (like completions/zsh) the next best thing is to have ouch --completions zsh.

@marcospb19 marcospb19 reopened this Sep 11, 2026
@marcospb19

marcospb19 commented Sep 11, 2026

Copy link
Copy Markdown
Member Author

@dimpen thanks, I'm reconsidering, provided that I manage to simplify this code and I don't see a huge binary size increase, I might include this in and switch away from build-time completions generation.

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