]> git.ipfire.org Git - thirdparty/util-linux.git/commit
column: fix outputing empty column at the end of line
authorYousong Zhou <yszhou4tech@gmail.com>
Mon, 29 Jul 2019 01:24:29 +0000 (01:24 +0000)
committerKarel Zak <kzak@redhat.com>
Mon, 29 Jul 2019 08:33:58 +0000 (10:33 +0200)
commit325bfd53e889fd52f240e4bcbd690b03dddc7570
tree743b7c742d84669da2758fef45350a8da7ee8d71
parent8bad603ae0a87f58cc79eb590a9fd7c68514009a
column: fix outputing empty column at the end of line

The following commands manifests the problem.  In old versions before
commit 4762ae9d60 ("column: use libsmartcols for --table"), both of them
should output with 2 "|"

echo '||'  | column -o '|' -s '|' -t
echo '|| ' | column -o '|' -s '|' -t

Fixes: 4762ae9d60 ("column: use libsmartcols for --table")
Signed-off-by: Yousong Zhou <zhouyousong@yunionyun.com>
Reviewed-by: Sami Kerola <kerolasa@iki.fi>
tests/expected/column/table-empty-column-at-eol [new file with mode: 0644]
tests/expected/column/table-empty-column-at-eol2 [new file with mode: 0644]
tests/ts/column/table
text-utils/column.c