zsh-workers
 help / color / mirror / code / Atom feed
* code that used to work that doesn't anymore
@ 2015-02-22 21:07 Mikael Magnusson
  2015-02-22 21:28 ` Peter Stephenson
  0 siblings, 1 reply; 2+ messages in thread
From: Mikael Magnusson @ 2015-02-22 21:07 UTC (permalink / raw)
  To: zsh workers

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


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2015-02-22 21:29 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-22 21:07 code that used to work that doesn't anymore Mikael Magnusson
2015-02-22 21:28 ` Peter Stephenson

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).