From: Mikael Magnusson <mikachu@gmail.com>
To: Peter Stephenson <p.w.stephenson@ntlworld.com>
Cc: zsh-workers@zsh.org
Subject: Re: Bug with bash emulation regarding ':'
Date: Sun, 29 Jan 2012 22:05:12 +0100 [thread overview]
Message-ID: <CAHYJk3SPJgzywAaL3qa0B+gHoF+z22faRG9tWrjt-RReroOuaQ@mail.gmail.com> (raw)
In-Reply-To: <20120129203031.6ec592d2@pws-pc.ntlworld.com>
On 29 January 2012 21:30, Peter Stephenson <p.w.stephenson@ntlworld.com> wrote:
> On Sun, 29 Jan 2012 20:01:13 +0100
> Vincent Lefevre <vincent@vinc17.net> wrote:
>> On 2012-01-29 19:53:51 +0100, Mikael Magnusson wrote:
>> > On 29 January 2012 19:38, Vincent Lefevre <vincent@vinc17.net> wrote:
>> > > On 2012-01-29 15:25:13 +0100, Mikael Magnusson wrote:
>> > >> On 29 January 2012 14:44, Felipe Contreras <felipe.contreras@gmail.com> wrote:
>> > >> > emulate bash
>> > >>
>> > >> There's no such emulation mode.
>> > >
>> > > I think the problem is that "emulate" doesn't return an error
>> > > if the argument is unsupported.
>> >
>> > Well, there are no unsupported arguments, anything that isn't
>> > recognized is documented (although not accurately) to enter zsh mode
>> > :).
>>
>> Yes, but this is not intuitive. An error would be better, IMHO.
>
> emulate "bash" is treated as emulate "sh", but isn't so documented.
>
> However, having any random emulation treated as zsh in the emulate
> command seems a bit pointless. I think it only does that because the
> code is shared with what happens at shell start-up.
>
> How about the following compromise?
>
> - Behave the same at start-up as always. There's no point in an
> error here if we don't recognise what zsh is supposed to be emulating.
>
> - In the emulate command, keep the behaviour that we only test the
> initial letter (and that "b" is like "s"), but document it.
>
> - However, if the initial letter isn't recognised within the emulate
> command (i.e. we now require a 'z' for native mode), complain.
>
> This will annoy anyone who deliberately used "emulate native" to enter
> zsh mode (for which I have only limited sympathy), but unless I've
> missed something it should keep everyone else happy; indeed, the emulate
> command only lists the explicit possibilities "zsh", "sh", "ksh", "csh",
> but we did document that zsh was used as a default. Usually Bart spots
> something I've missed at this point, however.
I noticed that the 'Compatibility' section referred to only talks
about ksh and sh emulation, not csh, and it doesn't mention emulating
sh when the first letter is b either.
--
Mikael Magnusson
next prev parent reply other threads:[~2012-01-29 21:05 UTC|newest]
Thread overview: 29+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-01-29 2:46 Felipe Contreras
2012-01-29 5:31 ` Benjamin R. Haskell
2012-01-29 13:44 ` Felipe Contreras
2012-01-29 14:25 ` Mikael Magnusson
2012-01-29 14:27 ` Mikael Magnusson
2012-01-29 18:38 ` Vincent Lefevre
2012-01-29 18:53 ` Mikael Magnusson
2012-01-29 19:01 ` Vincent Lefevre
2012-01-29 20:30 ` Peter Stephenson
2012-01-29 21:05 ` Mikael Magnusson [this message]
2012-01-30 22:15 ` Felipe Contreras
2012-01-30 22:18 ` Mikael Magnusson
2012-01-29 18:36 ` Peter Stephenson
2012-02-01 4:29 ` Bart Schaefer
2012-02-01 16:29 ` Bart Schaefer
2012-02-05 20:11 ` Peter Stephenson
2012-02-05 21:21 ` Bart Schaefer
2012-02-10 21:04 ` Peter Stephenson
2012-02-11 21:08 ` Bart Schaefer
2012-02-12 20:29 ` Peter Stephenson
2012-02-14 17:41 ` Peter Stephenson
2012-02-14 23:30 ` Chet Ramey
2012-02-15 12:36 ` Peter Stephenson
2012-02-19 23:45 ` Bart Schaefer
2012-02-20 8:48 ` Bart Schaefer
2012-02-20 10:59 ` Peter Stephenson
2012-02-20 17:09 ` Bart Schaefer
2012-01-30 19:22 ` Felipe Contreras
2012-02-10 11:08 Jilles Tjoelker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=CAHYJk3SPJgzywAaL3qa0B+gHoF+z22faRG9tWrjt-RReroOuaQ@mail.gmail.com \
--to=mikachu@gmail.com \
--cc=p.w.stephenson@ntlworld.com \
--cc=zsh-workers@zsh.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/zsh/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).