Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: Implement zle -P
- X-seq: zsh-workers 36360
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: PATCH: Implement zle -P
- Date: Tue, 1 Sep 2015 08:50:54 +0200
- Cc: zsh workers <zsh-workers@xxxxxxx>
- 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 :cc:content-type; bh=ZoEb7nV5UqixdCwyR9CQLOnQtgx9P1fi6JKSjihZudQ=; b=B1mxt5SDW4yL19aH1pqgxRM/PkRvmunh1LobPUFXJQS5NzVbtvhqjDuwHMnS0nRxqX ZlTEq3R5fMGzZTp1YfHMB9QECiIbAT1cNNdlQwSdc6/533qMFRC6pEyA9qgoE+TUhLzf jp3fsPAK9xoBCg3VjFGSbmpfXXO6GaFxa9jjbiPY2fh/aTh4Fdng8RaTbJ33iRGYHSoj I4vJCQlU/YCGNQWDeGA5XOAXN1tDDCYua4/zHbWTZxPC1WdPUpYe9R7n9tZ5+RukMP+m HHt8qyb2Fjl22nqZPYd5lqHMem4RaXRH0jcnGWpTXwJG0FB3nkfF2sk77HmjU5INZh40 d5sQ==
- In-reply-to: <150831232311.ZM921@torch.brasslantern.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> <20150831181101.32f43e65@ntlworld.com> <150831232311.ZM921@torch.brasslantern.com>
On Tue, Sep 1, 2015 at 8:23 AM, Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Aug 31, 6:11pm, Peter Stephenson wrote:
> } Subject: Re: PATCH: Implement zle -P
> }
> } On Mon, 31 Aug 2015 09:54:02 +0200
> } 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 Ways0x2122.
> }
> } It's not entirely clear what this does without documentation, but as the
> } flags are a bit obcsure anyway, it might not be all that clear how to
> } document it, either.
>
> I presume this is exactly like "zle -C name widget function" except that
> "widget" doesn't have to be a completion widget and "function" defaults
> to being the same as "name".
>
> Presumably the idea is for wrapper widgets, e.g., something like this:
>
> zle -P bracketed-paste-magic bracketed-paste
>
> which would then make b-p-magic behave exactly like b-p, and thereby,
> e.g., eliminate the need for this stuff at the end of the former:
>
> # Arrange to display highlighting if necessary
> if [[ -n ${(M)zle_highlight:#paste:*} ]]; then
> zle -R
> zle .read-command && zle -U - $KEYS
> fi
>
> If that's NOT what it accomplishes, then I'm uncertain why it's needed
> at all.
Well, it was your idea in the first place. And yeah, I made a mess of
these threads, there's an example for the above in the latest mail.
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author