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

Re: Bad expansion



On Jan 21,  2:51pm, Zefram wrote:
} Subject: Re: Bad expansion
}
} DervishD wrote:
} >    # Bad substitution
} >    echo ${${testing[1]}_VALUE}
} 
} echo ${(e):-\$${testing[1]}_VALUE}
} 
} The :-\ is a smiley that means "maybe there ought to be a neater way".

There's also

	echo ${(P)${:-${testing[1]}_VALUE}}

but I don't know whether that can be considered "neater."

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

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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