Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

formatter: format output correctly when text contains ANSI escape codes #205

Open
fho opened this issue Oct 6, 2020 · 0 comments
Open
Labels
enhancement New feature or request

Comments

@fho
Copy link
Collaborator

fho commented Oct 6, 2020

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.

@fho fho added the enhancement New feature or request label Oct 6, 2020
@nocive nocive changed the title formatter: format output correctly when text contains ANSCI escape codes formatter: format output correctly when text contains ANSI escape codes Jan 26, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Development

No branches or pull requests

1 participant