zsh-workers
 help / color / mirror / code / Atom feed
* list-expand fix and a bug report
@ 1995-07-16  2:05 Zefram
  1995-07-21 19:29 ` Zoltan Hidvegi
  0 siblings, 1 reply; 4+ messages in thread
From: Zefram @ 1995-07-16  2:05 UTC (permalink / raw)
  To: Z Shell workers mailing list

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


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

end of thread, other threads:[~1995-07-24  9:27 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-07-16  2:05 list-expand fix and a bug report Zefram
1995-07-21 19:29 ` Zoltan Hidvegi
1995-07-21 20:37   ` Mark Borges
1995-07-24  9:46     ` Zoltan Hidvegi

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