diff options
author | David Adam <zanchey@ucc.gu.uwa.edu.au> | 2016-06-26 16:23:26 +0800 |
---|---|---|
committer | David Adam <zanchey@ucc.gu.uwa.edu.au> | 2016-06-26 16:24:01 +0800 |
commit | 0f3b4d2bd8e28281c876226b4e9c5e8f02c62872 (patch) | |
tree | 67364538b90e85cd5ab8ae4ad3a98f6fc540dcb7 | |
parent | ceee1ebfd9754363c6ea84982e455f0ff40fd25f (diff) |
Rewrite error messages for incorrect TERM
-rw-r--r-- | src/input.cpp | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/src/input.cpp b/src/input.cpp index 145e10e8..2155e485 100644 --- a/src/input.cpp +++ b/src/input.cpp @@ -343,21 +343,22 @@ int input_init() { int err_ret; if (setupterm(NULL, STDOUT_FILENO, &err_ret) == ERR) { + debug(0, _(L"Could not set up terminal")); env_var_t term = env_get_string(L"TERM"); if (term.missing_or_empty()) { - debug(0, _(L"Your TERM is unset or empty.")); + debug(0, _(L"TERM environment variable not set")); } else { - debug(0, _(L"Your TERM value of '%ls' is not valid"), term.c_str()); - debug(0, _(L"Check that your terminal type is supported on this system")); + debug(0, _(L"TERM environment variable set to '%ls'"), term.c_str()); + debug(0, _(L"Check that this terminal type is supported on this system")); } env_set(L"TERM", DEFAULT_TERM, ENV_GLOBAL | ENV_EXPORT); if (setupterm(NULL, STDOUT_FILENO, &err_ret) == ERR) { - debug(0, _(L"Unable to setup terminal using your TERM or the '%ls' fallback"), + debug(0, _(L"Could not set up terminal using the fallback terminal type '%ls' - exiting"), DEFAULT_TERM); exit_without_destructors(1); } else { - debug(0, _(L"Using fallback terminal type '%ls' instead"), DEFAULT_TERM); + debug(0, _(L"Using fallback terminal type '%ls'"), DEFAULT_TERM); } } |