Basic support of remembering correct passwords is implemented.

This commit is contained in:
Oleksandr Kozachuk
2022-12-17 21:29:59 +01:00
parent 573567928c
commit 1234c79db1
3 changed files with 67 additions and 8 deletions
+8
View File
@@ -16,6 +16,12 @@ lazy_static! {
_ => home_dir().unwrap().join(".lesskeyrc").into_boxed_path(),
}
};
pub static ref CORRECT_FILE: Box<Path> = {
match std::env::var("LESSKEY_INIT") {
Ok(v) => Path::new(shellexpand::full(&v).unwrap().into_owned().as_str()).to_path_buf().into_boxed_path(),
_ => home_dir().unwrap().join(".lesskey_correct").into_boxed_path(),
}
};
}
#[derive(thiserror::Error, Debug, PartialEq)]
@@ -37,6 +43,8 @@ pub enum Command<'a> {
Enc(Name),
Pass(Name),
UnPass(Name),
Correct(Name),
Uncorrect(Name),
PasteBuffer(String),
Source(String),
Comment(Name, Comment),