Skip to content

Commit 9790460

Browse files
committed
Add /etc/terminfo to the terminfo search paths
1 parent 2543177 commit 9790460

File tree

1 file changed

+6
-4
lines changed

1 file changed

+6
-4
lines changed

src/libterm/terminfo/searcher.rs

+6-4
Original file line numberDiff line numberDiff line change
@@ -42,12 +42,14 @@ pub fn get_dbpath_for_term(term: &str) -> Option<~Path> {
4242
dirs_to_search.push(Path::new(i.to_owned()));
4343
}
4444
},
45-
// Found nothing, use the default paths
46-
// /usr/share/terminfo is the de facto location, but it seems
47-
// Ubuntu puts it in /lib/terminfo
45+
// Found nothing in TERMINFO_DIRS, use the default paths:
46+
// According to /etc/terminfo/README, after looking at
47+
// ~/.terminfo, ncurses will search /etc/terminfo, then
48+
// /lib/terminfo, and eventually /usr/share/terminfo.
4849
None => {
49-
dirs_to_search.push(Path::new("/usr/share/terminfo"));
50+
dirs_to_search.push(Path::new("/etc/terminfo"));
5051
dirs_to_search.push(Path::new("/lib/terminfo"));
52+
dirs_to_search.push(Path::new("/usr/share/terminfo"));
5153
}
5254
}
5355
}

0 commit comments

Comments
 (0)