zsh-workers
 help / color / mirror / code / Atom feed
From: Zefram <A.Main@dcs.warwick.ac.uk>
To: zsh-workers@math.gatech.edu (Z Shell workers mailing list)
Subject: list-expand fix and a bug report
Date: Sun, 16 Jul 1995 03:05:31 +0100 (BST)	[thread overview]
Message-ID: <28944.199507160205@stone.dcs.warwick.ac.uk> (raw)

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


             reply	other threads:[~1995-07-16  2:07 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-07-16  2:05 Zefram [this message]
1995-07-21 19:29 ` Zoltan Hidvegi
1995-07-21 20:37   ` Mark Borges
1995-07-24  9:46     ` Zoltan Hidvegi

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=28944.199507160205@stone.dcs.warwick.ac.uk \
    --to=a.main@dcs.warwick.ac.uk \
    --cc=zsh-workers@math.gatech.edu \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).