From: "Bart Schaefer" <schaefer@brasslantern.com>
To: Peter Stephenson <pws@ibmth.df.unipi.it>,
zsh-workers@math.gatech.edu (Zsh hackers list)
Subject: Re: 3.1.5++ completion listing problem
Date: Sat, 12 Dec 1998 07:55:59 -0800 [thread overview]
Message-ID: <981212075559.ZM25583@candle.brasslantern.com> (raw)
In-Reply-To: <9812121438.AA48082@ibmth.df.unipi.it>
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
} <nothing printed>
}
} ^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
prev parent reply other threads:[~1998-12-12 15:58 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
1998-12-12 14:38 Peter Stephenson
1998-12-12 15:55 ` Bart Schaefer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=981212075559.ZM25583@candle.brasslantern.com \
--to=schaefer@brasslantern.com \
--cc=pws@ibmth.df.unipi.it \
--cc=zsh-workers@math.gatech.edu \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).