From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.5/8.7.3/2) with ESMTP id SAA19171 for ; Mon, 8 Jul 1996 18:57:48 +1000 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id EAA03804; Mon, 8 Jul 1996 04:48:33 -0400 (EDT) Resent-Date: Mon, 8 Jul 1996 04:48:33 -0400 (EDT) From: "Bart Schaefer" Message-Id: <960708014900.ZM8172@candle.brasslantern.com> Date: Mon, 8 Jul 1996 01:48:57 -0700 In-Reply-To: Zefram "Re: Remaining zsh3.0-pre2 bugs" (Jul 8, 8:57am) References: <28790.199607080757@stone.dcs.warwick.ac.uk> Reply-To: schaefer@nbn.com X-Mailer: Z-Mail (4.0b.702 02jul96) To: Zefram Subject: Re: Remaining zsh3.0-pre2 bugs Cc: hzoli@cs.elte.hu, zsh-workers@math.gatech.edu MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Resent-Message-ID: <"ujpOn.0.Mx.SjCun"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/1567 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Jul 8, 8:57am, Zefram wrote: } Subject: Re: Remaining zsh3.0-pre2 bugs } } '\230' is Snull -- the token that the ' turns into. INULL() *is* } supposed to be true for this token -- it indicates that that character } should be ignored when considering the line at later stages of } execution. The four tokens it is true for are Snull (single quote as } here), Dnull (double quote), Bnull (backslash) and Nularg (an empty } argument). Ah; I wondered. I couldn't figure out whether Bnull was backslash or backquote (as in command substitution); it's mentioned in relation to `...` expressions in several comments. } >Anyway, cs decrements down to 8 because of the two \230 in qword; but } >"echo 'a;b'" of course has 10 characters. } } Bingo. That loop has special code for handling backslashes, but not } quotes. I think it needs to handle quotes too. What I want to know is, why is it considered "cleaning up" the command line to delete everything except backslashes? Which is what that loop seems to be doing ... my guess is that it has something to do with this: zagzig<3> touch a' 'bfoo zagzig<4> echo a' 'b zagzig<4> echo a\ bfoo But that doesn't work for completions with embedded newlines, even when a successful completion is possible: zagzig<4> touch c' > 'dfoo zagzig<5> echo c' > 'd <-- fails to complete I suspect it fails because newline is the only character that can never be escaped with a backslash. And it's broken even for completions with spaces in some circumstances: zagzig<6> echo a' ' zagzig<6> echo a\ bfo o <-- cursor is over the second `o' -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.nbn.com/people/lantern New male in /home/schaefer: >N 2 Justin William Schaefer Sat May 11 03:43 53/4040 "Happy Birthday"