From: Zoltan Hidvegi <hzoli@cs.elte.hu>
To: gjb@moa.cs.duke.edu (Greg J. Badros)
Cc: zsh-workers@math.gatech.edu
Subject: Re: Semantics of compctl -X
Date: Fri, 23 Aug 1996 19:57:27 +0200 (MET DST) [thread overview]
Message-ID: <199608231757.TAA23333@bolyai.cs.elte.hu> (raw)
In-Reply-To: <Pine.SOL.3.93.960822185659.29379C-100000@moa.cs.duke.edu> from "Greg J. Badros" at "Aug 22, 96 07:35:19 pm"
> It seems that the behaviour of -X "Explanation" compctl flag has changed
> since 2.5.03. It used to work like this:
>
> compctl -X "Testing" howdy
> howdy <tab>
>
> - would give : "Testing"
>
> Now, in Zsh3, however, it appears to *not* echo anything unless it's got
> something to complete.
It broke long ago when Zefram reorganized zle_tricky a bit. It is
surprising that nobody noticed this since than. The patch below should fix
it. I'm not 100% confident that this is the right way to fix it so any
better solutions are welcome.
Zoltan
*** Src/zle_tricky.c 1996/08/11 19:15:35 2.72
--- Src/zle_tricky.c 1996/08/23 17:40:00
***************
*** 2136,2145 ****
strcpy((char *)line + wb, (char *)line + we);
we = cs = wb;
}
! if (nmatches>1)
/* There are more than one match. */
do_ambiguous();
! else {
/* Only one match. */
do_single(amatches[0]);
invalidatelist();
--- 2136,2145 ----
strcpy((char *)line + wb, (char *)line + we);
we = cs = wb;
}
! if (nmatches > 1)
/* There are more than one match. */
do_ambiguous();
! else if (nmatches == 1) {
/* Only one match. */
do_single(amatches[0]);
invalidatelist();
***************
*** 2147,2155 ****
}
/* Print the explanation string if needed. */
! if (!showinglist && expl && nmatches!=1) {
int up;
trashzle();
clearflag = (isset(USEZLE) && termok &&
--- 2147,2156 ----
}
/* Print the explanation string if needed. */
! if (!showinglist && expl && !nmatches) {
int up;
+ feep();
trashzle();
clearflag = (isset(USEZLE) && termok &&
***************
*** 2953,2959 ****
ccsuffix = cc->suffix;
validlist = 1;
! if(nmatches && !errflag)
return 0;
if ((isf || cc->xor) && !parampre) {
--- 2954,2960 ----
ccsuffix = cc->suffix;
validlist = 1;
! if ((nmatches || expl) && !errflag)
return 0;
if ((isf || cc->xor) && !parampre) {
prev parent reply other threads:[~1996-08-23 18:01 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
1996-08-21 16:39 bug in 3.0.0? Matt Liggett
1996-08-21 19:14 ` Bart Schaefer
1996-08-22 21:10 ` Zoltan Hidvegi
1996-08-22 23:35 ` Semantics of compctl -X Greg J. Badros
1996-08-23 17:57 ` Zoltan Hidvegi [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=199608231757.TAA23333@bolyai.cs.elte.hu \
--to=hzoli@cs.elte.hu \
--cc=gjb@moa.cs.duke.edu \
--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).