diff --git a/doc/unibi_from_term.pod b/doc/unibi_from_term.pod index f24ab81..bce0840 100644 --- a/doc/unibi_from_term.pod +++ b/doc/unibi_from_term.pod @@ -21,7 +21,8 @@ It looks in the following places: =item 1. If the environment variable C is set, it is interpreted as the name -of the directory to search. No other directory is used. +of the directory to search for local terminal definitions before checking in +the standard place. =item 2. diff --git a/uniutil.c b/uniutil.c index 2e266a7..b9e672c 100644 --- a/uniutil.c +++ b/uniutil.c @@ -183,7 +183,10 @@ unibi_term *unibi_from_term(const char *term) { } if ((env = getenv("TERMINFO"))) { - return from_dir(env, NULL, NULL, term); + ut = from_dir(env, NULL, NULL, term); + if (ut) { + return ut; + } } if ((env = getenv("HOME"))) {