Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Implement zle -P
- X-seq: zsh-workers 36344
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: Re: PATCH: Implement zle -P
- Date: Mon, 31 Aug 2015 09:56:27 +0200
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type:content-transfer-encoding; bh=zx0yy141L3loJ9lYfwO0RLSY5Jy6UNnGtBPqTDZLgKw=; b=YdkDWiuG8H1x8Aru7em0PO9C9TttkLqR3ft5Fx2EgipCkxoFhEMXYywyVnXlkRXT19 TppyJuPmmG+vUifVydkMGb9SR2hEcGOLAV0xC7QK12GMPLoyabX2UNIrSoibAobD4pyi hj+n6KNHsot/f9R+jO214MQixgi0N10Pv7Wb1hwQxcfE8CueI6UhEa56YL5fxvVTrfnD cD96jAg1rbj3t5KP9rLcEXDg9YJp0Rsw4q+7CEEZXHoLnwQZ6nu26dp7Kc0xguI+t2xw uC/9D9eHUn7Euz2OQBAhAYgV7E787lQrE7MuMcYLQx9b1Gqv/5kMgxr/k97axttnzvz9 YGgA==
- In-reply-to: <1441007642-12365-1-git-send-email-mikachu@gmail.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <101231002820.ZM7583@torch.brasslantern.com> <1441007642-12365-1-git-send-email-mikachu@gmail.com>
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