Repository navigation
Display progress via OSC 9;4 escape codes. - #123
Conversation
3a16b4e to
e6da155
Compare
|
Would be nice to get this into 8.1, anybody up for a review? |
|
I briefly looked at this when you first put it up and was wondering why this couldn't be collected in a single, separate |
I think so. pytest, systemd and other tools are adding it, so why not 🤷♂️ |
It's escape codes, so it needs a TTY, that's why it's inside a console, where we are printing other escape codes already as well. And it's inside the
I find it quite useful. |
Ah, can this easily be lifted into the Console one? I understood this more as having a terminal window in the background or in a separate tab and then the taskbar or the tab list shows the progress indication. For these compact vs normal should not matter. |
Yes, it can. |
e6da155 to
0abdbde
Compare
Ok, this lets me re-consider the default-on approach. Seems potentially annoying, also given that we have two examples now where older terminal versions trigger notifications instead; there may be further ones too then. So I pushed an update that adds a new command-line option and environment variable to enable. I've switched to an output handler now as well, as that indeed works pretty well with the opt-in approach. See what you guys think. |
0abdbde to
b8884cf
Compare
When running with `-P`/`----progress-bar` and the console is a TTY, btest now now signals test progress via OSC 9;4 escape codes.[^1] A number of terminal emulators support those these days, and those who don't should just be ignoring them.[^2] [^1] https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences [^2] However, older versions of iTerm2 and Kitty (and maybe others) are known to end up triggering notifications for these escape codes instead of showing a progress bar.
b8884cf to
ae4e6ad
Compare
The compact terminal output now signals test progress via OSC 9;4
escape codes.[^1] A number of terminal emulators support those these
days, and those who don't should just be ignoring them.[^2]
[^1] https://learn.microsoft.com/en-us/windows/terminal/tutorials/progress-bar-sequences
[^2] This comes with a work-around for older iTerm2 versions that,
rather than ignoring, would end up triggering notifications for these
escape codes instead of showing a progress bar.