From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3644 invoked by alias); 18 Nov 2016 01:30:51 -0000 Mailing-List: contact zsh-workers-help@zsh.org; run by ezmlm Precedence: bulk X-No-Archive: yes List-Id: Zsh Workers List List-Post: List-Help: X-Seq: 39969 Received: (qmail 13365 invoked from network); 18 Nov 2016 01:30:51 -0000 X-Qmail-Scanner-Diagnostics: from mx0a-001b2d01.pphosted.com by f.primenet.com.au (envelope-from , uid 7791) with qmail-scanner-2.11 (clamdscan: 0.99.2/21882. spamassassin: 3.4.1. Clear:RC:0(148.163.156.1):SA:0(-0.7/5.0):. Processed in 0.667619 secs); 18 Nov 2016 01:30:51 -0000 X-Spam-Checker-Version: SpamAssassin 3.4.1 (2015-04-28) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-0.7 required=5.0 tests=RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H2 autolearn=unavailable autolearn_force=no version=3.4.1 X-Envelope-From: hanpt@linux.vnet.ibm.com X-Qmail-Scanner-Mime-Attachments: | X-Qmail-Scanner-Zip-Files: | Received-SPF: none (ns1.primenet.com.au: domain at linux.vnet.ibm.com does not designate permitted sender hosts) Date: Fri, 18 Nov 2016 09:30:34 +0800 From: Han Pingtian To: zsh-workers@zsh.org Subject: Re: Remind me why ${name+word} is the way it is? Mail-Followup-To: zsh-workers@zsh.org References: <161111203400.ZM31567@torch.brasslantern.com> <20161117023325.GA3324@localhost.localdomain> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20161117023325.GA3324@localhost.localdomain> User-Agent: Mutt/1.7.1 (2016-10-04) X-TM-AS-GCONF: 00 X-Content-Scanned: Fidelis XPS MAILER x-cbid: 16111801-0024-0000-0000-0000150C867B X-IBM-SpamModules-Scores: X-IBM-SpamModules-Versions: BY=3.00006097; HX=3.00000240; KW=3.00000007; PH=3.00000004; SC=3.00000189; SDB=6.00782168; UDB=6.00377398; IPR=6.00559653; BA=6.00004889; NDR=6.00000001; ZLA=6.00000005; ZF=6.00000009; ZB=6.00000000; ZP=6.00000000; ZH=6.00000000; ZU=6.00000002; MB=3.00013365; XFM=3.00000011; UTC=2016-11-18 01:30:42 X-IBM-AV-DETECTION: SAVI=unused REMOTE=unused XFE=unused x-cbparentid: 16111801-0025-0000-0000-0000463B22F3 Message-Id: <20161118013034.GA4269@localhost.localdomain> X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10432:,, definitions=2016-11-17_15:,, signatures=0 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 spamscore=0 suspectscore=1 malwarescore=0 phishscore=0 adultscore=0 bulkscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1609300000 definitions=main-1611180024 On Thu, Nov 17, 2016 at 10:33:25AM +0800, Han Pingtian wrote: > On Fri, Nov 11, 2016 at 08:34:00PM -0800, Bart Schaefer wrote: > > Noodling with something else and ... > > > > torch% name='foo[bar]' > > torch% echo ${name} > > foo[bar] > > torch% echo ${name+foo[bar]} > When I was trying this I got this strange result of 'url-quote-magic': > > % name=a;echo ${name:+foo[bar]} > zsh: no match > % > url-quote-magic:10: no match > % > url-quote-magic:10: no match > % > url-quote-magic:10: no match > % > url-quote-magic:10: no match > % = > url-quote-magic:10: no match > % == > url-quote-magic:10: no match > % === > url-quote-magic:10: no match > % ==== > url-quote-magic:10: no match > % ===== > > space and = cause the warning "url-quote-magic:10: no match". This only > can be triggered by running "name=a;echo ${name:+foo[bar]}" first. Never mind. This problem gone away after a recompilation.