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.----------
--- 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:
pgpxdSqXlcMMI.pgp
Description: PGP signature