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=0.6 required=5.0 tests=BAYES_00,TO_NO_BRKTS_PCNT
	autolearn=no autolearn_force=no version=3.4.0
Date: Thu, 21 Jan 2016 13:46:20 +0100
From: Vincent Lefevre <vincent@vinc17.net>
To: zsh-workers@zsh.org
Subject: Re: zle-line-finish behavior and documentation
Message-ID: <20160121124620.GB21104@cventin.lip.ens-lyon.fr>
Mail-Followup-To: zsh-workers@zsh.org
References: <20160114145631.GB12351@cventin.lip.ens-lyon.fr>
 <160114182256.ZM18156@torch.brasslantern.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=iso-8859-1
Content-Disposition: inline
Content-Transfer-Encoding: 8bit
In-Reply-To: <160114182256.ZM18156@torch.brasslantern.com>
X-Mailer-Info: https://www.vinc17.net/mutt/
User-Agent: Mutt/1.5.24-6551-vl-r83103 (2016-01-05)
X-Seq: zsh-workers 37716

On 2016-01-14 18:22:56 -0800, Bart Schaefer wrote:
> On Jan 14,  3:56pm, Vincent Lefevre wrote:
> }
> } BTW, is there something similar executed when the command line is
> } aborted?
> 
> There's not.  All you can do is test [[ -n $ZLE_LINE_ABORTED ]] when
> you get back to zle-line-init.

OK, but if the goal is to reset the previous prompt, that's too late.
There would also be other two problems:
1) $ZLE_LINE_ABORTED gets empty when one does Ctrl-C on an empty line.
2) $ZLE_LINE_ABORTED is not reset when a command line is not aborted.

FYI, I currently have:

  zle reset-prompt

in zle-line-finish() to update the time. However that's mainly useful
to have the correct time when I started some command. After doing
Ctrl-C on the command line, this is less useful.

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <https://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <https://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)

