From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22376 invoked by alias); 26 Oct 2016 22:11:22 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 22032 Received: (qmail 16934 invoked from network); 26 Oct 2016 22:11:22 -0000 X-Qmail-Scanner-Diagnostics: from mail-qt0-f172.google.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(209.85.216.172):SA:0(0.0/5.0):. Processed in 0.317622 secs); 26 Oct 2016 22:11:22 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=0.0 required=5.0 tests=FREEMAIL_FROM,SPF_PASS, T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: mikachu@gmail.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: pass (ns1.primenet.com.au: SPF record at _netblocks.google.com designates 209.85.216.172 as permitted sender) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:from:date:message-id:subject:to :cc; bh=zFb342WIzTN2rpsEEsbP3FL41v/558sKdebH9vvVUek=; b=rPEOF0LWoNZG34q99miWEdWknuOG+nzmaIkCwMoiUD4UVzAriyasi1Cx5m9ZYUORow LU2soNFlpgRcrBowyPAaryJIzmMnPGANa2yuqwFNQFAeig7/Y5lP676HPpBX4fAZLtBW xlq+Z4MpS7ILG0LvlGERu/eUoiDYjrPvwvcqtYXEwcs2mN23rSkp9F+qCiGqUXKd5jzQ 38Azc0GxfjazRid49k2l+g222LWGKY7e/O9Ic768CF7l6gvKPDBZ1h6u4zYgeSmMjcuG qRNnF+WeqvX5EOv1d9N+W0rMIkno3GxLL9L4Puw8Yl9iuGZpuScubG1E/vULYGv140PZ JLcg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:from:date :message-id:subject:to:cc; bh=zFb342WIzTN2rpsEEsbP3FL41v/558sKdebH9vvVUek=; b=hpSbAphJGQEzNMTZlLt4g/xcZsIeDod/tu75iQZTg8dyo7EILSpnduUpfwx7RQW3ZC 8NhsT3cSXkVatMV25EuenB4xDple299RIn5yXR6DWWbIdA0G+H9FyNXOe+EUe0yrKLA1 ueR2g16rXILu3/AZ33bMv5SbO1GLOkbyVVfMUZ6si0zV3HHoE0thaeWEiI47DLWC/RHl dMD0hD21MF5+aTYEOrPaY9uYXWrkU0V/OLSRcNscWpE3ZpBJJ0ZNed8jwZyvH4gZ+bMa DMawWEiH7wEEVLG7IKupi/0DpkD7hiaJHuXrdawZh6zNc5J9CD1gXUPjqnuMUqe+MnIM AelA== X-Gm-Message-State: ABUngvfeEus6qceE3n/hlyy9sXiUsrvTFBFehKRNgMbnQVSZWWl6xVhhY+fDTuFPZFBeOL0ZhimXoFb96jtRLw== X-Received: by 10.237.42.199 with SMTP id t65mr3707750qtd.63.1477519513828; Wed, 26 Oct 2016 15:05:13 -0700 (PDT) MIME-Version: 1.0 In-Reply-To: <161026090133.ZM11120@torch.brasslantern.com> References: <161025091249.ZM7232@torch.brasslantern.com> <161026090133.ZM11120@torch.brasslantern.com> From: Mikael Magnusson Date: Thu, 27 Oct 2016 00:05:13 +0200 Message-ID: Subject: Re: Shift-Insert overwrites ZLE CUTBUFFER To: Bart Schaefer , lolilolicon@gmail.com Cc: Zsh Users Content-Type: text/plain; charset=UTF-8 On Wed, Oct 26, 2016 at 6:01 PM, Bart Schaefer wrote: > On Oct 26, 12:28am, lolilolicon wrote: > } Subject: Re: Shift-Insert overwrites ZLE CUTBUFFER > } > } On Wed, Oct 26, 2016 at 12:12 AM, Bart Schaefer > } wrote: > } > There's currently no easy way to change the cutbuffer behavior without > } > disabling the rest of the bracketed-paste behavior. > } > } That's a shame. > } Is it technically difficult to do? Would there be an issue if zsh just > } popped the killring automatically? > > What I mean is that it's not easy to do from shell code. In the source > code obviously the implementation is deliberately pushing the kill ring, > so it wouldn't be technically difficult to *not* do so, but that would > mean reversing an earlier design decision. Actually if you pass a parameter name to the bracketed-paste widget, it stuffs the pasted content in there and does literally nothing else. So a simple wrapper widget that doesn't mess with the yank buffer could look like this: my-bracketed-paste () { local wantquote=${NUMERIC:-0} local content zle .$WIDGET -N content if (( $wantquote == 1 )); then content=${(q-)content} fi LBUFFER+=$content } Or if you don't care about quoting the input ever, just my-bracketed-paste () { local content zle .$WIDGET -N content LBUFFER+=$content } (see also the bracketed-paste-url-magic function distributed with zsh) -- Mikael Magnusson