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

Terminal output overlapping #47

Closed
gcorrall opened this issue Feb 29, 2024 · 1 comment
Closed

Terminal output overlapping #47

gcorrall opened this issue Feb 29, 2024 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@gcorrall
Copy link
Contributor

When printing data to the terminal (using the -t flag) the current line is written over the previous line. When the digits change in length, the line becomes a mixture of the current and previous lines. For example, note the "W)W)" and "Wattss" in the following line:

Total Power: 8.50 Watts (CPU: 8.50 W)W)    /\ 0.30 Wattss

I think the most straightforward way to address this would be to use an ANSI escape code to erase the current line (https://gist.github.com/fnky/458719343aabd01cfb17a3a4f7296797) - say, printing ANSI ESC[0K after printing the carriage return. Though of course there are several other ways this could be fixed.

@adelnoureddine adelnoureddine self-assigned this Feb 29, 2024
@adelnoureddine adelnoureddine added the bug Something isn't working label Feb 29, 2024
@adelnoureddine
Copy link
Member

Fixed in commit 4661fcc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants