From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 3358 invoked by alias); 30 Jan 2012 22:15:11 -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: 30163 Received: (qmail 4500 invoked from network); 30 Jan 2012 22:15:10 -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.215.43 as permitted sender) Received-SPF: pass (google.com: domain of felipe.contreras@gmail.com designates 10.152.131.40 as permitted sender) client-ip=10.152.131.40; Authentication-Results: mr.google.com; spf=pass (google.com: domain of felipe.contreras@gmail.com designates 10.152.131.40 as permitted sender) smtp.mail=felipe.contreras@gmail.com; dkim=pass header.i=felipe.contreras@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:content-transfer-encoding; bh=q5hfyoFshFAD0Uc8qWqPEHNj8QzJH50Pd8r19FUYVXE=; b=vcK/5z3Z8DixrSWpyrhcKESP8t+mklfam7iSMTiBnAE6H7k0wGLSCSXFewA/X6yNLC mZL2uEovZgYmL72cZRH18lvXrFdocFsUo61x7nN6FGnZhYX6SPP4bxyhGUX5p3c9AhEX OOqzd2U/yjP4kJSFGgrxNzqJouULF6WIuQwSY= MIME-Version: 1.0 In-Reply-To: References: Date: Tue, 31 Jan 2012 00:15:05 +0200 Message-ID: Subject: Re: Bug with bash emulation regarding ':' From: Felipe Contreras To: Mikael Magnusson Cc: "Benjamin R. Haskell" , zsh-workers@zsh.org, Felipe Contreras Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Sun, Jan 29, 2012 at 4:25 PM, Mikael Magnusson wrote= : > On 29 January 2012 14:44, Felipe Contreras w= rote: >> On Sun, Jan 29, 2012 at 7:31 AM, Benjamin R. Haskell wr= ote: >>> 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. =C2=A0csh will never be fully emulated. =C2=A0If 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, > =C2=A0 =C2=A0if (ch =3D=3D 'r') > =C2=A0 =C2=A0 =C2=A0 =C2=A0ch =3D zsh_name[1]; > > =C2=A0 =C2=A0/* Work out the new emulation mode */ > =C2=A0 =C2=A0if (ch =3D=3D 'c') > =C2=A0 =C2=A0 =C2=A0 =C2=A0emulation =3D EMULATE_CSH; > =C2=A0 =C2=A0else if (ch =3D=3D 'k') > =C2=A0 =C2=A0 =C2=A0 =C2=A0emulation =3D EMULATE_KSH; > =C2=A0 =C2=A0else if (ch =3D=3D 's' || ch =3D=3D 'b') > =C2=A0 =C2=A0 =C2=A0 =C2=A0emulation =3D EMULATE_SH; > =C2=A0 =C2=A0else > =C2=A0 =C2=A0 =C2=A0 =C2=A0emulation =3D 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. Cheers. --=20 Felipe Contreras