Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: PATCH: small parameter fix
- X-seq: zsh-workers 5697
- From: Sven Wischnowsky <wischnow@xxxxxxxxxxxxxxxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxxxxxx
- Subject: Re: PATCH: small parameter fix
- Date: Tue, 9 Mar 1999 11:12:42 +0100 (MET)
- In-reply-to: Sven Wischnowsky's message of Tue, 9 Mar 1999 09:19:12 +0100 (MET)
- Mailing-list: contact zsh-workers-help@xxxxxxxxxxxxxx; run by ezmlm
I wrote:
> With the patch below we get:
>
> % echo ${$(uname -n)[1]}
> beta
> % echo "${$(uname -n)[1]}"
> b
> % echo ${${path}[1]}
> /users/wischnow/bin/alpha
> % echo "${${path}[1]}"
> /
>
> ...which seems sensible to me.
Grrr, this broke "${(@)$(foo)#...}" where the manual says that the
thing inside will be treated as an array if the `(@)' flags is given.
The patch at least fixes this. But maybe we should collect opinions
which expression should expand to what and then make the code produce
that.
Bye
Sven
--- os/subst.c Tue Mar 9 11:07:25 1999
+++ Src/subst.c Tue Mar 9 11:10:13 1999
@@ -976,7 +976,8 @@
skipparens(*s, *s == Inpar ? Outpar : Outbrace, &s);
sav = *s;
*s = 0;
- if (multsub(&val, ((quoted || aspar) ? NULL : &aval), &isarr, NULL) &&
+ if (multsub(&val, (((quoted || aspar) && !nojoin) ? NULL : &aval),
+ &isarr, NULL) &&
quoted) {
isarr = -1;
aval = alloc(sizeof(char *));
--
Sven Wischnowsky wischnow@xxxxxxxxxxxxxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author