From 2c73b4d59603c12d31ded1a2f2ca9ef97a5ff0b3 Mon Sep 17 00:00:00 2001 From: Roy Ivy III Date: Mon, 6 Jul 2020 09:22:19 -0500 Subject: add windows wildcard argument support (using `wild`) --- src/main.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index a47fc22..9c680a3 100644 --- a/src/main.rs +++ b/src/main.rs @@ -4,6 +4,7 @@ use anyhow::Result; use dua::{ByteFormat, Color, TraversalSorting}; use std::{fs, io, io::Write, path::PathBuf, process}; use structopt::StructOpt; +use wild; #[cfg(any(feature = "tui-unix", feature = "tui-crossplatform"))] mod interactive; @@ -12,7 +13,7 @@ mod options; fn main() -> Result<()> { use options::Command::*; - let opt: options::Args = options::Args::from_args(); + let opt: options::Args = options::Args::from_iter(wild::args_os()); let walk_options = dua::WalkOptions { threads: opt.threads.unwrap_or(0), byte_format: opt.format.map(Into::into).unwrap_or(ByteFormat::Metric), -- cgit v1.2.3