Skip to content

fix: zsh autocompletions - #2172

Closed
mahyarmirrashed wants to merge 1 commit into
urfave:mainfrom
mahyarmirrashed:fix/zsh-completions
Closed

fix: zsh autocompletions#2172
mahyarmirrashed wants to merge 1 commit into
urfave:mainfrom
mahyarmirrashed:fix/zsh-completions

Conversation

@mahyarmirrashed

@mahyarmirrashed mahyarmirrashed commented Jul 26, 2025

Copy link
Copy Markdown

Actually auto-complete.

For some reason, the auto-completion wasn't working for me. Running <prog> -- --generate-shell-completion just ran the command, and did not provide the correct results. The reason that was happening (if I had to guess) is because -- is being treated as an end of flags. As such, the literal string --generate-shell-completion was being passed to the underlying program.

What type of PR is this?

  • bug

What this PR does / why we need it:

Current completions do not work for ZSH. I spent 3 hours trying to figure out what it was.

Which issue(s) this PR fixes:

Partially fixes #2173

Release Notes

fix: zsh autocompletions

Actually auto-complete.
@mahyarmirrashed
mahyarmirrashed requested a review from a team as a code owner July 26, 2025 09:28
@mahyarmirrashed

Copy link
Copy Markdown
Author

Admittedly, this is just a patch over the old problem. There probably needs to be actual source code changes to make it work properly.

e.g.

mahyar@tiger tmp % ./greet add - --generate-shell-completion
--config:path to config file
--help:show help
mahyar@tiger tmp % ./greet add --conf --generate-shell-completion
help:Shows a list of commands or help for one command

@mahyarmirrashed mahyarmirrashed closed this by deleting the head repository Aug 7, 2025
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.

bug: zsh autocompletions

1 participant