Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: Bug in mult_isarr



Peter Stephenson wrote:

> Modifiers and split process substitutions don't seem to go together too
> well with the mult_isarr patch (6046).
> 
> % print "${(@)${(@)=$(echo yan tan tethera dick)}:##t*}"
> 
> before:
> 
> yan dick
> 
> after:
> 
> yan tan tethera dick
> 
> The example that I originally found was presumably triggering the same
> thing, 
> 
> % print "${(@)${(@f)$(typeset)}:#*local *\=*}"
> 
> where you get nothing after the patch.  However, I also noticed that in
> that case if you miss out the `:' the shell hangs.

The patch below fixes this -- remember me saying that I had to put the 
`mult_isarr = isarr' further up than I would have done if the singleton-
array-to-string conversion hadn't been there?

The second example now works for me, too. I couldn't get it to hang,
though. However, in the shell I tested it I have the magic hashes from 
6198 where a simple `typeset' could cause the shell to SEGV -- if you
have that in the shell you tried this with, too, you'll better remove
it -- I hope to send a patch for a module with those special
parameters this week anyway.

Bye
 Sven

--- os/subst.c	Fri May  7 14:55:12 1999
+++ Src/subst.c	Mon May 10 15:46:53 1999
@@ -1465,6 +1465,7 @@
 		val = aval[0];
 	    else
 		isarr = 2;
+	    mult_isarr = isarr;
 	}
     }
     if (casmod) {

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author