From: Marc Chantreux <marc.chantreux@ulpmm.u-strasbg.fr>
To: zsh-users@sunsite.dk
Subject: Re: Style question: Can this be written in a more elegant way?
Date: Tue, 25 Apr 2006 16:58:06 +0200 [thread overview]
Message-ID: <444E38FE.6080702@ulpmm.u-strasbg.fr> (raw)
In-Reply-To: <060425074145.ZM1844@torch.brasslantern.com>
Bart Schaefer wrote:
> But (( $file[1] )) can't be right; it treats the file name as a math
> expression, so a file named "3-3" would execute PROG_FAIL. You must
> at least mean (( ${+file[1]} )).
oopps ... that was forgotten when copy/paste ...
> ... you have failed to quote $REPLY so it substitutes the value that it
> had before the glob began to execute. It's as if you had typed:
>
> % : *(Nom[1]e:echo last file score:)
>
> Correct is like so:
>
> % : *(Nom[1]e:'echo last file $REPLY':)
> last file this
> last file is
> last file the
> last file score
i got the first error ... but what i expect is to treat only the nth
element of the list.
% : *(Nom[1]e:'echo last file $REPLY':)
last file this
% : *(Nom[2]e:'echo last file $REPLY':)
last file is
...
and so on ...
regards.
mc
next prev parent reply other threads:[~2006-04-25 14:58 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-04-24 7:26 Com MN PG P E B Consultant 3
2006-04-24 8:27 ` Marc Chantreux
2006-04-24 15:21 ` Bart Schaefer
2006-04-25 7:55 ` Marc Chantreux
2006-04-25 14:41 ` Bart Schaefer
2006-04-25 14:58 ` Marc Chantreux [this message]
2006-04-25 17:03 ` Bart Schaefer
2006-04-25 6:37 Com MN PG P E B Consultant 3
2006-04-25 8:01 ` Marc Chantreux
2006-04-25 15:06 ` Bart Schaefer
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=444E38FE.6080702@ulpmm.u-strasbg.fr \
--to=marc.chantreux@ulpmm.u-strasbg.fr \
--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).