zsh-workers
 help / color / mirror / code / Atom feed
* requests
@ 2001-04-15  0:24 Clint Adams
  2001-04-16 16:06 ` (Fwd) requests Bart Schaefer
       [not found] ` <1010415032859.ZM27364@candle.brasslantern.com>
  0 siblings, 2 replies; 5+ messages in thread
From: Clint Adams @ 2001-04-15  0:24 UTC (permalink / raw)
  To: zsh-workers; +Cc: mpol, 92780-forwarded

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


^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2001-04-20  7:22 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2001-04-15  0:24 requests Clint Adams
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

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).