zsh-workers
 help / color / mirror / code / Atom feed
* [PATCH]always show complete list
@ 2002-05-02 18:42 joel w. reed
  2002-05-02 21:48 ` Hans Dieter Pearcey
  0 siblings, 1 reply; 6+ messages in thread
From: joel w. reed @ 2002-05-02 18:42 UTC (permalink / raw)
  To: zsh-workers


[-- Attachment #1.1: Type: text/plain, Size: 655 bytes --]

this patch adds a config option LISTALWAYS that if set, makes 
zsh-4.0.4 always show the complete list if the completion 
resulted in only a partial completion (to help the user decide
what to type next w/o the need for another TAB).

lets say i have a directory with 2 entries:

  opal-3.0.4
  opal-4.0 

my patched zsh will show the following after i type 'cd oTAB'

(%:~/src) cd opal-    
opal-3.0.4/  opal-4.0/

zsh is great. thanks.

jr

-- 
------------------------------------------------------------
Joel W. Reed                                    412-257-3881
--------All the simple programs have been written.----------


[-- Attachment #1.2: LISTALWAYS.patch --]
[-- Type: text/plain, Size: 1396 bytes --]

--- Src/options.c.orig	Mon Jun 25 12:31:19 2001
+++ Src/options.c	Tue Apr 30 15:16:15 2002
@@ -146,6 +146,7 @@ static struct optname optns[] = {
 {NULL, "kshglob",             OPT_EMULATE|OPT_KSH,       KSHGLOB},
 {NULL, "kshoptionprint",      OPT_EMULATE|OPT_KSH,	 KSHOPTIONPRINT},
 {NULL, "kshtypeset",          OPT_EMULATE|OPT_KSH,	 KSHTYPESET},
+{NULL, "listalways",	      OPT_ALL,			 LISTALWAYS},
 {NULL, "listambiguous",	      OPT_ALL,			 LISTAMBIGUOUS},
 {NULL, "listbeep",	      OPT_ALL,			 LISTBEEP},
 {NULL, "listpacked",	      0,			 LISTPACKED},
--- Src/Zle/compresult.c.orig	Mon May 28 07:42:00 2001
+++ Src/Zle/compresult.c	Tue Apr 30 15:17:48 2002
@@ -806,9 +806,9 @@ do_ambiguous(void)
 	 * prefix was inserted, return now, bypassing the list-displaying  *
 	 * code.  On the way, invalidate the list and note that we don't   *
 	 * want to enter an AUTO_MENU imediately.                          */
-	if ((uselist == 3 ||
+	if (!isset(LISTALWAYS) && ((uselist == 3 ||
 	     (!uselist && isset(BASHAUTOLIST) && isset(LISTAMBIGUOUS))) &&
-	    la) {
+	    la)) {
 	    int fc = fromcomp;
 
 	    invalidatelist();
--- Src/zsh.h.orig	Tue Apr 30 15:34:12 2002
+++ Src/zsh.h	Tue Apr 30 15:15:29 2002
@@ -1384,6 +1384,7 @@ enum {
     KSHGLOB,
     KSHOPTIONPRINT,
     KSHTYPESET,
+    LISTALWAYS,
     LISTAMBIGUOUS,
     LISTBEEP,
     LISTPACKED,

[-- Attachment #2: Type: application/pgp-signature, Size: 232 bytes --]

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

end of thread, other threads:[~2002-05-03  4:08 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2002-05-02 18:42 [PATCH]always show complete list joel w. reed
2002-05-02 21:48 ` Hans Dieter Pearcey
2002-05-02 23:20   ` Bart Schaefer
2002-05-03  3:08     ` Hans Dieter Pearcey
2002-05-03  4:07       ` Bart Schaefer
2002-05-03  0:52   ` joel w. reed

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