mirror of
https://github.com/fish-shell/fish-shell
synced 2025-01-13 05:28:49 +00:00
Fix to stop identifying SnowLeopard's terminal as term256
This commit is contained in:
parent
10aa107380
commit
93f6aabe12
1 changed files with 9 additions and 2 deletions
11
input.cpp
11
input.cpp
|
@ -316,9 +316,16 @@ void update_fish_term256(void)
|
|||
env_var_t term = env_get_string(L"TERM");
|
||||
if (term.missing()) {
|
||||
support_term256 = false;
|
||||
} else if (term.find(L"256color") != wcstring::npos) {
|
||||
/* Explicitly supported */
|
||||
support_term256 = true;
|
||||
} else if (term.find(L"xterm") != wcstring::npos) {
|
||||
// assume that all xterms are 256, except for OS X SnowLeopard
|
||||
env_var_t prog = env_get_string(L"TERM_PROGRAM");
|
||||
support_term256 = (prog != L"Apple_Terminal");
|
||||
} else {
|
||||
// assume that all xterms are 256
|
||||
support_term256 = (term.find(L"256color") != wcstring::npos || term.find(L"xterm") != wcstring::npos);
|
||||
// Don't know, default to false
|
||||
support_term256 = false;
|
||||
}
|
||||
}
|
||||
output_set_supports_term256(support_term256);
|
||||
|
|
Loading…
Reference in a new issue