From 50f2f97356724c3940dd28958556cf31a08633df Mon Sep 17 00:00:00 2001 From: Robert Date: Thu, 27 Jun 2024 20:35:16 +0100 Subject: [PATCH] feat(cli): add minimal clap commands - exposes version and simple help --- Cargo.toml | 6 +++--- LICENSE => LICENSE.txt | 0 src/main.rs | 8 ++++---- 3 files changed, 7 insertions(+), 7 deletions(-) rename LICENSE => LICENSE.txt (100%) diff --git a/Cargo.toml b/Cargo.toml index cce92d6..ade7802 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,16 +1,15 @@ [package] name = "ducker" -description = "A slightly quackers Docker TUI based on k9s." +description = "A slightly quackers Docker TUI based on k9s 🦆" authors = ["Robert Soane"] version = "0.0.2" homepage = "http://github.com/robertpsoane/ducker" repository = "http://github.com/robertpsoane/ducker" edition = "2021" readme = "README.md" -license-file = "LICENSE" +license-file = "LICENSE.txt" keywords = ["docker", "developer-tools", "ratatui", "terminal"] categories = ["command-line-utilities", "development-tools"] - include = ["/src", "LICENSE", "README.md"] [dependencies] @@ -33,6 +32,7 @@ tokio = { version = "1.38.0", features = [ ] } tui-big-text = "0.4.5" + [profile.release] strip = true lto = true diff --git a/LICENSE b/LICENSE.txt similarity index 100% rename from LICENSE rename to LICENSE.txt diff --git a/src/main.rs b/src/main.rs index c19c99a..22a7ca7 100644 --- a/src/main.rs +++ b/src/main.rs @@ -66,13 +66,13 @@ mod components { pub mod terminal; #[derive(Parser, Debug)] -struct Args { - #[arg(short, long, default_value_t = String::from("unix:///var/run/docker.sock"))] - docker_daemon: String, -} +#[command(version, about, long_about = None)] +struct Args {} #[tokio::main] async fn main() -> color_eyre::Result<()> { + Args::parse(); + terminal::init_panic_hook(); let mut terminal = terminal::init().context("failed to initialise terminal")?;