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

Re: BUG: zsh-3.1.5-pws-14: parameter expansion not working properly



On Apr 16,  9:36am, Sven Wischnowsky wrote:
} Subject: Re: BUG: zsh-3.1.5-pws-14: parameter expansion not working proper
}
} Bart Schaefer wrote:
} 
} > I don't think it's possible to "pass down" from paramsubst-->multsub
} > the knowledge of whether an array should be returned [except when (P)];
} > it has to be "passed up," multsub<--prefork<--stringsubst<--paramsubst.
} 
} I don't understand the difference between making the the arrows point
} to the left or the right here.

It's a call stack, with caller on the left and the callee on the right.
Right-pointing arrows mean passed parameters, left-pointing arrows mean
returned value(s) [including "returned" through a static global].

} > 4. *After* the subscripts are applied, the outer ${ ... } joins the
} > quoted words into a single string, *unless*: the (@) flag is present
} > or the [@] subscript was applied, and the (j) flag is not present.
} 
} This one is very important. If we make it this way (and the patch
} below does that), it means that we still need the plethora of `(@)'

Yes, I know ...

} [...] the behavior with the patch looks better than before to
} me. We only need to discuss the `is there a way to avoid the need for
} the many (@) flags' thing.

I think the way to approach this may be to try to rewrite Peter's manual
section on parameter substitution rules to see how confusing it is when
joining does not occur.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com



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