From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9711 invoked by alias); 1 Sep 2015 06:51:02 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 36360 Received: (qmail 22087 invoked from network); 1 Sep 2015 06:51:00 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-2.0 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM autolearn=ham autolearn_force=no version=3.4.0 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== MIME-Version: 1.0 X-Received: by 10.55.221.79 with SMTP id n76mr15362182qki.62.1441090254102; Mon, 31 Aug 2015 23:50:54 -0700 (PDT) In-Reply-To: <150831232311.ZM921@torch.brasslantern.com> References: <101231002820.ZM7583@torch.brasslantern.com> <1441007642-12365-1-git-send-email-mikachu@gmail.com> <20150831181101.32f43e65@ntlworld.com> <150831232311.ZM921@torch.brasslantern.com> Date: Tue, 1 Sep 2015 08:50:54 +0200 Message-ID: Subject: Re: PATCH: Implement zle -P From: Mikael Magnusson To: Bart Schaefer Cc: zsh workers Content-Type: text/plain; charset=UTF-8 On Tue, Sep 1, 2015 at 8:23 AM, Bart Schaefer 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 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