zsh-workers
 help / color / mirror / code / Atom feed
From: Bart Schaefer <schaefer@brasslantern.com>
To: zsh-workers@sunsite.dk
Subject: Re: printf %s in UTF-8 is not POSIX-compliant
Date: Thu, 06 Mar 2008 09:09:01 -0800	[thread overview]
Message-ID: <080306090901.ZM21797@torch.brasslantern.com> (raw)
In-Reply-To: <200803051041.m25AfmUc031042@news01.csr.com>

On Mar 5, 10:41am, Peter Stephenson wrote:
}
} Is it time to introduce a separate "bash" emulation (meaning smart,
} interactive shell not necessarily 100% POSIX compatible) and
} document that "sh" emulation is aimed at POSIX compatibility?

After reading some of the more recent posts on this thread, I've got
an opinion on this.

I think "emulate sh" should emulate the POSIX shell to the greatest
extent possible.  If that means turning off MULTIBYTE, turn it off.
(Of course there are still subtle differences between starting the
shell as "sh" and running "emulate sh" after it has started.  There
probably isn't any way to entirely resolve that.)

However, if "emulate bash" is going to mean something other than a
synonym for "sh", then some effort should be put into being a bit
closer to bash than it's currently possible to be.  For example,
at least set the various BASH_* options, the way "emulate csh" sets
the smattering of CSH_* options.

Of course "emulate bash" isn't even in the documentation at present.
(The "Compatibilty" section referenced from the "emulate" command
doesn't discuss csh, either, even though the "emulate" doc does list
csh among the possible arguments.)

A final thought on MULTIBYTE:  Is it perhaps reasonable to split this
into two options, one that affects line editor operations and one that
affects internals?  If someone does "emulate sh; setopt zle" it seems
there might be some expectation that ZLE can adapt to a terminal that
displays multibyte even if the input is all treated as raw bytes once
accept-line hands it off.  That might mean that e.g. _main_complete
needs to look at the state of ZLE_MULTIBYTE (or whatever) and setopt
MULTIBYTE locally to correspond.  Other widgets could also be affected,
so the emphasis here is on "reasonable."

(Possible workaround:  setopt MULTIBYTE in zle_line_init and unset it
again in preexec.)


  parent reply	other threads:[~2008-03-06 17:13 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-03-04  1:29 Vincent Lefevre
2008-03-04  1:37 ` Vincent Lefevre
2008-03-04  9:40 ` Peter Stephenson
2008-03-05  0:27   ` Vincent Lefevre
2008-03-05  1:34     ` Bart Schaefer
2008-03-06  1:27       ` Vincent Lefevre
2008-03-05 10:41     ` Peter Stephenson
2008-03-06  1:39       ` Vincent Lefevre
2008-03-06  9:46         ` Peter Stephenson
2008-03-06 17:09       ` Bart Schaefer [this message]
2008-03-06 17:45         ` Peter Stephenson
2008-03-07  2:29           ` Bart Schaefer

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=080306090901.ZM21797@torch.brasslantern.com \
    --to=schaefer@brasslantern.com \
    --cc=zsh-workers@sunsite.dk \
    /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).