From: Bart Schaefer <schaefer@brasslantern.com>
To: "Zsh Hackers' List" <zsh-workers@sunsite.dk>
Subject: Re: Fw: Phil's prompt is not working when LANG is set to UTF-8
Date: Sat, 16 Feb 2008 11:13:35 -0800 [thread overview]
Message-ID: <080216111335.ZM17124@torch.brasslantern.com> (raw)
In-Reply-To: <20080215235241.2f255730@pws-pc>
On Feb 15, 11:52pm, Peter Stephenson wrote:
}
} - Hence it falls foul of the multibyte tests. In principle it
} might clash with a UTF-8 character anyway and have the wrong
} width, so assuming a width 1 for an unknown character is not
} necessarily better than assuming width 0.
I agree with "not necessarily," but I suspect it'll be right more
often than wrong to assume 1. *Most* characters are not going to be
"non-printing," and if the mb library doesn't recognize them, then
they're also unlikely to be simultaneously multibyte and handled
correctly by the terminal.
I'll bet I argued this the other way when this came up the last time,
but now we have some empirical results.
} How about the following tweak to prompts to support this? The upshot
} is that you include any funny characters in %{...%G%} where the %G for
} `glitch' (which may be repeated or take a numeric argument) indicates
} a screen cell taken up by the sequence.
I like this, but I'm wondering if it might not be better to have %{
accept a count, e.g., instead of %{...%6G%} just write %6{...%}. Does
it matter where %G appears? %{...%7G...%} ? What if you use it more
than once, as in %{...%7G...%3G%} ? Using a count on %{ might make it
more obvious that you should write %7{...%}%3{...%} if %7G%3G != %10G.
next prev parent reply other threads:[~2008-02-16 19:13 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-02-15 23:52 Peter Stephenson
2008-02-16 7:56 ` Andrey Borzenkov
2008-02-16 8:50 ` Wael Nasreddine
2008-02-16 9:00 ` Bart Schaefer
2008-02-16 19:13 ` Bart Schaefer [this message]
2008-02-16 19:32 ` Bart Schaefer
2008-02-17 16:43 ` Peter Stephenson
2008-02-17 17:40 ` Peter Stephenson
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=080216111335.ZM17124@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).