From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 761 invoked from network); 30 Aug 1999 14:59:13 -0000 Received: from sunsite.auc.dk (130.225.51.30) by ns1.primenet.com.au with SMTP; 30 Aug 1999 14:59:13 -0000 Received: (qmail 11004 invoked by alias); 30 Aug 1999 14:59:00 -0000 Mailing-List: contact zsh-workers-help@sunsite.auc.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 7551 Received: (qmail 10997 invoked from network); 30 Aug 1999 14:58:59 -0000 To: zsh-workers@sunsite.auc.dk Subject: Re: PATCH: new parameter expansion type? References: <199908300949.LAA20865@beta.informatik.hu-berlin.de> MIME-Version: 1.0 (generated by AKEMI 1.13.2 - =?ISO-2022-JP?B?Ig==?= =?ISO-2022-JP?B?GyRCQTA0Y0s8GyhCIg==?=) Content-Type: text/plain; charset=US-ASCII From: Tanaka Akira Date: 30 Aug 1999 19:58:56 +0900 In-Reply-To: Sven Wischnowsky's message of "Mon, 30 Aug 1999 11:49:27 +0200 (MET DST)" Message-ID: User-Agent: Chao-gnus/6.12.5 AKEMI/1.13.2 (=?ISO-2022-JP?B?GyRCQTAbKEI=?= =?ISO-2022-JP?B?GyRCNGNLPBsoQg==?=) FLAM-DOODLE/1.12.6 (=?ISO-2022-JP?B?GyRCM3cbKEI=?= 10R4.0/5.0) Emacs/20.4 (sparc-sun-solaris2.6) MULE/4.0 (HANANOEN) In article <199908300949.LAA20865@beta.informatik.hu-berlin.de>, Sven Wischnowsky writes: > --- od/Zsh/expn.yo Sun Aug 29 20:02:39 1999 > +++ Doc/Zsh/expn.yo Sun Aug 29 22:00:54 1999 > @@ -447,6 +447,21 @@ > while in the second case, the shortest matches are taken and the > result is `tt(spy spy lispy star)'. > ) > +xitem(tt(${)var(name)tt(^)var(pattern)tt(^)var(then)tt(^)var(else)tt(})) > +item(tt(${)var(name)tt(^^)var(pattern)tt(^)var(then)tt(^)var(else)tt(}))( > +If the expansion of var(name) matches the var(pattern), the var(then) > +string is substituted, otherwise the var(else) string is > +substituted. In the second form the var(pattern) is taken to be > +negated (even if the tt(EXTENDED_GLOB) option is not set. The > +var(else) string with the preceding `tt(^)' may be omitted in which > +case the expansion behaves as if var(name) were unset (or, if > +var(name) is an array, as if the element compared did not exist). In > +the var(pattern) and the var(then) string a `tt(^)' may be included by > +preceding it with two backslashes. Finally, the var(then) and > +var(else) string may consist of only a dot to make it expand to the > +original string. To make them expand to only a dot, the string > +`tt(\.)' has to be used. > +) > item(tt(${#)var(spec)tt(}))( > If var(spec) is one of the above substitutions, substitute > the length in characters of the result instead of Hm. Parentheses doesn't match. Index: Doc/Zsh/expn.yo =================================================================== RCS file: /projects/zsh/zsh/Doc/Zsh/expn.yo,v retrieving revision 1.1.1.25 diff -u -F^( -r1.1.1.25 expn.yo --- expn.yo 1999/08/30 10:17:30 1.1.1.25 +++ expn.yo 1999/08/30 10:35:44 @@ -452,7 +452,7 @@ (This and the following If the expansion of var(name) matches the var(pattern), the var(then) string is substituted, otherwise the var(else) string is substituted. In the second form the var(pattern) is taken to be -negated (even if the tt(EXTENDED_GLOB) option is not set. The +negated (even if the tt(EXTENDED_GLOB) option is not set). The var(else) string with the preceding `tt(^)' may be omitted in which case the expansion behaves as if var(name) were unset (or, if var(name) is an array, as if the element compared did not exist). In -- Tanaka Akira