From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23095 invoked by alias); 12 Aug 2015 01:08:08 -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: 36114 Received: (qmail 32 invoked from network); 12 Aug 2015 01:08:06 -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,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,RCVD_IN_MSPIKE_H2 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=7Snra4eUIClvuxW6xoOVAdfeacWqrmaGu0qmkzy7xHY=; b=HP2Y8iDNs1KmpDJYAuuOyHXJTbZx0hGmoSFWkzacLf01LvWlMCXgTuGXqooXjQA9Ue WIApmZvKnGVgxSSxHL0V36IXOeg4CAd9gu0kS3Rbkzbx/Ogd2//VnttDdKYIz1+nUE1L /Q/ksJXg77rdF5knxGWR0KvEKy5t5doDbBytV31ew9p2OwDVKzttb4C/+QmZgqQcAMHi 9UYHrMHH8eDkRPl4yvRGeBHgG4MvE/eCECURX1zEkYBTmQnL5yLcy6hGgtwgD/fgTFOq mUlUl1Pcwj//kugYVPci5j8h4yFW6U7AK2DakZRNh87kOWbEZDhj6xzw0y8S+CDML5l9 MSaw== MIME-Version: 1.0 X-Received: by 10.107.31.134 with SMTP id f128mr28807084iof.19.1439341684660; Tue, 11 Aug 2015 18:08:04 -0700 (PDT) In-Reply-To: <20150811220922.GF1859@tarsus.local2> References: <20150811220922.GF1859@tarsus.local2> Date: Wed, 12 Aug 2015 03:08:04 +0200 Message-ID: Subject: Re: [PATCH] bracketed-paste: change quoting style From: Mikael Magnusson To: Daniel Shahaf Cc: zsh workers Content-Type: text/plain; charset=UTF-8 On Wed, Aug 12, 2015 at 12:09 AM, Daniel Shahaf wrote: > Make bracketed-paste use ''-quoting instead of \-quoting (when NUMERIC > is nonzero). > > It's a bikeshed, of course, but I think '' is more readable. > > diff --git a/Src/Zle/zle_misc.c b/Src/Zle/zle_misc.c > index 502e41e..5f2a580 100644 > --- a/Src/Zle/zle_misc.c > +++ b/Src/Zle/zle_misc.c > @@ -779,7 +779,7 @@ bracketedpaste(char **args) > int n; > ZLE_STRING_T wpaste; > wpaste = stringaszleline((zmult == 1) ? pbuf : > - quotestring(pbuf, NULL, QT_BACKSLASH), 0, &n, NULL, NULL); > + quotestring(pbuf, NULL, QT_SINGLE_OPTIONAL), 0, &n, NULL, NULL); > cuttext(wpaste, n, CUT_REPLACE); > if (!(zmod.flags & MOD_VIBUF)) { > kct = -1; If we go here, we may as well allow the numeric to pick which quoting style to use. :) On a related note, someone on irc was confused about why url-quote-magic stopped working in git, and it's of course because bracketed pasting causes its self-insert hook to never run. We may want to provide an alternative function to help with this case. (eg, wrap bracketed-paste and quote if == http* or so.) -- Mikael Magnusson