From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22473 invoked from network); 15 Oct 2001 18:40:16 -0000 Received: from unknown (HELO sunsite.dk) (130.225.247.90) by ns1.primenet.com.au with SMTP; 15 Oct 2001 18:40:16 -0000 Received: (qmail 16816 invoked by alias); 15 Oct 2001 18:40:09 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 16059 Received: (qmail 16790 invoked from network); 15 Oct 2001 18:40:08 -0000 Date: Mon, 15 Oct 2001 11:39:15 -0700 (PDT) From: Wayne Davison X-Sender: wayne@life.blorf.net To: Geoff Wing Cc: zsh-workers@sunsite.dk Subject: Re: Bug with hist_ignore_space In-Reply-To: <9q66g3$5vh$1@coral.primenet.com.au> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Fri, 12 Oct 2001, Geoff Wing wrote: > what's up with hist_ignore_space at the moment? Commands > with spaces at the start are staying in history past the > one more command limit and are also being written to HISTFILE Only interactive comments were doing this. Turns out that a comment has its Eprog set to NULL, and should_ignore_line() didn't realize that this could still represent something it needed to check. Here's the patch. ..wayne.. ---8<------8<------8<------8<---cut here--->8------>8------>8------>8--- Index: Src/hist.c --- Src/hist.c 2001/09/24 15:15:08 1.34 +++ Src/hist.c 2001/10/15 18:34:04 @@ -971,13 +971,13 @@ static int should_ignore_line(Eprog prog) { - if (!prog) - return 0; - if (isset(HISTIGNORESPACE)) { if (*chline == ' ' || aliasspaceflag) return 1; } + + if (!prog) + return 0; if (isset(HISTNOFUNCTIONS)) { Wordcode pc = prog->prog; ---8<------8<------8<------8<---cut here--->8------>8------>8------>8---