prompt for show

This commit is contained in:
Volodymyr Patuta 2020-12-12 17:54:52 +01:00
parent 3ede77cdf5
commit 5d18ed181a
1 changed files with 6 additions and 1 deletions

View File

@ -106,7 +106,12 @@ pub fn show(matches: &ArgMatches) -> Result<()> {
.interact_text()?;
notes::show_category(&category)?;
}
false => return Err(anyhow!("No option is given. Abort.")),
false => {
let s: String = Input::with_theme(&ColorfulTheme::default())
.with_prompt("String to search")
.interact_text()?;
notes::show(&s)?;
}
},
},
}