zsh-workers
 help / color / mirror / code / Atom feed
* Explanation for no completion candidates.
@ 1998-10-27  1:50 Tanaka Akira
  1998-10-27  5:04 ` Bart Schaefer
  0 siblings, 1 reply; 3+ messages in thread
From: Tanaka Akira @ 1998-10-27  1:50 UTC (permalink / raw)
  To: zsh-workers

Hi. I found that zsh 3.1.4 does not output a explanation given with
"-X" for compctl when there is no completion candidates.

% compctl -X explanation tst
% tst<Tab>

zsh-3.0.5 prints "explanation"
zsh-3.1.4 prints nothing

I think following patch fix this.
------------------------------------------------------------
--- Src/Zle/zle_tricky.c-	Tue Oct 13 00:37:17 1998
+++ Src/Zle/zle_tricky.c	Tue Oct 13 00:37:30 1998
@@ -2202,6 +2202,7 @@
 	    }
 	}
 
+      compend:
 	/* Print the explanation string if needed. */
 	if (!showinglist && expl && nmatches != 1) {
 	    int up;
@@ -2222,7 +2223,6 @@
 		putc('\n', shout);
 	    fflush(shout);
 	}
-      compend:
 	ll = strlen((char *)line);
 	if (cs > ll)
 	    cs = ll;
------------------------------------------------------------

However, zsh-3.0.5 and zsh-3.1.4 has different behavior on "-X". So
this patch does not provide perfect compatibility between 3.05 and
3.1.4.

% compctl -X ex1 + -X ex2 tst
% tst<Tab>

zsh-3.0.5 prints "ex1"
zsh-3.1.4 with this patch prints "ex2"
-- 
[Tanaka Akira]


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1998-10-28  2:46 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-10-27  1:50 Explanation for no completion candidates Tanaka Akira
1998-10-27  5:04 ` Bart Schaefer
1998-10-28  2:38   ` Tanaka Akira

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).