Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Aborted command saved in history
- X-seq: zsh-workers 37821
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- Subject: Re: Aborted command saved in history
- Date: Thu, 28 Jan 2016 07:56:55 +0100
- Cc: zsh workers <zsh-workers@xxxxxxx>
- 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=5dDBQR19GLvM6NRdkuBapi/o4quRQm/sP8+GgEbguQE=; b=WbxIaUXdRHqyCLNuLuQaAzvW9I0d/gMCrJmOa2A/KmQJ+JsW5n5H+Ny1//xZhtFn6Q pxIkrKCJc2vM1MLB+DvykNZOJhOzNvr4zqnl2ALIFVERozAdR71fTf5XcnCeFpGWhqAZ YNOEcgHwU5ncTAXc3qxKnlWQaHAO4fh40erW28OAnjqp/GuHNpdSIPjJckrxm2+3bqT4 wEw5nNnYysAcoOGm/6HCRxqgGdIrpH6/Bp7RkTvK/9lS+8MXZNzCyYZkfoBbXa+iUtQI 0m3aAzom4hVisfLdiD7KKHGMxJ+Q2oklzEL5LGZngpiDm434LAxWnRdZWBcNJORSqFAd 4m+w==
- In-reply-to: <160127214510.ZM2878@torch.brasslantern.com>
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAHYJk3TY-JsahHgYWJSe_knx0Xo6D9ecXiTJQ=w+aUTDGHOT8A@mail.gmail.com> <160127214510.ZM2878@torch.brasslantern.com>
On Thu, Jan 28, 2016 at 6:45 AM, Bart Schaefer
<schaefer@xxxxxxxxxxxxxxxx> wrote:
> On Jan 28, 2:06am, Mikael Magnusson wrote:
> }
> } If i type
> } {<enter>
> } and press ctrl-c, the " {" is saved in my history file without
> } consulting zshaddhistory()
>
> zshaddhistory is consulted, it just immediately returns without doing
> anything because the error condition from the keyboard interrupt is
> still persisting.
Ah, I only checked with an echo. Is it expected that the line is saved
at all though? If you do a get-line and then ctrl-c twice, it is not
saved, so a possible argument that "you accepted the first part of the
line when you pressed enter" seems a bit weak to me.
Usually when I get a continuation prompt it's because I mistyped
something, so I press ctrl-c to get out of the continuation and then
retrieve it with uparrow and try again. Saving all these mistakes in
the history doesn't seem useful, and I don't see any reasonable way
that zshaddhistory would be able to tell that it was a continuation
line?
--
Mikael Magnusson
Messages sorted by:
Reverse Date,
Date,
Thread,
Author