column(1): add tests and -l flag
column(1): add tests
Reviewed by: des
Approved by: des (mentor)
Differential Revision: https://reviews.freebsd.org/D49911
(cherry picked from commit 6f2b1b56ac3dd154bd98f5a7ea075abcb4356560)
column(1): add -l flag
the '-l <tblcols>' flag limits the number of columns that column(1) will
produce in -t mode. this is syntax-compatible with the same option in
util-linux's column(1), but due to existing differences between the two
implementations, it's not semantically compatible.
as a side-effect, fix a pre-existing bug where empty fields could cause
incorrect output:
% echo ':' | column -ts:
(null)
while here, also fix a couple of minor existing issues.
Reviewed by: des
Approved by: des (mentor)
Differential Revision: https://reviews.freebsd.org/D50290
(cherry picked from commit 313713b24c6d2a3061972c4f431515c4f1b01c77)