Issue with column command and color escape codes
10
votes
3
answers
4126
views
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.
Asked by Niklas Berglund
(235 rep)
Dec 27, 2015, 09:23 AM
Last activity: Feb 22, 2024, 03:49 PM
Last activity: Feb 22, 2024, 03:49 PM