treat TERM "tmux" the same as "screen"

To the extent that fish special-cases TERM values relevant to the
`screen` program it should do the same for the `tmux` program.

Fixes #3512
This commit is contained in:
Kurtis Rader
2016-11-06 20:27:48 -08:00
parent 1155c4b413
commit 83c7931afb
2 changed files with 7 additions and 7 deletions

View File

@@ -668,20 +668,16 @@ void reader_write_title(const wcstring &cmd, bool reset_cursor_position) {
if (term_str.missing()) return;
const wchar_t *term = term_str.c_str();
bool recognized = false;
recognized = recognized || contains(term, L"xterm", L"screen", L"nxterm", L"rxvt");
bool recognized = contains(term, L"xterm", L"screen", L"tmux", L"nxterm", L"rxvt");
recognized = recognized || !wcsncmp(term, L"xterm-", wcslen(L"xterm-"));
recognized = recognized || !wcsncmp(term, L"screen-", wcslen(L"screen-"));
recognized = recognized || !wcsncmp(term, L"tmux-", wcslen(L"tmux-"));
if (!recognized) {
char *n = ttyname(STDIN_FILENO);
if (contains(term, L"linux")) {
return;
}
if (contains(term, L"linux")) return;
if (contains(term, L"dumb")) return;
if (strstr(n, "tty") || strstr(n, "/vc/")) return;
}