From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 11034 invoked from network); 27 Jun 2004 08:15:48 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (130.225.247.85) by ns1.primenet.com.au with SMTP; 27 Jun 2004 08:15:48 -0000 Received: (qmail 3771 invoked from network); 26 Jun 2004 19:43:26 -0000 Received: from sunsite.dk (130.225.247.90) by a.mx.sunsite.dk with SMTP; 26 Jun 2004 19:43:26 -0000 Received: (qmail 17251 invoked by alias); 26 Jun 2004 18:34:34 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 20106 Received: (qmail 17241 invoked from network); 26 Jun 2004 18:34:34 -0000 Received: from odin.dotsrc.org (HELO a.mx.sunsite.dk) (qmailr@130.225.247.85) by sunsite.dk with SMTP; 26 Jun 2004 18:34:34 -0000 Received: (qmail 3551 invoked from network); 26 Jun 2004 19:43:21 -0000 Received: from unknown (HELO moonbase.zanshin.com) (@167.160.213.139) by a.mx.sunsite.dk with SMTP; 26 Jun 2004 19:43:19 -0000 Received: from toltec.zanshin.com (toltec.zanshin.com [64.84.47.166]) by moonbase.zanshin.com (8.12.11/8.12.11) with ESMTP id i5QIYTcR005654; Sat, 26 Jun 2004 11:34:29 -0700 Date: Sat, 26 Jun 2004 11:34:29 -0700 (PDT) From: Bart Schaefer Reply-To: zsh-workers@sunsite.dk To: zsh-workers@sunsite.dk cc: 255788-forwarded@bugs.debian.org Subject: Re: Bug#255788: $'' does not work after <<< In-Reply-To: <200406250955.i5P9tpMO029457@news01.csr.com> Message-ID: References: <200406250955.i5P9tpMO029457@news01.csr.com> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Spam-Checker-Version: SpamAssassin 2.63 on a.mx.sunsite.dk X-Spam-Level: X-Spam-Status: No, hits=0.0 required=6.0 tests=none autolearn=no version=2.63 X-Spam-Hits: 0.0 On Fri, 25 Jun 2004, Peter Stephenson wrote: > I don't know the history of this, but it looks like someone got their > wires crossed since the remnulargs() in the parsing code is obviously > incompatible with the singsub() in the exec code (er, for certain values > of `obviously'). Um, except that the singsub() wasn't present in the exec code until you added it just now? So the remnulargs() was needed to, well, remove the Nulargs formerly inserted by the loop that you also modified. Anyway, I think there's still something not quite right here. Before this patch: schaefer<501> bar=baz schaefer<502> cat <<$bar heredoc> foo heredoc> baz heredoc> $bar foo baz schaefer<503> After this patch: schaefer<502> cat <<$bar heredoc> foo heredoc> baz foo schaefer<503> Yet here's bash 2.05, which still has the old behavior: [schaefer]$ bar=baz [schaefer]$ cat <<$bar > foo > baz > $bar foo baz [schaefer]$ > I haven't dared remove the dupstring() but I suspect > it must be redundant, somehow. The reason for the dupstring() is that remnulargs() modifies its argument in place. If you take out remnulargs() you can take out the dupstring(). > By the way I think this sort of thing ought to work, too: > > cat <<$'a\tb' > Here document > a t > > so I've made it. Once this is all working, we'll need to update the tests.