Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [PATCH] _add-zle-hook-widget: New completion.



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



Messages sorted by: Reverse Date, Date, Thread, Author