upleb.uk

Public git repos — served from a NIP-34 GRASP relay at git.upleb.uk

summaryrefslogtreecommitdiff
path: root/src/lib
diff options
context:
space:
mode:
authorDanConwayDev <DanConwayDev@protonmail.com>2025-08-07 13:02:08 +0100
committerDanConwayDev <DanConwayDev@protonmail.com>2025-08-07 17:40:34 +0100
commit896267959bc9e436d7c5d2ee0ff8c8c088fc7274 (patch)
tree3ae5ef481ad5ffb0e9c74202093b25d510efe8ea /src/lib
parent3b5c48f5a2a4b9be5d14baa8f5e801fefd5c1166 (diff)
fix(send): PR cli output
to keep the user informed of whats happening / happend
Diffstat (limited to 'src/lib')
-rw-r--r--src/lib/cli_interactor.rs18
1 files changed, 17 insertions, 1 deletions
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 @@
1use anyhow::{Context, Result}; 1use anyhow::{Context, Result};
2use dialoguer::{Confirm, Input, Password, theme::ColorfulTheme}; 2use dialoguer::{
3 Confirm, Input, Password,
4 theme::{ColorfulTheme, Theme},
5};
3use indicatif::TermLike; 6use indicatif::TermLike;
4#[cfg(test)] 7#[cfg(test)]
5use mockall::*; 8use mockall::*;
@@ -323,6 +326,19 @@ where
323 Ok(selected_choices) 326 Ok(selected_choices)
324} 327}
325 328
329pub fn show_multi_input_prompt_success(label: &str, values: &[String]) {
330 let values_str: Vec<&str> = values.iter().map(std::string::String::as_str).collect();
331 eprintln!("{}", {
332 let mut s = String::new();
333 let _ = ColorfulTheme::default().format_multi_select_prompt_selection(
334 &mut s,
335 label,
336 &values_str,
337 );
338 s
339 });
340}
341
326#[derive(Debug, Default)] 342#[derive(Debug, Default)]
327pub struct Printer { 343pub struct Printer {
328 printed_lines: Vec<String>, 344 printed_lines: Vec<String>,