zsh-workers
 help / color / mirror / code / Atom feed
From: hzoli@cs.elte.hu (Zoltan Hidvegi)
To: mdb@cdc.noaa.gov (Mark Borges)
Subject: Re: list-expand fix and a bug report
Date: Mon, 24 Jul 1995 10:46:26 +0100 (MET DST)	[thread overview]
Message-ID: <9507240914.AA03247@turan.elte.hu> (raw)
In-Reply-To: <9507212037.AA10841@suomi.cdc.noaa.gov> from "Mark Borges" at Jul 21, 95 02:37:21 pm

Mark Borges wrote:
> Do any of these patches for 10.1 (or 10+ for that matter) fix this:

No, bat there is a patch below for that.

> >> Mark Borges(mb) wrote on Mon, 17 Jul 95 14:50:50 MDT:
> mb> Are you seeing this?
> 
> mb> Somewhere between hzoli9 and hzoli10.1 <TAB> completion inside a for
> mb> control structure doesn't work. For example,
> 
> mb> $ ~/bin/sparc/zsh-2.6h9 -f
> mb> bjerknes% echo $ZSH_VERSION
> mb> 2.6-beta9
> mb> bjerknes% setopt autolist
> mb> bjerknes% for i in a*; do
> >> echo a<TAB>	# a tab correctly prints out the ambiguous files
> mb> a1  a2  a3
> 
> mb> but in hzoli10.1:
> 
> mb> $ ~/bin/sparc/zsh-2.6h10.1 -f
> mb> bjerknes% echo $ZSH_VERSION
> mb> 2.6-beta10-hzoli10.1
> mb> bjerknes% setopt autolist 
> mb> bjerknes% for i in a*; do
> 
> >> echo a<TAB>	# Huh? Another a keeps getting added, and no list is printed.
> 
> >> echo aa<TAB>
>       
> >> echo aaa<TAB>	# can go on indefinitely
>       
> >> echo aaaa
>       
> >> echo aaaaa
>       
> >> echo aaaaaa
>       
> mb> This also has patches from zefram (I forget what they do). I was just
> mb> curious if the bug has infected your copy as well.

In fact the bug appeared after Peter's input patches. The problem again is
that unlike the old history code, ingetch() doesn't remove tokens from the
input stream.  I is not necessarily a bug although I think this should be put
back in there (it's only one line) as tokens in iput can cause completely
unexpected results.  But for now it is good as it showed up two old bug so
far.  This particular bug is in zle_tricky.c.  If the current line is part of
a command structure, zle prepends chline to the current line before calling
the lexer.  But chline contains HISTSPACEs which should be replaced with
normal spaces.  Here is the one line patch for that.  It can be (and should
be) applied to any zsh release.

Bye,

  Zoltan

--- 1.30	1995/07/22 22:52:16
+++ Src/zle_tricky.c	1995/07/22 23:00:34
@@ -522,7 +522,7 @@
 		*q++ = '\\';
 		*q++ = '\\';
 	    }
-	    *q++ = *p;
+	    *q++ = *p == HISTSPACE ? ' ' : *p;
 	}
 	/* Put a zero byte after it and append the original line contents. */
 	*q = '\0';


      reply	other threads:[~1995-07-24  9:27 UTC|newest]

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

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=9507240914.AA03247@turan.elte.hu \
    --to=hzoli@cs.elte.hu \
    --cc=mdb@cdc.noaa.gov \
    /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).