From 1ba3c1cce9ae9419633f1e197b76c87649e9174a Mon Sep 17 00:00:00 2001 From: Sebastian Thiel Date: Sat, 23 Jan 2021 10:59:33 +0800 Subject: Fix --version Fixes #76 --- CHANGELOG.md | 5 +++++ src/options.rs | 3 ++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index a15224b..f191765 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,3 +1,8 @@ +#### v2.10.10 - Fix --version flag + +It looks like the latest BETAs of clap removed setting the version implicitly. + + #### v2.10.9 - Fix build Now that `jwalk` was released in v0.6 with v0.5.2 yanked, `cargo install` will use the previous diff --git a/src/options.rs b/src/options.rs index dc9a355..d8167c5 100644 --- a/src/options.rs +++ b/src/options.rs @@ -51,8 +51,9 @@ impl From for LibraryByteFormat { } #[derive(Debug, Clap)] -#[clap(name = "dua", about = "A tool to learn about disk usage, fast!")] +#[clap(name = "dua", about = "A tool to learn about disk usage, fast!", version = clap::crate_version!())] #[clap(setting = clap::AppSettings::ColoredHelp)] +#[clap(setting = clap::AppSettings::GlobalVersion)] #[clap(override_usage = "dua [FLAGS] [OPTIONS] [SUBCOMMAND] [input]...")] pub struct Args { #[clap(subcommand)] -- cgit v1.2.3