about summary refs log tree commit diff
path: root/src/libterm
diff options
context:
space:
mode:
authorVirgile Andreani <virgile.andreani@anbuco.fr>2014-03-02 21:40:43 +0100
committerVirgile Andreani <virgile.andreani@anbuco.fr>2014-03-02 22:31:11 +0100
commit979046044f1beda3e81070de6504c0e7ec09f11a (patch)
tree82cd44ac4da3f701d59dedaea514077c6b0ff4a6 /src/libterm
parent25431774a933a3b0c5212ea45150660544dec1ec (diff)
downloadrust-979046044f1beda3e81070de6504c0e7ec09f11a.tar.gz
rust-979046044f1beda3e81070de6504c0e7ec09f11a.zip
Add /etc/terminfo to the terminfo search paths
Diffstat (limited to 'src/libterm')
-rw-r--r--src/libterm/terminfo/searcher.rs10
1 files changed, 6 insertions, 4 deletions
diff --git a/src/libterm/terminfo/searcher.rs b/src/libterm/terminfo/searcher.rs
index 5b536d9aafa..ef522da5e8c 100644
--- a/src/libterm/terminfo/searcher.rs
+++ b/src/libterm/terminfo/searcher.rs
@@ -42,12 +42,14 @@ pub fn get_dbpath_for_term(term: &str) -> Option<~Path> {
                         dirs_to_search.push(Path::new(i.to_owned()));
                     }
                 },
-                // Found nothing, use the default paths
-                // /usr/share/terminfo is the de facto location, but it seems
-                // Ubuntu puts it in /lib/terminfo
+                // Found nothing in TERMINFO_DIRS, use the default paths:
+                // According to  /etc/terminfo/README, after looking at
+                // ~/.terminfo, ncurses will search /etc/terminfo, then
+                // /lib/terminfo, and eventually /usr/share/terminfo.
                 None => {
-                    dirs_to_search.push(Path::new("/usr/share/terminfo"));
+                    dirs_to_search.push(Path::new("/etc/terminfo"));
                     dirs_to_search.push(Path::new("/lib/terminfo"));
+                    dirs_to_search.push(Path::new("/usr/share/terminfo"));
                 }
             }
         }