Pi66

Home | Repos | About | Blog | Gaza

walrs
pywal but if its Fast-Minimal-Simple
git clone https://git.pi66.xyz/walrs

About | Files | Commits | Refs | License


use argh instead of clap and removing auto complete

Author: pixel2175
Date: 2025-05-31 20:28
commit: 55fb8e3f

Stat

A src/main.rs 10 +10 -0

Diff

diff --git a/src/main.rs b/src/main.rs
index 450c1a9..447e2dc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -87,6 +87,9 @@ struct Arg {
         description = "set quit mode (no output)"
     )]
     quit: bool,
+
+    #[argh(switch, short = 'v', long = "version", description = "version ")]
+    version: bool,
 }

fn image_path(image: Option<String>, send: bool) -> String { @@ -161,6 +164,13 @@ fn main() { } None => "kmeans".to_string(), }; + if arg.version { + info( ...

Show all

diff --git a/src/main.rs b/src/main.rs
index 450c1a9..447e2dc 100644
--- a/src/main.rs
+++ b/src/main.rs
@@ -87,6 +87,9 @@ struct Arg {
         description = "set quit mode (no output)"
     )]
     quit: bool,
+
+    #[argh(switch, short = 'v', long = "version", description = "version ")]
+    version: bool,
 }

fn image_path(image: Option<String>, send: bool) -> String { @@ -161,6 +164,13 @@ fn main() { } None => "kmeans".to_string(), }; + if arg.version { + info( + "Version", + &format!("walrs {}", env!("CARGO_PKG_VERSION")), + !arg.quit, + ); + }

 if arg.reload&#95;nowal {
     reload(!arg.quit, true);

// Created by Pi66

// Copyright ©Pi66 2026