aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--Cargo.lock1
-rw-r--r--Cargo.toml1
-rw-r--r--src/cliargs.rs49
3 files changed, 37 insertions, 14 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 5ecdfd4..696213a 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -104,6 +104,7 @@ dependencies = [
"itertools",
"lexopt",
"nucleo-matcher",
+ "owo-colors",
"rand",
"ratatui",
"regex",
diff --git a/Cargo.toml b/Cargo.toml
index 18db28d..899ac61 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -38,3 +38,4 @@ ureq = "2.12.1"
# config = { version = "0.15.8", default-features = false, features = ["async", "async-trait", "convert-case", "convert_case", "toml"] }
serde = { version = "1.0.217", features = ["serde_derive"] }
figment = { version = "0.10.19", features = [ "toml", "test" ]}
+owo-colors = "4.2.2"
diff --git a/src/cliargs.rs b/src/cliargs.rs
index 114b15a..46c3012 100644
--- a/src/cliargs.rs
+++ b/src/cliargs.rs
@@ -16,9 +16,11 @@
/////
use color_eyre::eyre::Result;
-use color_eyre::owo_colors::OwoColorize;
use dirs::{config_dir, home_dir};
use lexopt::prelude::*;
+use owo_colors::colors::css::LightGreen;
+use owo_colors::colors::*;
+use owo_colors::OwoColorize;
use std::env;
use std::path::PathBuf;
use walkdir::WalkDir;
@@ -142,19 +144,38 @@ FLAGS:
help
}
-pub fn version_func() -> String {
- let version = format!(
- "\
-{} {}
-{}
-{}
+// pub fn version_func() -> String {
+// let version = format!(
+// "\
+// {} {}
+// {}
+// {}
-Target Triple: {}",
- env!("CARGO_PKG_NAME"),
- env!("CARGO_PKG_VERSION"),
- env!("CARGO_PKG_AUTHORS"),
- env!("CARGO_PKG_LICENSE"),
- env!("TARGET")
- );
+// Target Triple: {}",
+// env!("CARGO_PKG_NAME"),
+// env!("CARGO_PKG_VERSION"),
+// env!("CARGO_PKG_AUTHORS"),
+// env!("CARGO_PKG_LICENSE"),
+// env!("TARGET")
+// );
+// version
+// }
+pub fn version_func() -> String {
+ let version: Vec<String> = vec![
+ format!(
+ "{} {}",
+ env!("CARGO_PKG_NAME").fg::<Green>().bold(),
+ env!("CARGO_PKG_VERSION").fg::<LightGreen>()
+ ),
+ format!("{}", env!("CARGO_PKG_AUTHORS").bold()),
+ format!("{}", env!("CARGO_PKG_LICENSE")),
+ format!("\n"),
+ format!(
+ "{} {}",
+ "Target Triple:".bold(),
+ env!("TARGET").fg::<BrightRed>()
+ ),
+ ];
+ let version = version.join("\n");
version
}