[Toybox] [PATCH] cut: re-enable crunch_str on cut -C

Rob Landley rob at landley.net
Sun Oct 27 14:56:46 PDT 2019


On 10/25/19 1:14 AM, Jarno Mäkipää wrote:
> ping
> 
> While its not necessary to apply this patch I was hoping to rise some
> conversation. My point is that crunch_str() works correctly. It pushes
> 0 width combining chars to stdout even after colums==width. And reason
> it renders wrong is terminal clients fault. While there is no
> standard, the xterm terminal client that is closest thing to reference
> implementation works correctly. And if user just pipe outputs to file
> or program that can actually handle them, it would be right thing to
> not clip them in wrong place.
> 
> cut -C is toybox extension so it does not matter how it works, but if
> it would work correctly it could be used to test other commands maybe?

Oh sure. (Caught up enough to apply it before I saw this. :)

I'm glad somebody's looking into this. I'm just grumbling that it's one of my
unbounded todo items: gotta audit all the callers. (And it is totally
unnecessary work, if just they'd done it the _other_ way it would have been
elegant. Or at least efficient and deterministic.)

Rob



More information about the Toybox mailing list