mirror of
https://github.com/systemd/systemd-stable.git
synced 2024-10-28 11:55:23 +03:00
util: upgrade default $TERM from vt102 to vt220 if we have no idea about the connected terminal
So far, if we had no knowledge about the correct $TERM we defaulted to v102, as a safe, conservative choice. However, the terminfo data for vt102 is not aware of pageup/pagedown, which makes "less" much harder work with than necessary. Setting vt220 allows them to work correctly. "vt220" should be a sufficiently safe choice too, given that xterm, gnome-terminal and the linux console all strive to implement vt220 as baseline, already to pass pageup/pagedown correctly to apps. Effectively, with this change "journalctl -e" run inside a "systemd-nspawn" terminal will now run a pager where pageup/pagedown works, which is quite an improvement of usability for containers.
This commit is contained in:
parent
2efe2438fd
commit
3c4230a5af
@ -4005,7 +4005,7 @@ bool tty_is_vc_resolve(const char *tty) {
|
||||
const char *default_term_for_tty(const char *tty) {
|
||||
assert(tty);
|
||||
|
||||
return tty_is_vc_resolve(tty) ? "TERM=linux" : "TERM=vt102";
|
||||
return tty_is_vc_resolve(tty) ? "TERM=linux" : "TERM=vt220";
|
||||
}
|
||||
|
||||
bool dirent_is_file(const struct dirent *de) {
|
||||
|
Loading…
Reference in New Issue
Block a user