Add long options to cmd line params

This commit is contained in:
andy.boot
2018-04-27 10:15:30 +01:00
parent e6c777fb8b
commit 0f1f823736
+4
View File
@@ -19,12 +19,14 @@ fn main() {
.arg( .arg(
Arg::with_name("depth") Arg::with_name("depth")
.short("d") .short("d")
.long("depth")
.help("Depth to show") .help("Depth to show")
.takes_value(true), .takes_value(true),
) )
.arg( .arg(
Arg::with_name("number_of_lines") Arg::with_name("number_of_lines")
.short("n") .short("n")
.long("number-of-lines")
.help("Number of lines of output to show") .help("Number of lines of output to show")
.takes_value(true) .takes_value(true)
.default_value(DEFAULT_NUMBER_OF_LINES), .default_value(DEFAULT_NUMBER_OF_LINES),
@@ -32,11 +34,13 @@ fn main() {
.arg( .arg(
Arg::with_name("display_full_paths") Arg::with_name("display_full_paths")
.short("p") .short("p")
.long("full-paths")
.help("If set sub directories will not have their path shortened"), .help("If set sub directories will not have their path shortened"),
) )
.arg( .arg(
Arg::with_name("display_apparent_size") Arg::with_name("display_apparent_size")
.short("s") .short("s")
.long("apparent-size")
.help("If set will use file length. Otherwise we use blocks"), .help("If set will use file length. Otherwise we use blocks"),
) )
.arg(Arg::with_name("inputs").multiple(true)) .arg(Arg::with_name("inputs").multiple(true))