zsh-workers
 help / color / mirror / code / Atom feed
* Bug in mult_isarr
@ 1999-05-10 11:21 Peter Stephenson
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 1999-05-10 11:21 UTC (permalink / raw)
  To: Zsh hackers list

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.

-- 
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] 3+ messages in thread

* Re: Bug in mult_isarr
  1999-05-10 13:58 Sven Wischnowsky
@ 1999-05-10 16:11 ` Peter Stephenson
  0 siblings, 0 replies; 3+ messages in thread
From: Peter Stephenson @ 1999-05-10 16:11 UTC (permalink / raw)
  To: zsh-workers

Sven Wischnowsky wrote:
> 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.

That wasn't the problem, but it all seems to be working now anyway.

-- 
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] 3+ messages in thread

* Re: Bug in mult_isarr
@ 1999-05-10 13:58 Sven Wischnowsky
  1999-05-10 16:11 ` Peter Stephenson
  0 siblings, 1 reply; 3+ messages in thread
From: Sven Wischnowsky @ 1999-05-10 13:58 UTC (permalink / raw)
  To: zsh-workers


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@informatik.hu-berlin.de


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~1999-05-10 16:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1999-05-10 11:21 Bug in mult_isarr Peter Stephenson
1999-05-10 13:58 Sven Wischnowsky
1999-05-10 16:11 ` 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).