-
Notifications
You must be signed in to change notification settings - Fork 2.9k
Use ANSI codes to report progress #11432
Copy link
Copy link
Closed
Labels
A-console-outputArea: Terminal output, colors, progress bar, etc.Area: Terminal output, colors, progress bar, etc.C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-infoStatus: Needs more info, such as a reproduction or more background for a feature request.Status: Needs more info, such as a reproduction or more background for a feature request.
Metadata
Metadata
Assignees
Labels
A-console-outputArea: Terminal output, colors, progress bar, etc.Area: Terminal output, colors, progress bar, etc.C-feature-requestCategory: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`Category: proposal for a feature. Before PR, ping rust-lang/cargo if this is not `Feature accepted`S-needs-infoStatus: Needs more info, such as a reproduction or more background for a feature request.Status: Needs more info, such as a reproduction or more background for a feature request.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Problem
When the terminal is not in focus, there is no way to know the progress state of the compilation.
Proposed Solution
There exist escape codes that allow control of a "progress meter", that for example is shown on the taskbar in Windows.
Winget uses them, and the implementation can be seen at https://github.com/microsoft/winget-cli/blob/master/src/AppInstallerCLICore/VTSupport.cpp. It mostly consists of adding the correct progress number, and clean up after the end.
Notes
I volunteer to make this change to this repo.