From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 29362 invoked by alias); 21 Jul 2015 15:28:58 -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: 35841 Received: (qmail 5613 invoked from network); 21 Jul 2015 15:28:54 -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,RCVD_IN_DNSWL_NONE,RCVD_IN_MSPIKE_H2 autolearn=ham autolearn_force=no version=3.4.0 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=yahoo.co.uk; s=s2048; t=1437492199; bh=IQnJLoNizzZiBuk2gGLeuteqStBn+7BJsTvQpkHG/zU=; h=In-reply-to:From:References:To:Subject:Date:From:Subject; b=Ejbl0JNgPRez2zyE1fAhKHy0x+/S0FUaigH8LPn6kO7XaiUL+uG1aV/uOprXSY7GoL/NkzIwiBlVe7V7q44hNgQKof9r/w6tqFT8bnQkMJ2q4rXYsCgVtYIHTZlcgGmKUL/TxKAkuL45nxRhT8Fj/bmMvTIPs6tMnyxE9KhJrybw7RWwBQVAEVr03kLOEUk0CL7gfyAWKcGLqA1W/RPgp1tV0nSxiP6bpApUbaK6rq9bF3e1LZR6BoSWPZzKf3gUq9M1vtO7tj1BhO0irWe5vqIwi0UZZzTA4fXxTA1lZg+5qIjj+6lUlYxbAVhKQXutOLQPdDks7JFFKXkjHn5ZEg== X-Yahoo-Newman-Id: 527093.39965.bm@smtp102.mail.ir2.yahoo.com X-Yahoo-Newman-Property: ymail-3 X-YMail-OSG: I9qhzdkVM1m0a5YPbZSdYtJ3BXLDRCKYb_.VAeahckFs8wn iHUpM4U5t0HatTMjRcv_nexJyt6hOKkRzaKEV8Cb3oFlyC6EXXH1_OwXLkob ERZzdJVUwpymUDH0RNkZUAuuSXXlNn7va7G4_Gc.Vn9BuIlaHRr7PKDZ3Utf e34MwNNZ2YN6vAJrM6_d80jhdDy4AQNhb7DIGTpexUJINxkc1QHY8gee2p14 E2jlflkKsR8MqfDeBOYjt1BxIpUxs7KppAY_0KT06INeYLAochiFi.SpRdBL inD03OPz44JbVcdunqlgP8.8UGxAEn1XsAULdlhXhV2eSxESzKYaskOyKImy _7xSxvWiCmxnYnIrZyC3.nMUD02xaoT_NT8uv3Vvctujzw0trLNwbMdN8ZvD Yiqo42qPkvmsps_AbwD4BGmVTj.er8uF7Zjp2FzTujFseFiqweEOIjCDXvnV 0fnoSMh2DMPNcRK81i4XyqaOiP4lUna_9at6GRL0bbj0mBXjCyXqTGEmKyej .UiBdnrGm4U9N9GfcGSwH2CGYaJtHfA-- X-Yahoo-SMTP: opAkk_CswBAce_kJ3nIPlH80cJI- In-reply-to: <150719111044.ZM12632@torch.brasslantern.com> From: Oliver Kiddle 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> <150719111044.ZM12632@torch.brasslantern.com> To: zsh-workers@zsh.org Subject: Re: PATCH: highlight pasted text MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-ID: <14712.1437492198.1@thecus.kiddle.eu> Date: Tue, 21 Jul 2015 17:23:18 +0200 Message-ID: <14713.1437492198@thecus.kiddle.eu> Bart wrote: > } On Jul 19, 5:12pm, Daniel Shahaf wrote: > } 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" I'd prefer something more subtle but as a more lateral thinking approach this is going in the right direction. > 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. I like that. One disadvantage is that it wouldn't be compatible with the new feature of highlighting pasted text; at least not having the highlighting removed on the next action. What would you use for the parser status that you get with %^ or %_? The pasted text might leave an open parser status or might not. Another disadvantage is that PS2 in general is irritating for the fact that it restarts zle and push-line-or-edit tricks are needed on up-cursor to allow editing the prebuffer. As an aside, I recommend an empty $PS2 and transient_rprompt for RPS2 so the PS2 prompt doesn't get in the way of attempts to copy multi-line commands with the mouse. Oliver