From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3069 invoked by alias); 29 Sep 2016 07:32: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: 21987 Received: (qmail 20414 invoked from network); 29 Sep 2016 07:32:22 -0000 X-Qmail-Scanner-Diagnostics: from sender163-mail.zoho.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(74.201.84.163):SA:0(0.7/5.0):. Processed in 0.161731 secs); 29 Sep 2016 07:32: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.7 required=5.0 tests=SPF_NEUTRAL autolearn=no autolearn_force=no version=3.4.1 X-Envelope-From: hong@topbug.net X-Qmail-Scanner-Mime-Attachments: |signature.asc| X-Qmail-Scanner-Zip-Files: | Received-SPF: neutral (ns1.primenet.com.au: 74.201.84.163 is neither permitted nor denied by SPF record at servers.mcsv.net) Subject: Re: ZLE_LINE_ABORTED: how to restore the last non-blank aborted line? To: Bart Schaefer , zsh-users@zsh.org References: <160929001257.ZM27763@torch.brasslantern.com> From: Hong Xu Message-ID: Date: Thu, 29 Sep 2016 00:32:09 -0700 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Icedove/45.2.0 MIME-Version: 1.0 In-Reply-To: <160929001257.ZM27763@torch.brasslantern.com> Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="3lakUi8J5T0ghfXBVj44hCJBme187JDv2" X-Zoho-Virus-Status: 1 --3lakUi8J5T0ghfXBVj44hCJBme187JDv2 Content-Type: multipart/mixed; boundary="Gcdok2CJTpf4mHO7ro8U0MAeAnCe2TrfD"; protected-headers="v1" From: Hong Xu To: Bart Schaefer , zsh-users@zsh.org Message-ID: Subject: Re: ZLE_LINE_ABORTED: how to restore the last non-blank aborted line? References: <160929001257.ZM27763@torch.brasslantern.com> In-Reply-To: <160929001257.ZM27763@torch.brasslantern.com> --Gcdok2CJTpf4mHO7ro8U0MAeAnCe2TrfD Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable On 09/29/2016 12:12 AM, Bart Schaefer wrote: > On Sep 27, 9:11pm, Hong Xu wrote: > } > } ZLE_LINE_ABORTED would turn empty if ^C is pressed on an empty line > } disregarding what it was. This is annoying since sometimes auto > } completion stuck and more than one ^C is used to cancel that. > }=20 > } Is there any way to preserve it in this case in zsh? >=20 > Can you give a more specific example? Normally any buffer preceding > the line on which the abort occurred is already in the history and can > be recalled with up-line-or-history et al.; ZLE_LINE_ABORTED is only > needed to capture lines that haven't yet been added to history. >=20 Sure. For example, emacs path/to/some/file Now assume that the tab completion stucks at this point and the user accidentally presses two ^C to cancel that. Now, ZLE_LINE_ABORTED is empty but the user would prefer to restore the line "emacs path/to/some/file". Hong --Gcdok2CJTpf4mHO7ro8U0MAeAnCe2TrfD-- --3lakUi8J5T0ghfXBVj44hCJBme187JDv2 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v2 iQIcBAEBCAAGBQJX7MN9AAoJECZsfTOCL4R4rbIQAK4BdddTsEu3dcD908QJMuAM UDafZFhMdcT85tC4Rn44zKLrcmd45BwjWJGWuPYoz5KWZAn27vHc7ZBA4ox9DWcS 9LbAIGG02u/528F/I6tFzS7oECPMud+WkifatI0Ty/48ktP6O/IF/2/iBN4HvR8u 0N+qmJhio9PeM+Aanw8CbikAkBBqRJcAWFvGgrK7WyxrJFrvbbmDrvYRMCnHr+3Z F5YX7nfxkn9UXGsz2XJWFwr0ceXRpqYqvRvq8WOoulgr3xmjqjl0J05WubTiD8B2 T9WoHedxZtLlrzPdyTNLxGFRY5ime+2n+tj4eZIYGwleDVa4MNPfs04e1YZJ+gOZ bcWxufbCqftiHsa6A0rdtAUCXgRSuUj/9nP4Q72UBHD6QcuAJiTBFc2Ah5lmunMe 332Dow41ML92GtLCSi2DrRx3DsyWf7sXFTVDDLJ/ZfkEescWZtC3ASyaBGh94Crg sHN469sFArxQb5nSgKFlFquGp4ksBwXSoG5JURZcfplLUo2xP4ScLrTuQ3HicZ4m +iamsjrmeex3hFSKVnZMXCL9BcKit6n+jRH3zXk+KxrtGqR4J6hkIyK7JBYYikW3 EO8lmPXyM55pXUVcNPkaa3Qz2JQN/XXDT/sZysZ91+IkoquJAeyXXaUW7KO56DBU gtoiEoRYBtUe4N3lbV6Z =B7/9 -----END PGP SIGNATURE----- --3lakUi8J5T0ghfXBVj44hCJBme187JDv2--