Open aquilax opened 2 years ago
You need to specify output width. For backward compatibility column(1) always calculates output according to terminal width or it defaults to 80 chars.
$ cat ~/test.txt | ./column --output-width 120 -t -s, -R 2,3,4,5,6,7 > a; cat a;
Date 2021-11-01 2021-12-01 2022-01-01 2022-02-01 2022-03-01
Row1 0 0 0 0 0
VeryLongDescriptionRow2 0 6000 6000 6000 0
In the other tools, we have the default "as much as necessary" for the non-interative mode. It would be nice to have any special placeholder for this purpose in column(1), something like "--output-width unlimited". Let's add this to TODO.
The following example:
In interactive shell produces correctly aligned table:
But when piped through
less
, the values in the last column after the first row are indented incorrectlyTested with the the current master: