From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from gatech.edu (gatech.edu [130.207.244.244]) by werple.mira.net.au (8.6.12/8.6.9) with SMTP id MAA02981 for ; Sun, 16 Jul 1995 12:07:34 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA14577 (5.65c/Gatech-10.0-IDA for ); Sat, 15 Jul 1995 22:08:01 -0400 Received: by math (5.x/SMI-SVR4) id AA00881; Sat, 15 Jul 1995 22:04:33 -0400 Resent-Date: Sun, 16 Jul 1995 03:05:31 +0100 (BST) Old-Return-Path: From: Zefram Message-Id: <28944.199507160205@stone.dcs.warwick.ac.uk> Subject: list-expand fix and a bug report To: zsh-workers@math.gatech.edu (Z Shell workers mailing list) Date: Sun, 16 Jul 1995 03:05:31 +0100 (BST) X-Loop: zefram@dcs.warwick.ac.uk X-Stardate: [-31]5985.43 Mime-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Resent-Message-Id: <"mbSCh3.0.hD.mE72m"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/215 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu -----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 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\ 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 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-----