chore: cleanup

This commit is contained in:
iff 2024-12-08 01:44:41 +01:00
parent 02d9cf0754
commit 1454a4b992
4 changed files with 7 additions and 14 deletions

View file

@ -7,7 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased] ## [Unreleased]
### Aded ### Added
- Package manager integration for `apt`, `dnf`, `emerge`, `nix` - Package manager integration for `apt`, `dnf`, `emerge`, `nix`

View file

@ -105,12 +105,7 @@ pub fn cnf(data: &mut Data) {
let render_config = ui::RenderConfig::default().with_prompt_prefix(style); let render_config = ui::RenderConfig::default().with_prompt_prefix(style);
let msg = format!("{}", t!("install-package")).bold().blue(); let msg = format!("{}", t!("install-package")).bold().blue();
let confirm = format!("[{}]", t!("confirm-yes")).green(); let confirm = format!("[{}]", t!("confirm-yes")).green();
let hint = format!( let hint = format!("{} {} {}", "[↑/↓]".blue(), confirm, "[Ctrl+C]".red());
"{} {} {}",
"[↑/↓]".blue(),
confirm,
"[Ctrl+C]".red()
);
eprintln!("{}", msg); eprintln!("{}", msg);
eprintln!("{}", hint); eprintln!("{}", hint);
let package = Select::new("\n", packages) let package = Select::new("\n", packages)

View file

@ -98,12 +98,7 @@ pub fn select_candidate(data: &mut Data) {
.bold() .bold()
.blue(); .blue();
let confirm = format!("[{}]", t!("confirm-yes")).green(); let confirm = format!("[{}]", t!("confirm-yes")).green();
let hint = format!( let hint = format!("{} {} {}", "[↑/↓]".blue(), confirm, "[Ctrl+C]".red());
"{} {} {}",
"[↓/↑]".blue(),
confirm,
"[Ctrl+C]".red()
);
eprintln!("{}", msg); eprintln!("{}", msg);
eprintln!("{}", hint); eprintln!("{}", hint);

View file

@ -30,7 +30,10 @@ pub fn get_packages(
if !data.has_executable("apt-file") { if !data.has_executable("apt-file") {
return None; return None;
} }
let result = command_output(shell, &format!("apt-file find --regexp '.*/bin/{}$'", executable)); let result = command_output(
shell,
&format!("apt-file find --regexp '.*/bin/{}$'", executable),
);
if result.is_empty() { if result.is_empty() {
return None; return None;
} }