Merge #9401 from justinmk/pr-win-erw7

This commit is contained in:
Justin M. Keyes
2018-12-30 23:54:23 +01:00
committed by GitHub
11 changed files with 838 additions and 60 deletions

View File

@@ -945,31 +945,6 @@ bool os_setenv_append_path(const char *fname)
return false;
}
/// Returns true if the terminal can be assumed to silently ignore unknown
/// control codes.
bool os_term_is_nice(void)
{
#if defined(__APPLE__) || defined(WIN32)
return true;
#else
const char *vte_version = os_getenv("VTE_VERSION");
if ((vte_version && atoi(vte_version) >= 3900)
|| os_getenv("KONSOLE_PROFILE_NAME")
|| os_getenv("KONSOLE_DBUS_SESSION")) {
return true;
}
const char *termprg = os_getenv("TERM_PROGRAM");
if (termprg && striequal(termprg, "iTerm.app")) {
return true;
}
const char *term = os_getenv("TERM");
if (term && strncmp(term, "rxvt", 4) == 0) {
return true;
}
return false;
#endif
}
/// Returns true if `sh` looks like it resolves to "cmd.exe".
bool os_shell_is_cmdexe(const char *sh)
FUNC_ATTR_NONNULL_ALL