Provide version information with -V

clap does most of this for you - I had forgotten to wire it up
https://github.com/bootandy/dust/issues/33

increment build version
This commit is contained in:
andy.boot
2019-11-02 00:41:16 +00:00
parent 224a2c6f25
commit 9a9cbefd3d
3 changed files with 59 additions and 58 deletions
+2
View File
@@ -15,6 +15,8 @@ static DEFAULT_NUMBER_OF_LINES: usize = 20;
fn main() {
let def_num_str = DEFAULT_NUMBER_OF_LINES.to_string();
let options = App::new("Dust")
.about("Like du but more intuitive")
.version(crate_version!())
.setting(AppSettings::TrailingVarArg)
.arg(
Arg::with_name("depth")