From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 28523 invoked by alias); 19 Jul 2015 18:11:43 -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: 35835 Received: (qmail 11740 invoked from network); 19 Jul 2015 18:11:41 -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.6 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:from:message-id:date:in-reply-to:comments :references:to:subject:mime-version:content-type; bh=6Bp/YuHU4Kdux0UwkEzOSMlJ6ecZlYxcegR1UalBTFQ=; b=fcoXW0zw4OTvkp6h/0+1RQE9WPRIWDtIns5rj+pEgUww40pl0Od6/YY4dBfeWAEZvN ydXyEfyjhPwTBTc7INF1bPAUfs984o8XDr88RREKNRuCWxckGTSknC+zYGyA4Eb1qUs9 spjJSNu+z8wutm/FF4WtLyBNnTfQ5tc6skkfKWl/RumELUqTKC58EbTYKXxdvKlXQ6Ot maIpfoNMmCuT3SWnCL3LIcPN3x2asi8NFMyjik6fGo1mKX0SqA3Kuh7tS/8FHxxiSQao n1c0Zcx+cV0jYs3PaRTA9wJtxVERkbEapvkpnmlpC7ytWt9OkTOb5tULHXFgM9hemg8v zrWg== X-Gm-Message-State: ALoCoQlNqmaqTtDUDUWhZghZH1BQ1Rm6KdjRxvgmyuDD0oLNgI0iM4FGtEcmJIT7LYbDgt7adJBd X-Received: by 10.182.73.170 with SMTP id m10mr22294341obv.22.1437329498191; Sun, 19 Jul 2015 11:11:38 -0700 (PDT) From: Bart Schaefer Message-Id: <150719111044.ZM12632@torch.brasslantern.com> Date: Sun, 19 Jul 2015 11:10:44 -0700 In-Reply-To: <20150719171242.GD1900@tarsus.local2> Comments: In reply to Daniel Shahaf "Re: PATCH: highlight pasted text" (Jul 19, 5:12pm) References: <7277.1437023995@thecus.kiddle.eu> <150716131504.ZM18155@torch.brasslantern.com> <150718110859.ZM4405@torch.brasslantern.com> <19088.1437274234@thecus.kiddle.eu> <20150719171242.GD1900@tarsus.local2> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: PATCH: highlight pasted text MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jul 19, 5:12pm, Daniel Shahaf wrote: } Subject: Re: PATCH: highlight pasted text } } Yuri D'Elia wrote on Sun, Jul 19, 2015 at 14:13:39 +0200: } > 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? The question is what to do in the default (built-in widget) case. Yes, the built-in widget could do something equivalent to that, but the message is context-dependent; if you're pasting into a here-document, for example, pressing enter won't execute anything. It'd make more sense to (for example) always show the PS2 prompt after a paste that contains a newline, because that can both describe the context and indicate that the shell is waiting for more input.