mirror of
https://github.com/fish-shell/fish-shell.git
synced 2025-02-21 00:10:41 +08:00
Use the $TERM value from fish's computed environment for ncurses setup
Previously, the process's inherited $TERM value would be used. This prevented users from being able to set $TERM in their config.fish files. To make matters worse, the error message would print the computed $TERM value, giving the mistaken impression that it was being used. Signed-off-by: David Adam <zanchey@ucc.gu.uwa.edu.au>
This commit is contained in:
parent
7f28acc5ed
commit
c5bc221b27
@ -466,7 +466,7 @@ int input_init()
|
||||
|
||||
const env_var_t term = env_get_string(L"TERM");
|
||||
int errret;
|
||||
if (setupterm(0, STDOUT_FILENO, &errret) == ERR)
|
||||
if (setupterm(const_cast<char *>(wcs2string(term).c_str()), STDOUT_FILENO, &errret) == ERR)
|
||||
{
|
||||
debug(0, _(L"Could not set up terminal"));
|
||||
if (errret == 0)
|
||||
|
Loading…
x
Reference in New Issue
Block a user