zsh-workers
 help / color / mirror / code / Atom feed
From: Clint Adams <schizo@debian.org>
To: zsh-workers@sunsite.dk
Cc: mpol@charybda.icm.edu.pl, 92780-forwarded@bugs.debian.org
Subject: requests
Date: Sat, 14 Apr 2001 20:24:10 -0400	[thread overview]
Message-ID: <20010414202410.A10021@dman.com> (raw)

For the complaint department.

Michal, how do you want ${param[(r)$anotherparam]} to behave, if not
treating $anotherparam as a pattern?

----- Forwarded message from Michal Politowski <mpol@charybda.icm.edu.pl> -----

Actually I can't tell if these are (mis)features or bugs, but I don't like
them so here comes the report.

In decreasing order of annoyance.

1. in ${param[(r)$anotherparam]} the result of $anotherparam
is always treated as a pattern, it would be nice if one could use $~anotherparam
for this.

2. ${(B)param#pattern}
gives 1 when there's no match -- could give 0 or 1+$#param like ${param[(i)pattern]}
the same for (E) and {...%...}

3. ${param[(i)pattern]} behaves differently for scalars and for arrays when
there is no match. For scalars returns 0, for arrays the index of last element + 1.

-- System Information
Debian Release: testing/unstable
Architecture: i386
Kernel: Linux Amber 2.2.19 #1 Thu Mar 29 15:52:51 CEST 2001 i586

Versions of packages zsh depends on:
ii  libc6                     2.2.2-4        GNU C Library: Shared libraries an
ii  libncurses5               5.2.20010318-1 Shared libraries for terminal hand

-- 
Michal Politowski -- mpol@lab.icm.edu.pl
Warning: this is a memetically modified message


             reply	other threads:[~2001-04-15  0:24 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-04-15  0:24 Clint Adams [this message]
2001-04-16 16:06 ` (Fwd) requests Bart Schaefer
2001-04-16 17:29   ` requests Bart Schaefer
     [not found] ` <1010415032859.ZM27364@candle.brasslantern.com>
2001-04-19 15:00   ` requests Michal Politowski
2001-04-20  3:04     ` requests 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=20010414202410.A10021@dman.com \
    --to=schizo@debian.org \
    --cc=92780-forwarded@bugs.debian.org \
    --cc=mpol@charybda.icm.edu.pl \
    --cc=zsh-workers@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).