Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

zsh: show completion group names

I'm writing some zsh completions and am stuck on how to have multiple groups of completions.

I added the group name with the -J parameter docs.

compadd -J group1 "$@" completion1 completion2
compadd -J group2 "$@" completion3 completion4

Then I added the zstyle to my ~/.zshrc docs (heading: group-name)

zstyle ':completion:*' group-name ''

The completions come up fine, but the group names are not being displayed. What am I doing wrong?

like image 276
Ilia Choly Avatar asked Jan 14 '23 13:01

Ilia Choly


1 Answers

In my case the group names appeared only after adding:

zstyle ':completion:*' group-name ''
zstyle ':completion:*' format 'Completing %d'
like image 166
aleb Avatar answered Mar 11 '23 05:03

aleb