zsh-workers
 help / color / mirror / code / Atom feed
* Re: Getting completion to tell the user what to do
@ 1999-07-20  9:36 Sven Wischnowsky
  0 siblings, 0 replies; only message in thread
From: Sven Wischnowsky @ 1999-07-20  9:36 UTC (permalink / raw)
  To: zsh-workers


Bart Schaefer wrote (to me):

> One last tidbit here:
> 
> On Jul 20,  8:53am, Bart Schaefer wrote:
> } Subject: Re: Getting completion to tell the user what to do
> }
> } } Time for dirty tricks:
> } } 
> } }   compadd -UX 'Please...' -n ''
> } }   compstate[insert]=''
> } }   compstate[list]=list
> } }   compstate[force_list]=yes
> 
> I still don't understand why compstate[force_list]=yes doesn't do what it
> is documented to do, that is, force a listing even if there is only one
> match.

Oops, forgot that, sorry.

Yes, you are right, this is wrong.

Bye
 Sven

diff -u os/Zle/zle_tricky.c Src/Zle/zle_tricky.c
--- os/Zle/zle_tricky.c	Tue Jul 20 11:16:29 1999
+++ Src/Zle/zle_tricky.c	Tue Jul 20 11:31:36 1999
@@ -4480,7 +4480,10 @@
 		minfo.cur = NULL;
 		minfo.asked = 0;
 		do_single(m->matches[0]);
-		invalidatelist();
+		if (compforcelist && *compforcelist && uselist)
+		    showinglist = -2;
+		else
+		    invalidatelist();
 	    }
 	} else {
 	    invalidatelist();
diff -u od/Zsh/compwid.yo Doc/Zsh/compwid.yo
--- od/Zsh/compwid.yo	Tue Jul 20 11:16:36 1999
+++ Doc/Zsh/compwid.yo	Tue Jul 20 11:31:59 1999
@@ -212,7 +212,7 @@
 a completion widget and may be changed there.
 )
 item(tt(force_list))(
-If the value for the tt(list) key is tt(ambiguous), the list will
+If the value for the tt(list) key is tt(autolist) or tt(ambiguous), the list will
 normally be shown only if there are at least two matches in the
 list. Setting tt(force_list) to an non-empty string forces the list to be
 shown even if there is only one match.

--
Sven Wischnowsky                         wischnow@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~1999-07-20  9:36 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-07-20  9:36 Getting completion to tell the user what to do Sven Wischnowsky

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