From 6dc6eb7128853eea74dfd2b2b8245d76f87b5843 Mon Sep 17 00:00:00 2001 From: Stephanos Ioannidis Date: Fri, 29 May 2020 12:34:12 +0900 Subject: [PATCH] readline: Assume "unknown" terminal type by default This patch modifies the `_rl_init_terminal_io` function to pass `unknown` terminal type instead of `dumb` when no terminal name is provided by the caller (e.g. when the `TERM` environment variable is not set on Win32). This ensures that the termcap provider (e.g. ncurses) resolves the default preferred terminal type instead of using the `dumb` terminal type. Signed-off-by: Stephanos Ioannidis --- readline/readline/terminal.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/readline/readline/terminal.c b/readline/readline/terminal.c index e5573897762e..086211d40897 100644 --- a/readline/readline/terminal.c +++ b/readline/readline/terminal.c @@ -444,7 +444,7 @@ _rl_init_terminal_io (const char *terminal_name) tty = rl_instream ? fileno (rl_instream) : 0; if (term == 0) - term = "dumb"; + term = "unknown"; #ifdef __MSDOS__ _rl_term_im = _rl_term_ei = _rl_term_ic = _rl_term_IC = (char *)NULL;