Allow set the path to history and init file with env variables: LESSKEY_HISTORY and LESSKEY_INIT.

This commit is contained in:
Oleksandr Kozachuk
2022-12-17 20:05:57 +01:00
parent 982e3c3de3
commit 5ef5ef20ec
3 changed files with 16 additions and 6 deletions
+1 -1
View File
@@ -45,7 +45,7 @@ impl LKRead {
}
pub fn read(&mut self) -> LKEval {
let history_file = HISTORY_FILE.as_path().to_str().unwrap();
let history_file = HISTORY_FILE.to_str().unwrap();
self.rl.clear_history();
match self.rl.load_history(&history_file) {
Ok(_) => (),