Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
(m)-flag for boundary cases
- X-seq: zsh-workers 40870
- From: Sebastian Gniazdowski <psprint3@xxxxxxxxxxxx>
- To: zsh-workers@xxxxxxx
- Subject: (m)-flag for boundary cases
- Date: Mon, 20 Mar 2017 07:33:45 -0700
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=fastmail.com; h= content-transfer-encoding:content-type:date:from:message-id :mime-version:subject:to:x-me-sender:x-me-sender:x-sasl-enc; s= fm1; bh=Q+vbHe/FCvHvNiw2TaxePqL7i1tXj3R1vt3N5grrSpw=; b=lw7Mu6I1 YJqhThfh7c6WYKY8ZDzYe6Y9iep+coga7QGs13b9yDtYfC/XBGVC8EAnOjbmLHYn T83HUJm4VY9Rfj2djQycxvGcHUr+A4IycFGo+OytaeknOQYiAZGN5J0h9AMEYgZ5 t9Dj9qxP27dpAKCwhch+Qynn+Ee0nS8dghnQ90hEdhfCXHTnpsXWKmitT3Usp6Us KH0YmFG8pDBUqT0akKRzptOcA3x0mdCwzoPSfNPC0bqoFcHPWWN042HiZavDPGOC 1/RVo/Wjv/goPqTHuPgwPlxpLyaJ5t87iDxvV3kyfvhjc9faALpPUN73RBjHCefG 3ew4zRTLdgkWdg==
- Dkim-signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=content-transfer-encoding:content-type :date:from:message-id:mime-version:subject:to:x-me-sender :x-me-sender:x-sasl-enc; s=fm1; bh=Q+vbHe/FCvHvNiw2TaxePqL7i1tXj 3R1vt3N5grrSpw=; b=ESpnz4xioo9OH0y1RDnyCe6hTMNjUixGojXBOiD7WFw+l F2K+jVxGzmGiDvy9pBYWvi9LRdMMoVERDwsyKSeetNd1wQ8gADzzBa95erm3Pv8Y D7O6QlCedHCDvbnwTDNfuQC99s1Wh2qzENzPFynrTDEbbvdeyjVSLDqLiXQzzaYs f6MeeN9wX+3IKKztvzW3E8B+XX8kaxp/EPXxTC414Q5IgSFlc4mkrZCYiC8lIfPX awodZzBYOjs6A55TdWTsBQ3a2QBkw34D//VLCncqheINcwAb20yKv449xRBbDPnD dBesOb/bkgqU1XkYrWymgQ4tLDSOv9sJ973PdUnXQ==
- List-help: <mailto:zsh-workers-help@zsh.org>
- List-id: Zsh Workers List <zsh-workers.zsh.org>
- List-post: <mailto:zsh-workers@zsh.org>
- Mailing-list: contact zsh-workers-help@xxxxxxx; run by ezmlm
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@xxxxxxxxxxxx
Messages sorted by:
Reverse Date,
Date,
Thread,
Author