* Re: mult_isarr bug
@ 1999-05-14 6:44 Sven Wischnowsky
0 siblings, 0 replies; 2+ messages in thread
From: Sven Wischnowsky @ 1999-05-14 6:44 UTC (permalink / raw)
To: zsh-workers
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@informatik.hu-berlin.de
^ permalink raw reply [flat|nested] 2+ messages in thread
* mult_isarr bug
@ 1999-05-13 11:54 Peter Stephenson
0 siblings, 0 replies; 2+ messages in thread
From: Peter Stephenson @ 1999-05-13 11:54 UTC (permalink / raw)
To: Zsh hackers list
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?
--
Peter Stephenson <pws@ibmth.df.unipi.it> Tel: +39 050 844536
WWW: http://www.ifh.de/~pws/
Dipartimento di Fisica, Via Buonarroti 2, 56127 Pisa, Italy
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1999-05-14 6:45 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-14 6:44 mult_isarr bug Sven Wischnowsky
-- strict thread matches above, loose matches on Subject: below --
1999-05-13 11:54 Peter Stephenson
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).