From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 10376 invoked from network); 23 Jun 1998 13:01:46 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 23 Jun 1998 13:01:46 -0000 Received: (from list@localhost) by math.gatech.edu (8.8.5/8.8.5) id IAA09448; Tue, 23 Jun 1998 08:43:42 -0400 (EDT) Resent-Date: Tue, 23 Jun 1998 08:43:42 -0400 (EDT) Date: Tue, 23 Jun 1998 14:44:37 +0200 (MET DST) Message-Id: <199806231244.OAA11033@beta.informatik.hu-berlin.de> From: Sven Wischnowsky To: zsh-workers@math.gatech.edu In-reply-to: "Bart Schaefer"'s message of Fri, 19 Jun 1998 11:14:59 -0700 Subject: PATCH: was Re: REC_EXACT and AUTO_MENU, and compctl -U too (Part II) Resent-Message-ID: <"lzBuj3.0.ZJ2.-BwZr"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4147 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Bart Schaefer wrote: > > One thing that's annoyed me for a very long time is the interaction of > recexact with automenu. Suppose I have both options set. > > zsh% /usr/li > > The possible completions at this point are /usr/lib and /usr/libexec. I > press TAB (which is bound to expand-or-complete). > > zsh% /usr/lib > > This is not a completion; it's the unique prefix of a menu completion, or > it would be in most circumstances. With recexact, though, when I press > TAB again expecting to menucomplete to libexec, I instead get /usr/lib/ > and now I can only complete within that directory. > > What I'd like is to have recexact behavior when I type the entire prefix > and automenu behavior when zsh supplies the prefix. > While trying so solve this I encountered a little bug (with completeinword): % ls fooo fooboo % ls fo gives: % ls foooo One of the 'o's were both in the prefix and the suffix. Bye Sven *** Src/Zle/zle_tricky.c.old Mon Jun 22 08:55:46 1998 --- Src/Zle/zle_tricky.c Tue Jun 23 14:28:37 1998 *************** *** 1549,1554 **** --- 1549,1555 ---- *bp = test; if ((test = sfxlen(*fm, s)) < *ep) *ep = test; + if (*ep + *bp > *sp) *ep = *sp - *bp; } /* If we are doing a glob completion we store the whole string in * -- Sven Wischnowsky wischnow@informatik.hu-berlin.de