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

code that used to work that doesn't anymore



No idea if this was meant to be valid syntax, but used to run:
% zselect -t ${$(( $1 * 100 ))%.[0-9]#}
zsh: bad substitution

This works both now and before:
% zselect -t ${${:-$(( $1 * 100 ))}%.[0-9]#}

NB: this is perhaps the most unexpected result of my life
% echo ${:-$[5]}
5
% echo ${$[5]}
7
But it's simply element five of $$ (pid of zsh).

I guess the ${$ in my first command is now interpreted as a $$ and
then the (( is nonsense?

-- 
Mikael Magnusson



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