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

Re: PATCH: Implement zle -P



On Mon, Aug 31, 2015 at 9:54 AM, Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> This lets you say
> % zle -P mywidget prototypewidget myfunction
> and it will work like zle -N mywidget myfunction except it will behave
> like prototypewidget in Various Ways™.
>
> ---
>
> I haven't tested this much (for completion functions, not at all) yet,
> but it works for the case in the current thread, see example at the
> bottom. Does it look overall sane? I'm not very sure on which/how/where
> all these flags are checked and set. The final argument should probably
> be optional and default to the first, like for zle -N, but zle -C doesn't
> seem to do that, and that's the code I mostly copied.
>
> I don't see any reason to change zle -N to call into zle -P internally though.

Here's the original thread, by the way.
http://www.zsh.org/mla/workers/2010/msg01000.html

-- 
Mikael Magnusson



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