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

Re: RC_EXPAND_PARAM bug



Zoltan Hidvegi <hzoli@xxxxxxxxxxxxxxx> typed:
:Bart Schaefer wrote:
:> On Jul 28,  2:42pm, Andrew Main wrote:
:> } % a=(a b)
:> } % x=(x y)
:> } % echo ${^a}1${^x}
:> } a1y b1x b1y
:> It gets weirder:
:> 
:> % echo 1${^a}1${^^x}
:> 1ay 1b1x 1by
:Below is a fix.  The second expansion might still look a bit weird:
:% echo 1${^a}1${^^x}
:1a1x 1ay 1b1x 1by
:
:The logic is that the string after the rc-param, 1${^^x}, is expanded,
:producing two strings, 1x y, which is combined with 1a 1b.  It is true

I don't get this,  shouldn't 1${^^x} produce one string "1x y"?  And then the
expansion of 1${^a}1${^^x} be the string "1a1x y 1b1x y"?  Your logic 
indicates to me that it's producing array like thingies.  Is this dependant
on some other wierd option?  Please explain before I go mental.
-- 
Geoff Wing [mason@xxxxxxxxxxxxxxx]                   Phone    : +61-3-9818 2977 
 Technical Manager: PrimeNet Computer Consultants    Facsimile: +61-3-9819 3788 
 Web: <URL:http://www.primenet.com.au/>              Mobile   : 0412 162 441



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