replace dialoguer with inquire

In order to reduce our dependencies, we are replacing the dependencies
that use console_rs with those that use crossterm.

This commit will completely replace dialoguer with inquire.

Signed-off-by: Perma Alesheikh <me@prma.dev>
This commit is contained in:
Perma Alesheikh
2024-05-06 15:49:58 +03:30
committed by Clément DOUIN
parent d54dd6429e
commit 1e448e56eb
17 changed files with 441 additions and 543 deletions
+5 -6
View File
@@ -1,15 +1,14 @@
use color_eyre::Result;
use dialoguer::Input;
use email::sendmail::config::SendmailConfig;
use inquire::Text;
use crate::{backend::config::BackendConfig, ui::THEME};
use crate::backend::config::BackendConfig;
pub(crate) fn configure() -> Result<BackendConfig> {
let config = SendmailConfig {
cmd: Input::with_theme(&*THEME)
.with_prompt("Sendmail-compatible shell command to send emails")
.default(String::from("/usr/bin/msmtp"))
.interact()?
cmd: Text::new("Sendmail-compatible shell command to send emails")
.with_default("/usr/bin/msmtp")
.prompt()?
.into(),
};