Zsh Mailing List Archive
Messages sorted by:
Re: Bug with sh emulation; shouldn't KSH_TYPESET be set?
- X-seq: zsh-workers 30165
- From: Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx>
- To: Felipe Contreras <felipe.contreras@xxxxxxxxx>
- Subject: Re: Bug with sh emulation; shouldn't KSH_TYPESET be set?
- Date: Mon, 30 Jan 2012 23:17:11 +0100
- Cc: zsh-workers@xxxxxxx
- In-reply-to: <CAMP44s0Mji0OdU7K-ftazbwD2YYJzXzm1J1yEQOeWc0f2=zjMg@mail.gmail.com> (Felipe Contreras's message of "Mon, 30 Jan 2012 23:46:46 +0200")
- List-help: <mailto:email@example.com>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:firstname.lastname@example.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
- References: <CAMP44s1NhJXsT48qCHrpLGW2def_YcL1mXNWqu+ZD=oSBNFg4A@mail.gmail.com> <email@example.com> <CAMP44s0Mji0OdU7K-ftazbwD2YYJzXzm1J1yEQOeWc0f2=zjMg@mail.gmail.com>
Felipe Contreras wrote:
> Frank Terbeck <ft@xxxxxxxxxxxxxxxxxxx> wrote:
>> 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?
I'm unsure (personally, I wouldn't mind), as to whether the
argument-handling semantics of a random builtin can be changed with
POSIX in mind. Maybe someone with deeper understanding of the standard
can shed some light here.
I'd just do
local foo="$(bar --baz)"
and be done with it. That should be portable over pretty much every
bourne-line shell that supports $(...) and `local',
>> 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 =/
> I guess it's time to compare the differences between ksh and sh
> emulation to see which is closer.
Unsure, due to fairly limited knowledge of bash's extensions to POSIX.
In protocol design, perfection has been reached not when there is
nothing left to add, but when there is nothing left to take away.
-- RFC 1925
Messages sorted by: