Skip to content

Commit 8dc5ea2

Browse files
committed
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 <root@stephanos.io>
1 parent 76b05e9 commit 8dc5ea2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

readline/readline/terminal.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -444,7 +444,7 @@ _rl_init_terminal_io (const char *terminal_name)
444444
tty = rl_instream ? fileno (rl_instream) : 0;
445445

446446
if (term == 0)
447-
term = "dumb";
447+
term = "unknown";
448448

449449
#ifdef __MSDOS__
450450
_rl_term_im = _rl_term_ei = _rl_term_ic = _rl_term_IC = (char *)NULL;

0 commit comments

Comments
 (0)