From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 9400 invoked by alias); 30 Jan 2012 21:55:08 -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: 30162 Received: (qmail 15285 invoked from network); 30 Jan 2012 21:54:56 -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.112.25.106 as permitted sender) client-ip=10.112.25.106; Authentication-Results: mr.google.com; spf=pass (google.com: domain of felipe.contreras@gmail.com designates 10.112.25.106 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=4LAyBDCoGFg1eClXfvvbPNjwmZBqsiweTiM+HMPCGtM=; b=f1zUvqlPisO1YXzc0CEZlR7V0PtVUJKdk25uyjuipcbd8vicSLs25gex0nprEJwM+n t4YRc5jWv7L/EqvO3qyGOGLAVyaXrRUufak58Bob7zWV+M/f0X1dnrnSyGErVdXx7GW3 1LZtJ+t7a/5Qqpau1rkQ0RjmTGuVKSqqiVHjY= MIME-Version: 1.0 In-Reply-To: <878vkoapkq.fsf@ft.bewatermyfriend.org> References: <878vkoapkq.fsf@ft.bewatermyfriend.org> Date: Mon, 30 Jan 2012 23:46:46 +0200 Message-ID: Subject: Re: Bug with sh emulation; shouldn't KSH_TYPESET be set? From: Felipe Contreras To: Frank Terbeck Cc: zsh-workers@zsh.org, Felipe Contreras Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable On Mon, Jan 30, 2012 at 10:43 PM, Frank Terbeck wr= ote: > Felipe Contreras wrote: > [...] >> =C2=A0 =C2=A0 =C2=A0 local t=3D$(echo foo --bar) > [...] >> But not in zsh, with sh emulation. Enabling KSH_TYPESET makes it work. >> >> Shouldn't it be enabled with sh emulation? >> >> BTW. What exactly is 'emulate sh' supposed to emulate? I would like to >> run that shell to check for compatibility issues, and apparently it's >> not bash. > > "emulate sh" is POSIX shell emulation (we did amend this mode in the > past to work as much as possible as POSIX describes). Neither typeset > nor local are part of POSIX (at least not SUSv3 - I don't know about > v4). > > So, I don't think it should be enabled. But it wouldn't hurt either, right? It would be nice to have some 'bash' emulation mode, but since there isn't any, why not enable this harmless option? > FWIW, dash and posh behave like zsh's sh-mode here. Ksh93 doesn't work > at all, because it has no `local' (only typeset). Mksh, pdksh and bash > work like KSH_TYPESET was set in zsh. Hmm, I see, but there's no bash emulation mode =3D/ I guess it's time to compare the differences between ksh and sh emulation to see which is closer. --=20 Felipe Contreras