From 896267959bc9e436d7c5d2ee0ff8c8c088fc7274 Mon Sep 17 00:00:00 2001 From: DanConwayDev Date: Thu, 7 Aug 2025 13:02:08 +0100 Subject: fix(send): PR cli output to keep the user informed of whats happening / happend --- src/lib/cli_interactor.rs | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) (limited to 'src/lib/cli_interactor.rs') diff --git a/src/lib/cli_interactor.rs b/src/lib/cli_interactor.rs index 8bcda19..e944bf9 100644 --- a/src/lib/cli_interactor.rs +++ b/src/lib/cli_interactor.rs @@ -1,5 +1,8 @@ use anyhow::{Context, Result}; -use dialoguer::{Confirm, Input, Password, theme::ColorfulTheme}; +use dialoguer::{ + Confirm, Input, Password, + theme::{ColorfulTheme, Theme}, +}; use indicatif::TermLike; #[cfg(test)] use mockall::*; @@ -323,6 +326,19 @@ where Ok(selected_choices) } +pub fn show_multi_input_prompt_success(label: &str, values: &[String]) { + let values_str: Vec<&str> = values.iter().map(std::string::String::as_str).collect(); + eprintln!("{}", { + let mut s = String::new(); + let _ = ColorfulTheme::default().format_multi_select_prompt_selection( + &mut s, + label, + &values_str, + ); + s + }); +} + #[derive(Debug, Default)] pub struct Printer { printed_lines: Vec, -- cgit v1.2.3