Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: mult_isarr bug
- X-seq: zsh-workers 6278
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: mult_isarr bug
- Date: Fri, 14 May 1999 08:44:30 +0200 (MET DST)
- In-reply-to: Peter Stephenson's message of Thu, 13 May 1999 13:54:45 +0200
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
Peter Stephenson wrote:
> Am I going crazy or is this bug still in the latest version of the shell?
>
> % dirs
> ~z/Src ~z ~/lgt/rz2 ~ ~/lgt/tfuzz /temp/pws ~/lgt/su2/cxx ~/tex/hep-lat
> /temp/pws/src
> % print ${$(dirs)[1]}
> ~
>
> Wasn't this just fixed?
Oops. No, we have only handled nested parameter expansions, yet.
The `fix' for the above would be something like the patch below which
makes the result of $(...) be treated as an array if the whole thing
is not quoted. I think this is the right behavior, yes?
Bye
Sven
--- os/subst.c Mon May 10 17:23:08 1999
+++ Src/subst.c Fri May 14 08:40:41 1999
@@ -99,6 +99,8 @@
while (!errflag && *str) {
if ((qt = *str == Qstring) || *str == String) {
if (str[1] == Inpar) {
+ if (!qt)
+ mult_isarr = 1;
str++;
goto comsub;
} else if (str[1] == Inbrack) {
@@ -249,6 +251,7 @@
* The mult_isarr variable is used by paramsubst() to tell if it yields *
* an array. */
+/**/
static int mult_isarr;
/**/
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author