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

Re: Feature request? print -e to eval ?



hello,

> Have a look at the (%) flag to ${...}.

\o/ i missed it for so long ! thank you very much Peter.

the only one thing missing to make evalp obsolete is to defer the
interpolation of a variable

	command=(echo '%(?.true.false) $USER' ); ${(%):-$command}

isn't good because $USER in never interpolated (even if setopt promptsubst)
and of course, the "" are bad because it interpols as it sets up
$command.

i really would like to write something like:

	c=( echo 'dear $USER, you did it %(?.fine.wrong)' )
	${(%):-$c}

but again: the (%) tip is a perfect addition to my daily zsh toolkit.
thank you for that.

regards

-- 
Marc Chantreux (eiro on github and freenode)
http://eiro.github.com/
http://eiro.github.com/atom.xml
"Don't believe everything you read on the Internet"
    -- Abraham Lincoln



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