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

list-expand fix and a bug report



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

The patch below makes list-expand refuse to do anything in
circumstances that currently cause trouble, such as inside braces.  In
fact, before this patch,

% echo {a,b<CTRL-G>

turns off my cursor, which is rather annoying.  (I have list-expand
bound to ^G.)

On an unrelated matter, I have found a problem with completion of filenames containing spaces.  If I type:

% touch 'spoon '
% echo spoon\ <TAB>

then in plain beta10 the space disappears after a couple of tabs, and
then the backslash goes, and it's a bit of a mess.  In an up-to-date
patched beta10, a space gets inserted *after* the cursor, and repeated
tabs insert more spaces without moving the cursor.  This happens in
beta10-hzoli10.1 too.  Can someone tell me which patch could have done
this, as my patch list doesn't show anything changing in this area.
More importantly, can anyone actually fix it?

Probably the same bug:

% mkdir t
% cd t
% touch spoon-
% touch 'spoon '
% echo spoon<TAB>

during menu completion, I get the sequence (_ representing cursor):

% echo spoon\_
% echo spoon-_

If I stop menu completion on the first of these, I find that there is a
space under the cursor.  This happens with plain beta10, patched beta10
and with beta10-hzoli10.1.  Also note that it only happens with space;
tab and other special characters are fine.

 -zefram

      *** Src/zle_tricky.c.old	Sat Jul 15 23:56:49 1995
      --- Src/zle_tricky.c	Sun Jul 16 02:07:47 1995
      ***************
      *** 1250,1260 ****
        	    feep();
        	goto end;
            }
      !     if (lst == COMP_LIST_EXPAND) {
      ! 	/* Only the list of exapansions was requested. */
      ! 	listlist(vl);
      ! 	goto end;
      !     } else if (peekfirst(vl) == (void *) s ||
        	       (!nextnode(firstnode(vl)) && *s == Tilde &&
        		(ss = dupstring(s), filesubstr(&ss, 0)) &&
        		!strcmp(ss, (char *)peekfirst(vl)))) {
      --- 1250,1256 ----
        	    feep();
        	goto end;
            }
      !     if (peekfirst(vl) == (void *) s ||
        	       (!nextnode(firstnode(vl)) && *s == Tilde &&
        		(ss = dupstring(s), filesubstr(&ss, 0)) &&
        		!strcmp(ss, (char *)peekfirst(vl)))) {
      ***************
      *** 1264,1269 ****
      --- 1260,1270 ----
        	    docompletion(s, COMP_COMPLETE, explincmd);
        	else
        	    feep();
      + 	goto end;
      +     }
      +     if (lst == COMP_LIST_EXPAND) {
      + 	/* Only the list of expansions was requested. */
      + 	listlist(vl);
        	goto end;
            }
            /* Remove the current word and put the expansions there. */

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

iQBVAgUBMAhzdWWJ8JfKi+e9AQGaJQH+Pg7cQ1Qez68CP6E8rl/GIsOcuwrmFiYy
KErcUDOujeMQuCetCaBieyobqAd7MbiHSuvErznEL4HmjT6KBLI/wQ==
=4YAu
-----END PGP SIGNATURE-----



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