From: DervishD <raul@pleyades.net>
To: Bart Schaefer <schaefer@brasslantern.com>
Cc: Zsh Users <zsh-users@sunsite.dk>
Subject: Re: Subscripting without temporaries
Date: Wed, 14 Apr 2004 18:13:13 +0200 [thread overview]
Message-ID: <20040414161313.GA658@DervishD> (raw)
In-Reply-To: <040413185850.ZM21526@candle.brasslantern.com>
Hi Bart :)
* Bart Schaefer <schaefer@brasslantern.com> dixit:
> > I tried the same using more or less what you suggests below, but I
> > didn't get far because I cannot do $array[EXP][Whatever] (well,
> > namely I was trying ${array[10]}[1,8], but zsh told me 'no matches
> > found').
> Heh. You *can* do ${array[EXP][Whatever]},
> or you can do ${${array[EXP]}[Whatever]},
> but you can't do what you said you tried.
S**t, how embarrasing... I didn't even try those two
combinations. Well, that way I don't need a temporary.
> Also there was a bug until recently where if EXP is a negative number,
> then the result of $array[EXP] is still an array rather than a string,
> so then the [Whatever] fails to slice the string.
I'm planning to upgrade to Zsh 4.2.x as soon as the next version
is releases, so I hope I don't get bite by that bug in the interim.
Thanks a LOT for your help :)
Raúl Núñez de Arenas Coronado
--
Linux Registered User 88736
http://www.pleyades.net & http://raul.pleyades.net/
prev parent reply other threads:[~2004-04-14 18:06 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-04-13 12:00 DervishD
2004-04-13 15:29 ` Bart Schaefer
2004-04-13 16:40 ` Lloyd Zusman
2004-04-13 17:11 ` Phil Pennock
2004-04-13 18:17 ` Lloyd Zusman
2004-04-13 17:17 ` DervishD
2004-04-13 17:18 ` Bart Schaefer
2004-04-13 19:00 ` Wayne Davison
2004-04-13 17:14 ` DervishD
2004-04-14 1:58 ` Bart Schaefer
2004-04-14 16:13 ` DervishD [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040414161313.GA658@DervishD \
--to=raul@pleyades.net \
--cc=schaefer@brasslantern.com \
--cc=zsh-users@sunsite.dk \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).