FS#47240 - [util-linux] column -s X -t fails when there are colour escapes before X

Attached to Project: Arch Linux
Opened by Simon Kohlmeyer (voyd) - Wednesday, 02 December 2015, 20:28 GMT
Last edited by Dave Reisner (falconindy) - Saturday, 18 June 2016, 14:18 GMT
Task Type Bug Report
Category Upstream Bugs
Status Closed
Assigned To Dave Reisner (falconindy)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Disclaimer: I both reported the upstream bug and submitted the patch.

Upstream Bug: https://bugzilla.kernel.org/show_bug.cgi?id=108521

Description:
When invoking the column utility, the columnization doesn't work correctly when there are Control Sequences like color codes before the separator.

The upstream issue contains a patch, which I feel should be included in arch util-linux.

Additional info:
* util-linux-2.27.1-1


Steps to reproduce:
`
test='\033[33mb\033[mXFoo\n\033[33mbar\033[mXFoo'
echo -e $test
echo '=>'
echo -e $test | column -s X -t
`

Expected output (which is produced with test='bXFoo\nbarXFoo'):
bXFoo
barXFoo
=>
b Foo
bar Foo

Actual output:
bXFoo
barXFoo
=>
b Foo
bar Foo
This task depends upon

Closed by  Dave Reisner (falconindy)
Saturday, 18 June 2016, 14:18 GMT
Reason for closing:  Fixed
Additional comments about closing:  util-linux 2.28
Comment by Simon Kohlmeyer (voyd) - Thursday, 03 December 2015, 13:56 GMT
Looks like my patch doesn't really fix this =/
I've switched to another workaround in the meantime
Comment by Dave Reisner (falconindy) - Thursday, 03 December 2015, 13:57 GMT
bugzilla.kernel.org is not the correct upstream bug tracker. Rather, use: https://github.com/karelzak/util-linux/

Loading...