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

BUG: accept-and-menu-complete prepends glob pattern to next word



Hi!

I use `globcomplete' and `menucomplete'; <TAB> is bound as usual to
`expand-or-complete'; ^J is bound to `accept-and-menu-complete'. It gives
following effect:

% ls *.c<TAB>
% ls ansi2knr.c^J
% ls ansi2knr.c *.cbuiltin.c
                ^^^

It happens only if completing at the word end; if `completeinword' is set
and I complete in the middle, it works O.K.; completeion at the end still
gives error.

The proposed patch is just crude and empirical hack; probably, it should
really be fixed somewhere else - I failed to find where :-(

greetings

-------------------------------------------------------------------------
Andrej Borsenkow 		Fax:   +7 (095) 252 01 05
SNI ITS Moscow			Tel:   +7 (095) 252 13 88

NERV:  borsenkow.msk		E-Mail: borsenkow.msk@xxxxxx
-------------------------------------------------------------------------
=============================================================
--- zsh-3.0-pre4/Src/zle_tricky.c	Mon Jul 29 18:00:17 1996
+++ zsh.current/Src/zle_tricky.c	Tue Jul 30 12:09:15 1996
@@ -353,7 +353,7 @@
     inststrlen(" ", 1, 1);
     if (qparampre)
 	inststrlen(qparampre, 1, qparprelen);
-    if (lpre)
+    if (lpre && !ispattern)
 	inststrlen(lpre, 1, -1);
     if (lsuf)
 	inststrlen(lsuf, 0, -1);




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