From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 13676 invoked from network); 15 Apr 2001 00:24:19 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 15 Apr 2001 00:24:19 -0000 Received: (qmail 14898 invoked by alias); 15 Apr 2001 00:24:20 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 13991 Received: (qmail 14886 invoked from network); 15 Apr 2001 00:24:19 -0000 Date: Sat, 14 Apr 2001 20:24:10 -0400 From: Clint Adams To: zsh-workers@sunsite.dk Cc: mpol@charybda.icm.edu.pl, 92780-forwarded@bugs.debian.org Subject: requests Message-ID: <20010414202410.A10021@dman.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.2.5i 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 ----- 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