aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/cliargs.rs49
1 files changed, 35 insertions, 14 deletions
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
}