From abc1a45ea10509e3ad592f9eceb24d76e76d53ba Mon Sep 17 00:00:00 2001 From: Fabian Boehm Date: Fri, 13 Dec 2024 21:44:01 +0100 Subject: [PATCH] Shorten error for broken $TERM --- src/env_dispatch.rs | 9 ++------- 1 file changed, 2 insertions(+), 7 deletions(-) diff --git a/src/env_dispatch.rs b/src/env_dispatch.rs index 6a63b9bfe..cdebe860d 100644 --- a/src/env_dispatch.rs +++ b/src/env_dispatch.rs @@ -618,15 +618,10 @@ fn init_curses(vars: &EnvStack) { let term = vars.get_unless_empty(L!("TERM")).map(|v| v.as_string()); // We do not warn for xterm-256color at all, we know that one. if term != Some("xterm-256color".into()) { - FLOG!(warning, wgettext!("Could not set up terminal.")); if let Some(term) = term { - FLOG!(warning, wgettext!("TERM environment variable set to"), term); - FLOG!( - warning, - wgettext!("Check that this terminal type is supported on this system.") - ); + FLOG!(warning, wgettext_fmt!("Could not set up terminal for $TERM '%ls'", term)); } else { - FLOG!(warning, wgettext!("TERM environment variable not set.")); + FLOG!(warning, wgettext!("Could not set up terminal because $TERM is unset.")); } } }