Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
code that used to work that doesn't anymore
- X-seq: zsh-workers 34605
- From: Mikael Magnusson <mikachu@xxxxxxxxx>
- To: zsh workers <zsh-workers@xxxxxxx>
- Subject: code that used to work that doesn't anymore
- Date: Sun, 22 Feb 2015 22:07:24 +0100
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:date:message-id:subject:from:to:content-type; bh=zE6Pbr0rv35pNoIpgf0bufsN3wOZeWD/wfw0cm6NJAU=; b=y+mIU1zv5uJmKPCSUOlBQFal7XeHJ+sunNeGuzZkv5mgfthCJqBUsNqWtULa2mvk74 bLTDOHzToBw+NzVMarvmT885X20XDAyBx65In4iHNPmCAyZyqRuKRGG3SXyWzgGDKyIH elD7WC6vj4jRdlqJY4lJ5DzLOU3WjWl8N1o68IOauyQhMqjDMIUeMuHKfH/IDrI5iuaF 2HLUYPAJYUB925QQ8S5E3BOr9zdD8zgJai6JIczpJyyWAJolQjPraoRhWIdKPFntrash DAGyWMgSvSR/nn6uDmG8AOanHZ5L7CTZOrp76EJi+E9oO6Iyv0XBoN28qX7kK4xKWzJ4 EwlA==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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