I'm colorizing the header of a table formatted with column -ts $'\t'
Works well without color codes, but when I add color codes to the first line column
doesn't properly align the output.
Without colored output it works as expected:
printf "1\t2\t3\nasdasdasdasdasdasdasd\tqwe\tqweqwe\n" | column -ts $'\t'
But when adding color on the first line column doesn't align the text of the colored row:
printf "\e[7m1\t2\t3\e[0m\nasdasdasdasdasdasdasd\tqwe\tqweqwe\n" | column -ts $'\t'
Observed this behaviour both on Ubuntu Linux and Mac OS X.
column
– Niklas Berglund Dec 27 '15 at 10:33column
command removes it. – terdon Dec 27 '15 at 10:34column
because some columns are of dynamic width. Nice idea to add colors after usingcolumn
– Niklas Berglund Dec 27 '15 at 14:26