You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The -c option in the linux-utils version of column lets you control the output width of the table -- good for clipping at a certain length or dynamically using tput cols.
From column --help: -c, --output-width <width> width of output in number of characters
However piping the table to something like cut -c 1-$(tput cols) causes overtrim because the control characters aren't interpreted as 0 width characters (I think), i.e. \e[41m is counted as 6 characters instead of 0 and your line ends up 6 characters short of what it's supposed to be.
I can't really find a good alternative for this clipping behavior with colors and I figure since it existed in the original someone might be willing to implement it here. I would submit a pull request myself but I've never used pearl.
The text was updated successfully, but these errors were encountered:
The
-c
option in thelinux-utils
version ofcolumn
lets you control the output width of the table -- good for clipping at a certain length or dynamically usingtput cols
.However piping the table to something like
cut -c 1-$(tput cols)
causes overtrim because the control characters aren't interpreted as 0 width characters (I think), i.e.\e[41m
is counted as 6 characters instead of 0 and your line ends up 6 characters short of what it's supposed to be.I can't really find a good alternative for this clipping behavior with colors and I figure since it existed in the original someone might be willing to implement it here. I would submit a pull request myself but I've never used pearl.
The text was updated successfully, but these errors were encountered: