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

Re: param expansion flags



On Fri, May 06, 2005 at 04:11:09PM +0000, Bart Schaefer wrote:
> On May 6,  1:48pm, Dominic Mitchell wrote:
> } 
> } Can anyone offer me some advice?
> 
> Do it in several steps and worry later (if ever) about compressing
> them down to a single nested parameter expansion.
> 
> arr=( ${(f)"$(rake -sT)"} )
> arr=( ${arr#rake } )
> arr=( ${arr/ *# /\[} )
> arr=( ${^arr}\] )

Thank you very much -- that's an exceedingly sensible idea.  And I
hadn't used ${^foo} before, so that's something good to learn!

Thanks again,
-Dom



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