From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 24797 invoked by alias); 19 Jul 2015 17:12:50 -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: 35832 Received: (qmail 487 invoked from network); 19 Jul 2015 17:12:47 -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.7 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=mesmtp; bh=9f0K9NMf4guGQ3haHz5T5r6p7I4=; b=20hLDi 0ESRgliTW/yGlMzSsyVgbfSYyTN7zVN/tjrefXCfDQICru0gJfkubXSlExmgpa56 Qcxe4L3Ghg97Wq52hmGxL4VOOnw9di+eI1ZjH762JKgp0WqNaiVCW/axLH5SKfAA 28XtZdnTao15srh55NcCOdiGVpbR7muZKgOsM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=cc:content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-sasl-enc :x-sasl-enc; s=smtpout; bh=9f0K9NMf4guGQ3haHz5T5r6p7I4=; b=SUVxN SP14pKEMVF4kRnRYOJcivYT/ApzAxTBHHpvHLA6lgxcBy733pbDNh3dMaa3u4OSj sG81pPOXc/mSwTCpzfDXgfavDk4c5rIWaUf5NyqElzNPdr+lv7p3jWthFkMmBtpr rVOcON3yRE3SgvtwN1zp0XE2zj95l/LSytCCnU= X-Sasl-enc: UGgqyMrBNToyTGwyxhYPdk+lkMnjv5LMnHmRQvIzwKve 1437325965 Date: Sun, 19 Jul 2015 17:12:42 +0000 From: Daniel Shahaf To: Yuri D'Elia Cc: zsh-workers@zsh.org Subject: Re: PATCH: highlight pasted text Message-ID: <20150719171242.GD1900@tarsus.local2> References: <7277.1437023995@thecus.kiddle.eu> <150716131504.ZM18155@torch.brasslantern.com> <150718110859.ZM4405@torch.brasslantern.com> <19088.1437274234@thecus.kiddle.eu> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.5.21 (2010-09-15) Yuri D'Elia wrote on Sun, Jul 19, 2015 at 14:13:39 +0200: > On 19/07/15 04:50, Oliver Kiddle wrote: > > How about the following patch? This adds another special token to > > zle_highlight. So you can do, e.g: zle_highlight+=( paste:bg=87 ) > > This applies also for vi put and emacs yank commands. > > This is sweet. I can safely say this gives a great indication of the > state of the shell, and fixes the behavior of the literal paste in any > condition. > > But chopping off that newline if it's the last character... hmm, I still > think that's a good idea. I'd rather text be pasted verbatim (for a number of reasons, I can elaborate if needed). How about doing zle -M "Press to execute" if the pasted text ends with a newline?