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

Re: RC_EXPAND_PARAM bug



On Jul 30,  1:04pm, Geoff Wing wrote:
} Subject: Re: RC_EXPAND_PARAM bug
}
} :} ... 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.
} :The trick there is that x is an array variable, so it produces two strings.
} 
} Yes, but I still don't get it.  ^^ should prevent expansion, shouldn't it.

It prevents rc_expand_param.  It doesn't prevent array expansion.  That
is, it prevents (x y) from being combined with the rest of the string in
every possible combination; it doesn't make (x y) into a string istead of
into an array.  You need quoting for that.

So either 1a1x 1ay 1b1x 1by is right, or else it should be 1a1x 1b1x y.

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



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