Subject: Re: [PATCH] _add-zle-hook-widget: New completion.
From: Oliver Kiddle <[email-masked]>
To: [email-masked]
Date: Tue, 19 Jul 2016 12:30:05 +0200
List-Id: Zsh Workers List <zsh-workers.zsh.org>

Bart wrote:
> } >  compadd "$@" -M 'L:|zle-=' -a hooktypes

> } 'B:zle-=' is a shorter version
>
> Might be worth mentioning that in the yodl page, I was going by the
> example of removing "no" from the front of setopt names.

After reading the documentation, it is apparent that there is a
difference. The B: form allows zle- to appear multiple times because the
zle- needs to be at that start of the match rather than at the start
of what's on the line. I've used this for numbers for initial zeros -
B:0= which is sometimes useful as a way to force a particular completion
alternative without contraining the matches. fc 0<tab> for example.

For the hook types, I wonder if the best choice might be -M 'L:|=zle-'
along with including zle- in the matches. That allows partial completion
to work.

Oliver