Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Bug#255788: $'' does not work after <<<
- X-seq: zsh-workers 20106
- From: Bart Schaefer <schaefer@xxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: Re: Bug#255788: $'' does not work after <<<
- Date: Sat, 26 Jun 2004 11:34:29 -0700 (PDT)
- Cc: 255788-forwarded@xxxxxxxxxxxxxxx
- In-reply-to: <200406250955.i5P9tpMO029457@xxxxxxxxxxxxxx>
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
- References: <200406250955.i5P9tpMO029457@xxxxxxxxxxxxxx>
- Reply-to: zsh-workers@xxxxxxxxxx
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.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author