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

Re: Empty array and parameter expansion



On Jun 10, 11:36pm, Vincent Lefevre wrote:
> Subject: Re: Empty array and parameter expansion
> On Wed, Jun 10, 1998 at 10:26:51 -0700, Bart Schaefer wrote:
> > } % i=test
> > } % a=()
> > } % a=($a $i)
> > } % echo $a
> > } $i
> > 
> > I don't understand it either, as it doesn't happen to me.
> 
> After some tests... it happens only when RC_EXPAND_PARAM is set.
> But is it normal?

You want this patch, from zsh-workers article 3548 last November:

Index: subst.c
===================================================================
--- subst.c	1997/11/19 16:40:31	1.6
+++ subst.c	1997/11/19 16:44:41	1.7
@@ -1440,7 +1440,7 @@
 	    }
 	    if (plan9) {
 		uremnode(l, n);
-		return NULL;
+		return n;
 	    }
 	} else {
 	    x = aval[0];



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