progress-bar: issue Windows Terminal progress indicating ANSI sequences
authorLennart Poettering <lennart@poettering.net>
Tue, 29 Oct 2024 10:27:51 +0000 (11:27 +0100)
committerLennart Poettering <lennart@poettering.net>
Tue, 29 Oct 2024 14:54:08 +0000 (15:54 +0100)
commit07b869b9c1a9e63c6c4a1478bb2687a1103d6467
tree1c5213dbffec456d8779d2d4c4499be8d0a7ed6b
parentebc64de22f84f62dc48e5d16ec5d12ca82222b74
progress-bar: issue Windows Terminal progress indicating ANSI sequences

This generates the Windows Terminal OSC sequences indicating progress.
This let's the terminal know that we are doing a slow operation, and how
we are progressing.

Windows Terminal uses this in two ways: it shows a circle in the tab
that completes, and it highlights the progress in the task bar.

I found no Linux terminal that currently supports it, but also none that
didn't like it. Thankfully most terminals correctly ignore unrecognized
OSC sequences.

I think we should just merge this, and see if this trips up too many
people, but I have reason to believe this shouldn't be too bad.

And yes, I do work from Windows Terminal sometimes, ssh into my Linux
build systems, and it is really cute seeing the progress animation
there.
src/shared/pretty-print.c