Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm
Precedence: bulk
X-No-Archive: yes
List-Id: Zsh Workers List <zsh-workers.zsh.org>
List-Post: <mailto:zsh-workers@zsh.org>
List-Help: <mailto:zsh-workers-help@zsh.org>
X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on f.primenet.com.au
X-Spam-Level: 
X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,FREEMAIL_FROM,
	T_DKIM_INVALID 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=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==
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:date
         :message-id:subject:from:to:cc:content-type;
        bh=5dDBQR19GLvM6NRdkuBapi/o4quRQm/sP8+GgEbguQE=;
        b=GZfayZb9HKSMB/NaNP+YnQrNLYu5hSciGGLOkHxUHweW+4INssw3F8hVuuUeU+4hKn
         l9dt/7shNzU6bcyKbWPUFVdwx3+Sq8ovnKYHfGks3zczFgZau7pxrqsL8ojWPh30O82l
         Stf3r4PrYW4aEhflNEqlo/4VpUgfjNGib5fJHXvxOHIkrPnaVHG2GnwaftwZD2Mx7fG9
         Vojifbl7WHArja2eb1MZMoU+fTCQYzZFedRtbyRloU0fa+WnWLKarm0Wnxrax8j/z3/i
         0ZCKTOjks4VceW9QkbiABdidqpT70R4CaxtFQONhh7Y0KYQecHTPPxhxekyTaX5SANCo
         Hhcg==
X-Gm-Message-State: AG10YOSJh1a0R0D4z3JPDsHfr1eG6B7s3wzbnTE5Neh8AXuSCyA5eicQg/Ty0T+g7gXtuwPFEDjgB8vpSJ0noA==
MIME-Version: 1.0
X-Received: by 10.55.74.197 with SMTP id x188mr1597472qka.104.1453964215153;
 Wed, 27 Jan 2016 22:56:55 -0800 (PST)
In-Reply-To: <160127214510.ZM2878@torch.brasslantern.com>
References: <CAHYJk3TY-JsahHgYWJSe_knx0Xo6D9ecXiTJQ=w+aUTDGHOT8A@mail.gmail.com>
	<160127214510.ZM2878@torch.brasslantern.com>
Date: Thu, 28 Jan 2016 07:56:55 +0100
Message-ID: <CAHYJk3Q5BP01QvXi1qE1yME7irNOoqXa8BhxXZb+HpDXRUyggA@mail.gmail.com>
Subject: Re: Aborted command saved in history
From: Mikael Magnusson <mikachu@gmail.com>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: zsh workers <zsh-workers@zsh.org>
Content-Type: text/plain; charset=UTF-8
X-Seq: zsh-workers 37821

On Thu, Jan 28, 2016 at 6:45 AM, Bart Schaefer
<schaefer@brasslantern.com> 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

