Skip to content

feat: add zsh completion support#262

Closed
Eazash wants to merge 3 commits intoantfu-collective:mainfrom
Eazash:feat/zsh-completion-script
Closed

feat: add zsh completion support#262
Eazash wants to merge 3 commits intoantfu-collective:mainfrom
Eazash:feat/zsh-completion-script

Conversation

@Eazash
Copy link
Copy Markdown
Contributor

@Eazash Eazash commented Feb 27, 2025

Description

This PR introduces support for zsh completions. It adds a new --print-completions flag that can be used to print completion scripts for either bash or zsh. It does retain the current behavior for the --completion flag in that it still prints bash completions if no argument is passed.

It also slightly tweaks how words are passes to nr --completion so that it's passed as a space separated sequence and the first argument/word is properly picked up

Linked Issues

#261

Additional context

There is room for future improvement to include script descriptions and customize styling in zsh completions, as well as include completions for other commands like nun, nu or na

@Eazash Eazash changed the title fix: correct array expansion in completion script feat: add zsh completion support Feb 27, 2025
@Stanzilla
Copy link
Copy Markdown

would love to see this added

@antfu
Copy link
Copy Markdown
Member

antfu commented Jan 13, 2026

I had #285 merged before seeing your PR, I am sorry for the delay. Would you like to rebase your branch to resolve the conflicts and use your approach instead? Thanks

@antfu antfu closed this Apr 22, 2026
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.

3 participants