Skip to content

Commit 51233c5

Browse files
committed
auto merge of #12656 : Armavica/rust/terminfo, r=sfackler
According to `/etc/terminfo/README`, ``` This directory is for system-local terminfo descriptions. By default, ncurses will search ${HOME}/.terminfo first, then /etc/terminfo (this directory), then /lib/terminfo, and last not least /usr/share/terminfo. ```
2 parents 2543177 + 9790460 commit 51233c5

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)