From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 5518 invoked from network); 14 Nov 2003 16:23:27 -0000 Received: from sunsite.dk (130.225.247.90) by ns1.primenet.com.au with SMTP; 14 Nov 2003 16:23:27 -0000 Received: (qmail 6133 invoked by alias); 14 Nov 2003 16:23:08 -0000 Mailing-List: contact zsh-users-help@sunsite.dk; run by ezmlm Precedence: bulk X-No-Archive: yes X-Seq: 6773 Received: (qmail 6114 invoked from network); 14 Nov 2003 16:23:07 -0000 Received: from localhost (HELO sunsite.dk) (127.0.0.1) by localhost with SMTP; 14 Nov 2003 16:23:07 -0000 X-MessageWall-Score: 0 (sunsite.dk) Received: from [62.189.183.235] by sunsite.dk (MessageWall 1.0.8) with SMTP; 14 Nov 2003 16:23:6 -0000 Received: from EXCHANGE02.csr.com (unverified) by MAILSWEEPER01.csr.com (Content Technologies SMTPRS 4.3.10) with ESMTP id for ; Fri, 14 Nov 2003 16:23:05 +0000 Received: from csr.com ([192.168.144.127]) by EXCHANGE02.csr.com with Microsoft SMTPSVC(5.0.2195.5329); Fri, 14 Nov 2003 16:24:10 +0000 To: zsh-users@sunsite.dk Subject: Re: Completion function for bitkeeper? In-reply-to: "Bart Schaefer"'s message of "Fri, 14 Nov 2003 16:12:47 GMT." <1031114161247.ZM2353@candle.brasslantern.com> Date: Fri, 14 Nov 2003 16:23:02 +0000 Message-ID: <19332.1068826982@csr.com> From: Peter Stephenson X-OriginalArrivalTime: 14 Nov 2003 16:24:10.0087 (UTC) FILETIME=[BBB63770:01C3AACB] Bart Schaefer wrote: > Word splitting is vastly different in the two cases. It happens within > the words of $action in the second case, but does not in the first case. Oliver simplified a bit; there's an eval in the first case as well, which complicates the issue: elif [[ "$action" = \{*\} ]]; then # A string in braces is evaluated. while _next_label "$subc" expl "$descr"; do eval "$action[2,-2]" && ret=0 done (( ret )) && alwopt=${alwopt:-yes} tried=yes elif [[ "$action" = \ * ]]; then # If the action starts with a space, we just call it. eval "action=( $action )" while _next_label "$subc" expl "$descr"; do "$action[@]" && ret=0 done (( ret )) && alwopt=${alwopt:-yes} tried=yes -- Peter Stephenson Software Engineer CSR Ltd., Science Park, Milton Road, Cambridge, CB4 0WH, UK Tel: +44 (0)1223 692070 ********************************************************************** This email and any files transmitted with it are confidential and intended solely for the use of the individual or entity to whom they are addressed. If you have received this email in error please notify the system manager. This footnote also confirms that this email message has been swept by MIMEsweeper for the presence of computer viruses. www.mimesweeper.com **********************************************************************