From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 15490 invoked by alias); 30 Jan 2012 22:48:42 -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: 30166 Received: (qmail 15732 invoked from network); 30 Jan 2012 22:48:31 -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=-1.6 required=5.0 tests=BAYES_00,DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,FREEMAIL_FROM,NML_ADSP_CUSTOM_MED,RCVD_IN_DNSWL_LOW, T_DKIM_INVALID autolearn=no version=3.3.2 Received-SPF: pass (ns1.primenet.com.au: SPF record at _spf.google.com designates 209.85.216.171 as permitted sender) Received-SPF: pass (google.com: domain of mikachu@gmail.com designates 10.224.188.209 as permitted sender) client-ip=10.224.188.209; Authentication-Results: mr.google.com; spf=pass (google.com: domain of mikachu@gmail.com designates 10.224.188.209 as permitted sender) smtp.mail=mikachu@gmail.com; dkim=pass header.i=mikachu@gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; bh=kWj31AEksB56x9ilW91l3t6sWPRVuMvDf8h3BWjp0Bs=; b=rSrwRj/jEqAfQ8p2uOY1wdtf0UAIwWxvMiEnorPYoSWxc54MffvR9ligs90655sFQn YgnakuM2HTv+VMC0iAYau0h1NeV9whE34V+VDaSm8keqWbEzz8+pD4H8HUGD5/F+uraI FzEuRKcBnRC1OnqIDEGL6SWAaCSRpzIGQSzto= MIME-Version: 1.0 In-Reply-To: References: Date: Mon, 30 Jan 2012 23:18:03 +0100 Message-ID: Subject: Re: Bug with bash emulation regarding ':' From: Mikael Magnusson To: Felipe Contreras Cc: "Benjamin R. Haskell" , zsh-workers@zsh.org Content-Type: text/plain; charset=UTF-8 On 30 January 2012 23:15, Felipe Contreras wrote: > On Sun, Jan 29, 2012 at 4:25 PM, Mikael Magnusson wrote: >> On 29 January 2012 14:44, Felipe Contreras wrote: >>> On Sun, Jan 29, 2012 at 7:31 AM, Benjamin R. Haskell wrote: >>>> On Sun, 29 Jan 2012, Felipe Contreras wrote: >>>>> Seems like there's a bug in bash emulation: >>>>> >>>>> [...] >>>>> >>>>> Zsh with bash emulation generates [...] >>>> >>>> >>>> When you say "bash emulation" what do you mean? >>> >>> emulate bash >> >> There's no such emulation mode. >> >> emulate [ -LR ] [ {zsh|sh|ksh|csh} [ -c arg ] ] >> With single argument set up zsh options to emulate the specified shell >> as much as possible. csh will never be fully emulated. If the >> argument is not one of the shells listed above, zsh will be used as a >> default >> >> This seems to not actually be true though, >> if (ch == 'r') >> ch = zsh_name[1]; >> >> /* Work out the new emulation mode */ >> if (ch == 'c') >> emulation = EMULATE_CSH; >> else if (ch == 'k') >> emulation = EMULATE_KSH; >> else if (ch == 's' || ch == 'b') >> emulation = EMULATE_SH; >> else >> emulation = EMULATE_ZSH; > > And to add more to the confusion: > > #define EMULATE_SH (1<<3) /* Bourne shell */ > > To me it looks like ksh is closer to bash than sh... perhaps it would > make more sense to map 'b' to ksh. Even better would be to just create > another separate emulation option to avoid the confusion. I'm not exactly sure what the point is here, are you perhaps confusing the bourne shell (sh) with the bourne again shell (bash)? -- Mikael Magnusson