From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23881 invoked from network); 15 Sep 2001 06:26:58 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 Sep 2001 06:26:58 -0000 Received: (qmail 23472 invoked by alias); 15 Sep 2001 06:26:52 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 15809 Received: (qmail 23460 invoked from network); 15 Sep 2001 06:26:51 -0000 Date: Fri, 14 Sep 2001 23:26:24 -0700 (PDT) From: Wayne Davison X-X-Sender: To: Bart Schaefer Cc: Zsh Workers Subject: Re: r problem In-Reply-To: <1010915044927.ZM986@candle.brasslantern.com> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII On Sat, 15 Sep 2001, Bart Schaefer wrote: > It's just a hash lookup: Excellent. That saves me some poking around that I hadn't gotten around to doing. Here's a patch that seems to fix things up quite well. ..wayne.. ---8<------8<------8<------8<---cut here--->8------>8------>8------>8--- Index: Src/hist.c --- Src/hist.c 2001/09/13 18:19:11 1.32 +++ Src/hist.c 2001/09/15 06:22:08 @@ -989,14 +989,20 @@ if (isset(HISTNOSTORE)) { char *b = getjobtext(prog, NULL); - if (*b == 'b' && strncmp(b, "builtin ", 8) == 0) + int saw_builtin; + if (*b == 'b' && strncmp(b,"builtin ",8) == 0) { b += 8; - if (*b == 'h' && strncmp(b, "history", 7) == 0 - && (!b[7] || b[7] == ' ')) + saw_builtin = 1; + } else + saw_builtin = 0; + if (*b == 'h' && strncmp(b,"history",7) == 0 && (!b[7] || b[7] == ' ') + && (saw_builtin || !shfunctab->getnode(shfunctab,"history"))) return 1; - if (*b == 'r' && (!b[1] || b[1] == ' ')) + if (*b == 'r' && (!b[1] || b[1] == ' ') + && (saw_builtin || !shfunctab->getnode(shfunctab,"r"))) return 1; - if (*b == 'f' && b[1] == 'c' && b[2] == ' ' && b[3] == '-') { + if (*b == 'f' && b[1] == 'c' && b[2] == ' ' && b[3] == '-' + && (saw_builtin || !shfunctab->getnode(shfunctab,"fc"))) { b += 3; do { if (*++b == 'l') ---8<------8<------8<------8<---cut here--->8------>8------>8------>8---