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

Re: Completion quirks



-----BEGIN PGP SIGNED MESSAGE-----

I wrote:
>With hzoli10 I got this behaviour, and also with my own patched beta10
>(though starting with the correct match).  This problem is almost
>certainly a result of my completion list patches (which I can't test
>with every option, though I did give it a bit of a work out).  Plain
>beta10 for me misbehaved on the second completion, much in the way you
>describe, so I think it is safe to say that REC_EXACT is, for the
>moment, broken.  I'll see what I can do...

The patch below fixes both of the observed problems with REC_EXACT (one
of which was present in beta10 and probably earlier betas too).  The
problem of the completion prefix being inserted a second time was due
to a missing invalidatelist(), just like the previous case of this
problem (that Zoltan pointed out).  A quick grep for do_single
indicates that all calls to do_single() that should be followed by an
invalidatelist() now are.  The older problem is due to listambig being
set, and remaining set, when REC_EXACT is invoked, letting AUTO_MENU
start menu completion on the next tab when it shouldn't.  This is fixed
by moving the line that sets listambig.

 -zefram

      *** Src/zle_tricky.c.old	Sat Jul 15 03:40:02 1995
      --- Src/zle_tricky.c	Sat Jul 15 03:47:19 1995
      ***************
      *** 3187,3193 ****
        {
            int p = (usemenu || ispattern), atend = (cs == we);
        
      -     lastambig = 1;
            menucmp = 0;
        
            /* If we have to insert the first match, call do_single(). */
      --- 3187,3192 ----
      ***************
      *** 3194,3200 ****
      --- 3193,3201 ----
            if (shortest && shortl == 0 && isset(RECEXACT) &&
        	(usemenu == 0 || unset(AUTOMENU))) {
        	do_single(shortest);
      + 	invalidatelist();
            } else {
      + 	lastambig = 1;
        	if (p)
        	    /* Otherwise we have to do menu-completion... */
        	    do_ambig_menu();

-----BEGIN PGP SIGNATURE-----
Version: 2.6.i

iQBVAgUBMAcusmWJ8JfKi+e9AQGUpgH/d7kksV5LZ9LB3hCleFHVSPeDxzYQ8v08
Jx+xAYQs4r5QlhQeqxWL26bJyaeofm6+8PeS+M0/JkuUw8HM5ra/Ww==
=njj8
-----END PGP SIGNATURE-----



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