From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from euclid.skiles.gatech.edu (list@euclid.skiles.gatech.edu [130.207.146.50]) by melb.werple.net.au (8.7.4/8.7.3) with ESMTP id HAA23848 for ; Thu, 14 Mar 1996 07:22:16 +1100 (EST) Received: (from list@localhost) by euclid.skiles.gatech.edu (8.7.3/8.7.3) id PAA24657; Wed, 13 Mar 1996 15:06:27 -0500 (EST) Resent-Date: Wed, 13 Mar 1996 15:06:27 -0500 (EST) Date: Wed, 13 Mar 96 12:04:10 -0800 From: esky@CS.UCLA.EDU (Eskandar Ensafi) Message-Id: <9603132004.AA08513@marathon.cs.ucla.edu> To: zsh-workers@math.gatech.edu Subject: Parameter Expansion Bug Resent-Message-ID: <"SejM83.0.816.2hoHn"@euclid> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/822 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu Hello, The following does not work properly in zsh-2.6-beta12. Please note that the results are unpredicatable and may change from trial to trial. If you want to reproduce it, define foo () as shown below and keep typing "foo a b" until you get different results. I am using EXTENDED_GLOB. myhost% foo () { echo "${argv##^-*}" } # Show only -option arguments. myhost% foo a b # OK. No output as expected. myhost% foo a b # Wrong! Should not echo "a b". a b myhost% foo a b # OK again. myhost% foo a b # Wrong again. a b myhost% foo a b # Wrong again. a b myhost% foo a b # OK again. myhost% foo -a -b a f # OK. Ouput was -a -b as expected. -a -b myhost% foo a b # Say what? -a - myhost% foo a b # Huh? a @ myhost% foo a b # And now it's OK again! ... Any idea what's causing this? - Eskandar ------------------------------------------------------------------------------ Eskandar Ensafi Object-Oriented Software Engineer University of California, Los Angeles Department of Biomathematics esky@cs.ucla.edu (ASCII, MIME, NeXT) School of Medicine http://www.cs.ucla.edu/csd-lanai/fweb/esky ------------------------------------------------------------------------------