baur
baur copied to clipboard
formatter: format output correctly when text contains ANSI escape codes
When the strings that are printed via the table.Formatter contain ANSI escape codes, like color sequences, the formatting is off.
The escape codes are counted as characters but are not shown on the terminal.
Replace the tabwriter with an implementation that ignores asci escape codes when calculating the column width.
This will allow to show color output in commands that currently aren't like baur status.