summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSebastian Thiel <sebastian.thiel@icloud.com>2021-01-23 10:59:33 +0800
committerSebastian Thiel <sebastian.thiel@icloud.com>2021-01-23 11:01:01 +0800
commit1ba3c1cce9ae9419633f1e197b76c87649e9174a (patch)
treedb9a5ed076adc7470d948824f47ad2ba56dedbae
parent8b602bd31fb172fb7f222e68d320787315fbcefb (diff)
Fix --version
Fixes #76
-rw-r--r--CHANGELOG.md5
-rw-r--r--src/options.rs3
2 files changed, 7 insertions, 1 deletions
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<ByteFormat> 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)]