From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 23192 invoked by alias); 30 Jan 2012 22:28:07 -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: 30165 Received: (qmail 14298 invoked from network); 30 Jan 2012 22:28:05 -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.9 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS autolearn=ham version=3.3.2 Received-SPF: none (ns1.primenet.com.au: domain at bewatermyfriend.org does not designate permitted sender hosts) From: Frank Terbeck To: Felipe Contreras Cc: zsh-workers@zsh.org Subject: Re: Bug with sh emulation; shouldn't KSH_TYPESET be set? In-Reply-To: (Felipe Contreras's message of "Mon, 30 Jan 2012 23:46:46 +0200") References: <878vkoapkq.fsf@ft.bewatermyfriend.org> User-Agent: Gnus/5.110018 (No Gnus v0.18) Emacs/24.0.91 (gnu/linux) Date: Mon, 30 Jan 2012 23:17:11 +0100 Message-ID: <87y5so96oo.fsf@ft.bewatermyfriend.org> MIME-Version: 1.0 Content-Type: text/plain X-Df-Sender: [pbs]MDExNTM1 Felipe Contreras wrote: > Frank Terbeck 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. Regards, Frank -- 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