From: Sebastian Gniazdowski <psprint3@fastmail.com>
To: zsh-workers@zsh.org
Subject: (m)-flag for boundary cases
Date: Mon, 20 Mar 2017 07:33:45 -0700 [thread overview]
Message-ID: <1490020425.2614066.917182456.0E56E387@webmail.messagingengine.com> (raw)
Hello,
% a="漢字"
% echo ${(mr:3::_:)a}
漢字
% echo ${(mr:2::_:)a}
漢
I think it would be better to trim first case down to single Asian
character, and display: 漢_. The point is that it gives predictable
width. Current version is occasionally 1 character too long.
I wonder how many people use (m)-flag. Never seen it mentioned here. I
think that nobody wants the off-by-1 behavior, and fixing it will not
break things, but make them automatically better, like for me – the flag
turned out to be a necessity and a solution, with acceptable off-by-1
problem, which will be automatically fixed by Zsh update. I've added
Asian characters support to ZUI via the flag, most important use case is
the (r) padding, but also good cooperation with (P) flag.
--
Sebastian Gniazdowski
psprint3@fastmail.com
next reply other threads:[~2017-03-20 14:33 UTC|newest]
Thread overview: 5+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-03-20 14:33 Sebastian Gniazdowski [this message]
2017-03-20 16:00 ` Sebastian Gniazdowski
2017-03-20 16:43 ` Bart Schaefer
2017-03-21 13:02 Sebastian Gniazdowski
2017-04-02 22:57 ` 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=1490020425.2614066.917182456.0E56E387@webmail.messagingengine.com \
--to=psprint3@fastmail.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).