From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22172 invoked by alias); 2 Jan 2017 03:01:28 -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: 40257 Received: (qmail 11935 invoked from network); 2 Jan 2017 03:01:28 -0000 X-Qmail-Scanner-Diagnostics: from out1-smtp.messagingengine.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(66.111.4.25):SA:0(-0.7/5.0):. Processed in 4.299225 secs); 02 Jan 2017 03:01:28 -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=RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H3,RCVD_IN_MSPIKE_WL,T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: d.s@daniel.shahaf.name X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at daniel.shahaf.name does not designate permitted sender hosts) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= daniel.shahaf.name; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=mesmtp; bh=f+nW3HtA2+leHY2 WrcKWNIVP+1w=; b=ZkB91e5Ifa1JyL83AmL/u9qHug0ZfBGNPEsUxyr4g4gbxr/ 1pDqlxD19AsXP54ZfwJ6S5QpYrZbz1qDNKzXQ6Tp0ziooEetSi3JjyVGSyMc5K0H yT5EGakR9WHumRXhjxh3USMKSTQbU/Y2xjShJhuUldHzQgTyZ1hKPUs9LBCM= DKIM-Signature: v=1; a=rsa-sha1; c=relaxed/relaxed; d= messagingengine.com; h=content-type:date:from:in-reply-to :message-id:mime-version:references:subject:to:x-me-sender :x-me-sender:x-sasl-enc:x-sasl-enc; s=smtpout; bh=f+nW3HtA2+leHY 2WrcKWNIVP+1w=; b=NIGThpxdlZY8kDRb4gTNpNO2fE+c/cB/QnEdXaG32kOtB0 SMQVJUGMuWGXQvqA0eP04vRDK91ibslV7tahNifkcZabe4FPp+iEPzIBuRvbf41r 7thWNsaubvq5ACArdDwAQCalmrpc3G3UtDvyGVzABu6HvHiHSPEEmCeHnn21E= X-ME-Sender: X-Sasl-enc: MVT9nySXmQqzSCnJapDtFK+DB/L4uMqdZf6zmSW9l+se 1483325471 Date: Mon, 2 Jan 2017 02:48:00 +0000 From: Daniel Shahaf To: zsh-workers@zsh.org Subject: Re: Error in zshaddhistory() should not prevent command from running Message-ID: <20170102024800.GA3243@fujitsu.shahaf.local2> References: <20170101031034.GA15639@fujitsu.shahaf.local2> <170101112030.ZM28010@torch.brasslantern.com> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Disposition: inline In-Reply-To: <170101112030.ZM28010@torch.brasslantern.com> User-Agent: Mutt/1.5.23 (2014-03-12) Bart Schaefer wrote on Sun, Jan 01, 2017 at 11:20:30 -0800: > On Jan 1, 3:10am, Daniel Shahaf wrote: > } Subject: Re: Error in zshaddhistory() should not prevent command from runn > } > } > Possibly more controversial, why run this hook at all when nothing is > } > being added? > } > } 2) It's easier to call the user-provided hook function on one more case > } that it can easily ignore, than not to do so and to leave the user with > } no easy alternative. > > As far as I can tell the only case where *chline == '\0' is when the EOF > character has been typed -- there's always at least a newline in there > in all other circumstances. I'd assumed we were talking about empty lines (i.e., when BUFFER=''). My bad. I don't have an opinion on whether zshaddhistory() should be called during the EOF processing sequence. > There are lots of other places to add to > the history on shell exit. But this is why I asked -- other opinions? >