diff options
author | Lennart Poettering <lennart@poettering.net> | 2015-01-07 23:02:08 +0100 |
---|---|---|
committer | Lennart Poettering <lennart@poettering.net> | 2015-01-07 23:44:08 +0100 |
commit | 3c4230a5afb27faec2176d4642c0e2e145971b5c (patch) | |
tree | 26a2d91f9d83661385be661106e96c9ff412012e | |
parent | 2efe2438fd65ddda79551f97bf85160e520d52d8 (diff) |
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.
-rw-r--r-- | src/shared/util.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/src/shared/util.c b/src/shared/util.c index 64059065d8..6293e967c8 100644 --- a/src/shared/util.c +++ b/src/shared/util.c @@ -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) { |