Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Getting completion to tell the user what to do



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@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author