From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 22569 invoked by alias); 26 Dec 2012 02:39:53 -0000 Mailing-List: contact zsh-users-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Users List List-Post: List-Help: X-Seq: 17496 Received: (qmail 4182 invoked from network); 26 Dec 2012 02:39:41 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.2 (2011-06-06) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-6.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at linux.vnet.ibm.com does not designate permitted sender hosts) Date: Wed, 26 Dec 2012 07:11:33 +0800 From: Han Pingtian To: zsh-users@zsh.org Subject: Re: priority problem of ":|" and ":*" Message-ID: <20121225231133.GA8145@localhost.localdomain> References: <20121224105241.GA24051@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20121224105241.GA24051@localhost.localdomain> User-Agent: Mutt/1.5.21 (2010-09-15) X-Content-Scanned: Fidelis XPS MAILER x-cbid: 12122523-5518-0000-0000-00000A47026A On Mon, Dec 24, 2012 at 06:52:41PM +0800, Han Pingtian wrote: > hi, > > I believe the new ":|" and ":*" should be in Rule 7 Modifiers of > paramter expansion, so this looks like a problem in priority: > > % a1=(a b c);a2=('a b c');print "${a1:|a2}" > > % a1=(a b c);a2=('a b c');print "${#a1:|a2}" > 3 > > in this, the priority should be "5 Double-quoted joining" first, then "7 > modifiers", then "9 length". So 'print "${#a1:|a2}"' should output 0 I > think. And the ":*" has the same problem. > For the ":*", we have this result: % a1=(a b c);a2=(a b c);print ${a1:*a2} a b c % a1=(a b c);a2=(a b c);print "${a1:*a2}" % a1=(a b c);a2=(a b c);print "${#a1:*a2}" 3 %