From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 21697 invoked from network); 7 Feb 2003 00:02:07 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 7 Feb 2003 00:02:07 -0000 Received: (qmail 16279 invoked by alias); 7 Feb 2003 00:01:38 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 5885 Received: (qmail 16258 invoked from network); 7 Feb 2003 00:01:37 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 7 Feb 2003 00:01:37 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [24.156.49.230] by sunsite.dk (MessageWall 1.0.8) with SMTP; 7 Feb 2003 0:1:37 -0000 Received: (qmail 7723 invoked by uid 501); 7 Feb 2003 00:01:38 -0000 Date: Thu, 6 Feb 2003 19:01:38 -0500 From: Paul Ackersviller To: zsh-users@sunsite.dk Subject: set -A Message-ID: <20030207000138.GK5418@msi.ld> Mail-Followup-To: Paul Ackersviller , zsh-users@sunsite.dk Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i I think this is a bug in all versions, but if there's some reason the behaviour could be considered correct, it'd be nice if it at least worked like ksh in emulation mode. I recently had some trouble getting a ksh script to work properly in zsh, as illustrated by: unset arr set -A arr "${arr[@]}" first [ ${#arr[@]} = 2 ] && echo "arr[0]='${arr[0]}' arr[1]='${arr[1]}'" Note the null entry on the start of the array. I believe the above should work as in ksh, and consistently with positional parameters, like this: set -- set -A arr "$@" first echo arr now has only ${#arr[@]} element Secondly, I have more of an observation than a bug report that better fits the subject since it has to do with parsing after the -A of set. set -A arr -x puts -x into the beginning of the array, whereas ksh treats the -x as an option to set instead. In ksh set -A arr -- -x would get around that, but the same command in zsh now put the -- into the array. I think either way could be considered correct, but it would be nicer if the same command had the same effect in both shells. -- Paul Ackersviller