From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20721 invoked from network); 12 Dec 1998 15:58:16 -0000 Received: from math.gatech.edu (list@130.207.146.50) by ns1.primenet.com.au with SMTP; 12 Dec 1998 15:58:16 -0000 Received: (from list@localhost) by math.gatech.edu (8.9.1/8.9.1) id KAA03548; Sat, 12 Dec 1998 10:57:18 -0500 (EST) Resent-Date: Sat, 12 Dec 1998 10:57:18 -0500 (EST) From: "Bart Schaefer" Message-Id: <981212075559.ZM25583@candle.brasslantern.com> Date: Sat, 12 Dec 1998 07:55:59 -0800 In-Reply-To: <9812121438.AA48082@ibmth.df.unipi.it> Comments: In reply to Peter Stephenson "3.1.5++ completion listing problem" (Dec 12, 3:38pm) References: <9812121438.AA48082@ibmth.df.unipi.it> X-Mailer: Z-Mail (4.0b.820 20aug96) To: Peter Stephenson , zsh-workers@math.gatech.edu (Zsh hackers list) Subject: Re: 3.1.5++ completion listing problem MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"-hQqb1.0.Nt.U9fSs"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/4760 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Dec 12, 3:38pm, Peter Stephenson wrote: } Subject: 3.1.5++ completion listing problem } } % zsh -f } % mkdir foo } % touch foo/bar1 } % ls foo/^D } } } ^D won't list if there is a unique match any more. This appears to have come from Sven in zsh-workers/4510. Relevant hunk of zle_tricky.c diff, uudecoded from Sven't blob for your pleasure: Index: DO NOT APPLY THIS PATCH, it's a fragment *************** *** 3568,3587 **** return l + (cc / columns); } /* List the matches. Note that the list entries are metafied. */ /**/ void listmatches(void) { ! int longest = 1, fct, fw, colsz, t0, t1, ct, up, cl, xup = 0; ! int off = 0, boff = 0, nboff = 0; ! int of = (!aylist && isset(LISTTYPES) && !(haswhat & HAS_MISC)); ! char **arr, **ap, sav; ! int nfpl, nfsl, nlpl, nlsl; ! int listmax = getiparam("LISTMAX"), litnl = 0; ! size_t (*strlenfn) _((char const *)); #ifdef DEBUG /* Sanity check */ if(!validlist) { --- 4150,4183 ---- return l + (cc / columns); } + /* This skips over matches that are not to be listed. */ + + static Cmatch * + skipnolist(Cmatch *p) + { + while (*p && ((*p)->flags & CMF_NOLIST)) + p++; + + return p; + } + /* List the matches. Note that the list entries are metafied. */ /**/ void listmatches(void) { ! Cmgroup g; ! Cmatch *p, m; ! Cexpl *e; ! int nlines = 0, ncols, colsz, ngr = 0, nlist = 0, longest = 1, pnl = 0; ! int of = isset(LISTTYPES), opl = 0; ! int listmax = getiparam("LISTMAX"); + if (smatches < 2) { + showinglist = 0; + return; + } #ifdef DEBUG /* Sanity check */ if(!validlist) { I'd suggest simply deleting the "if (smatches < 2)" block, but perhaps Sven can tell us what side-effect that may have elsewhere? -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com