Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
requests
- X-seq: zsh-workers 13991
- From: Clint Adams <schizo@xxxxxxxxxx>
- To: zsh-workers@xxxxxxxxxx
- Subject: requests
- Date: Sat, 14 Apr 2001 20:24:10 -0400
- Cc: mpol@xxxxxxxxxxxxxxxxxxx, 92780-forwarded@xxxxxxxxxxxxxxx
- Mailing-list: contact zsh-workers-help@xxxxxxxxxx; run by ezmlm
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@xxxxxxxxxxxxxxxxxxx> -----
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@xxxxxxxxxxxxxx
Warning: this is a memetically modified message
Messages sorted by:
Reverse Date,
Date,
Thread,
Author