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

Re: ${(P)${foo}} (Re: Associative array ordering)



Bart Schaefer wrote:

> Let's go this way:  Implement ${(P)foo}, the same as ${(P)${foo}} where
> the inner ${...} has no flags or modifiers, and leave ${!foo} undefined
> until we do real namerefs (if we ever do).

Yep.

Bye
 Sven

--- os/subst.c	Wed Feb  3 10:55:01 1999
+++ Src/subst.c	Wed Feb  3 10:48:21 1999
@@ -991,6 +991,12 @@
 	copied = 1;
 	*s = sav;
 	v = (Value) NULL;
+    } else if (aspar) {
+	if ((v = getvalue(&s, 1))) {
+	    val = idbeg = getstrvalue(v);
+	    subexp = 1;
+	} else
+	    vunset = 1;
     }
     if (!subexp || aspar) {
 	char *ov = val;

--
Sven Wischnowsky                         wischnow@xxxxxxxxxxxxxxxxxxxxxxx



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