Add command unpass to forget saved password for a specific name.

This commit is contained in:
Oleksandr Kozachuk
2022-12-17 20:13:02 +01:00
parent 5ef5ef20ec
commit 573567928c
3 changed files with 7 additions and 0 deletions
+4
View File
@@ -314,6 +314,10 @@ impl<'a> LKEval<'a> {
}
}
},
Command::UnPass(name) => match self.state.borrow_mut().secrets.remove(name) {
Some(_) => out.push(format!("Removed saved password for {}", name)),
None => out.push(format!("error: saved password for {} not found", name)),
}
Command::Noop => (),
Command::Help => {
out.push("HELP".to_string());