Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: Old 'cd ......' function broken.
- X-seq: zsh-workers 2181
- From: Peter Stephenson <pws@xxxxxx>
- To: peta@xxxxxxxxxxxxx, zsh-workers@xxxxxxxxxxxxxxx (Zsh hackers list)
- Subject: Re: Old 'cd ......' function broken.
- Date: Tue, 01 Oct 1996 17:22:00 +0200
- In-reply-to: "peta@xxxxxxxxxxxxx"'s message of "Mon, 30 Sep 1996 15:57:34 MET." <199610011450.KAA15883@xxxxxxxxxxxxxxxxxxxxxxxxxxxx>
peta@xxxxxxxxxxxxx wrote:
> I got this from the zsh mailing list a while ago. It used to work
> but no more (zsh-3.0.0). It doesnt like ${(r:(${#1}-1)*3-1::../:)b}
It looks like the expression after the first : isn't being interpreted
as a mathematical expression for evaluation any more. Somebody will
know if this is a feature, otherwise it's a bug. You can get away
with:
eval "a=\${(r:$(((${#1}-1)*3-1))::../:)b}"
which evaluates the expression first.
--
Peter Stephenson <pws@xxxxxx> Tel: +49 33762 77366
WWW: http://www.ifh.de/~pws/ Fax: +49 33762 77330
Deutches Electronen-Synchrotron --- Institut fuer Hochenergiephysik Zeuthen
DESY-IfH, 15735 Zeuthen, Germany.
Messages sorted by:
Reverse Date,
Date,
Thread,
Author