]> git.ipfire.org Git - thirdparty/util-linux.git/commit
column: don't ignore space-char separators at begin of the line
authorKarel Zak <kzak@redhat.com>
Mon, 12 Feb 2018 13:06:02 +0000 (14:06 +0100)
committerKarel Zak <kzak@redhat.com>
Mon, 12 Feb 2018 13:06:02 +0000 (14:06 +0100)
commit5c7b67fbbf41c973ca8d49b1e8bdba22dbb917aa
tree2134f0ddf1493eea13fff45649760876bf20eaf4
parent4365c8107f68a2af518a9c26bb5f64f780d54eed
column: don't ignore space-char separators at begin of the line

Non-space separator:

$ echo -e ",col1,col2\nrow,1,2" | column -t -s ","  --table-columns A,B,C
A    B     C
     col1  col2
row  1     2

Space-char (\t) separator:

$ echo -e "\tcol1\tcol2\nrow\t1\t2" | column -t -s "$(echo -e '\t')"  --table-columns A,B,C
A     B     C
col1  col2
row   1     2

Fixed version:

$ echo -e "\tcol1\tcol2\nrow\t1\t2" | column -t -s "$(echo -e '\t')"  --table-columns A,B,C
A    B     C
     col1  col2
row  1     2

Addresses: https://github.com/karelzak/util-linux/issues/575
Signed-off-by: Karel Zak <kzak@redhat.com>
text-utils/column.c