From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 25562 invoked by alias); 21 Jan 2016 12:46:26 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 37716 Received: (qmail 12887 invoked from network); 21 Jan 2016 12:46:25 -0000 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 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) 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 - Web: 100% accessible validated (X)HTML - Blog: Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)