]> git.ipfire.org Git - thirdparty/systemd.git/commitdiff
Use DCS sequence to query terminal name and set $TERM automatically (#37538)
authorMike Yuan <me@yhndnzj.com>
Thu, 29 May 2025 19:01:01 +0000 (21:01 +0200)
committerGitHub <noreply@github.com>
Thu, 29 May 2025 19:01:01 +0000 (21:01 +0200)
This code seems to work quickly and nicely for a bunch of modern
terminals. Setting $TERM automatically removes an common annoyance for
users. This code will not work for all terminal emulators, but by adding
it in systemd we'll entice maintainers of those terminals to add support
for the sequences. For the terminals that don't support the sequence, we
get a bit of a slowdown of `< 1 ms`, which seems hardly noticeable. The
user can always set TERM explicitly to avoid this if upgrading to a
newer terminal emulator is not possible.

Closes https://github.com/systemd/systemd/issues/36994.

1  2 
src/core/exec-invoke.c

Simple merge