diff options
Diffstat (limited to 'src/backends/dialog.rs')
-rw-r--r-- | src/backends/dialog.rs | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/backends/dialog.rs b/src/backends/dialog.rs index da17ad1..939b8f3 100644 --- a/src/backends/dialog.rs +++ b/src/backends/dialog.rs @@ -3,7 +3,7 @@ use std::process; -use crate::{Choice, Error, Input, Message, Question, Result}; +use crate::{Choice, Error, Input, Message, Password, Question, Result}; /// The `dialog` backend. /// @@ -135,6 +135,12 @@ impl super::Backend for Dialog { .map(|_| ()) } + fn show_password(&self, password: &Password) -> Result<Option<String>> { + let args = vec!["--passwordbox", &password.text]; + self.execute(args, vec![], &password.title) + .and_then(get_stderr) + } + fn show_question(&self, question: &Question) -> Result<Choice> { let args = vec!["--yesno", &question.text]; self.execute(args, vec![], &question.title) |