Add option flag for no colors

https://github.com/bootandy/dust/issues/37
This commit is contained in:
andy.boot
2019-12-08 14:46:45 +00:00
parent bfbe8a57ae
commit a4ca78dbe4
2 changed files with 43 additions and 9 deletions
+7
View File
@@ -57,6 +57,12 @@ fn main() {
.long("reverse")
.help("If applied tree will be printed upside down (biggest lowest)"),
)
.arg(
Arg::with_name("no_colors")
.short("c")
.long("no_colors")
.help("If applied no colors will be printed (normally largest directories are marked in red"),
)
.arg(Arg::with_name("inputs").multiple(true))
.get_matches();
@@ -112,6 +118,7 @@ fn main() {
permissions,
use_full_path,
options.is_present("reverse"),
!options.is_present("no_colors"),
tree,
);
}