From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 7072 invoked by alias); 8 Jan 2011 02:33:10 -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: 28596 Received: (qmail 1049 invoked from network); 8 Jan 2011 02:33:09 -0000 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on f.primenet.com.au X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE autolearn=ham version=3.3.1 Received-SPF: none (ns1.primenet.com.au: domain at closedmail.com does not designate permitted sender hosts) From: Bart Schaefer Message-id: <110107183257.ZM674@torch.brasslantern.com> Date: Fri, 07 Jan 2011 18:32:57 -0800 In-reply-to: <110107181708.ZM628@torch.brasslantern.com> Comments: In reply to Bart Schaefer "Re: exec -a and parameter expansion" (Jan 7, 6:17pm) References: <8739p4wekt.fsf@gmail.com> <20110107225616.GA99800@redoubt.spodhuis.org> <110107181708.ZM628@torch.brasslantern.com> X-Mailer: OpenZMail Classic (0.9.2 24April2005) To: zsh-workers@zsh.org Subject: Re: exec -a and parameter expansion MIME-version: 1.0 Content-type: text/plain; charset=us-ascii On Jan 7, 6:17pm, Bart Schaefer wrote: } Subject: Re: exec -a and parameter expansion } } So either there are some missing test cases for other things that } this would cause to break, or we should rearrange execcmd() so that } "typeset" is the only special-cased builtin ahead of prefork(). The question, I guess, is whether/how this is supposed to work: dash_p="-p" command $dash_p echo "what path did I search?" dash_a="-a" exec $dash_a $OSTYPE echo "what did I exec?" Currently options of special builtins must only appear literally, and both of the above would report "command not found" (unless by some odd chance you do have commands named "-p" and "-a"). If we follow bash's example, we should indeed be performing prefork() a lot earlier in the handling of those special builtins, but I'm not sure about the ones that are supposed to be true parser keywords.