From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 1372 invoked from network); 7 Jun 2001 15:01:52 -0000 Received: from sunsite.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 7 Jun 2001 15:01:50 -0000 Received: (qmail 13902 invoked by alias); 7 Jun 2001 15:01:27 -0000 Mailing-List: contact zsh-workers-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 14789 Received: (qmail 13870 invoked from network); 7 Jun 2001 15:01:21 -0000 X-Authentication-Warning: candle.brasslantern.com: schaefer set sender to lantern@shell10.ba.best.com using -f From: "Bart Schaefer" Message-Id: <1010607145836.ZM7693@candle.brasslantern.com> Date: Thu, 7 Jun 2001 14:58:36 +0000 In-Reply-To: <000301c0ef23$99be1900$21c9ca95@mow.siemens.ru> Comments: In reply to "Andrej Borsenkow" "RE: ${...%%=*} problem" (Jun 7, 11:29am) References: <000301c0ef23$99be1900$21c9ca95@mow.siemens.ru> X-Mailer: Z-Mail (5.0.0 30July97) To: "Andrej Borsenkow" , Subject: Re: ${...%%=*} problem MIME-Version: 1.0 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii On Jun 7, 11:29am, Andrej Borsenkow wrote: } Subject: RE: ${...%%=*} problem } } > > bor@itsrm2% print ${foo%%=*} } > > zsh: * not found } > > } > > Why? } > } > Because it does expansion, include the one after an equal sign: } } This violates our own documentation: You're sort of correct, but you quoted the wrong section of the doc. The relevant bit is this, under parameter expansion: In the expansions discussed below that require a pattern, the form of the pattern is the same as that used for filename generation; see *Note Filename Generation::. Note that these patterns, along with the replacement text of any substitutions, are themselves subject to parameter expansion, command substitution, and arithmetic expansion. That paragraph should include "filename expansion" (but not generation) among the list of things to which the patterns are subject. So ${foo##~} removes the home directory from $foo. -- Bart Schaefer Brass Lantern Enterprises http://www.well.com/user/barts http://www.brasslantern.com Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net