Allow options to be set in any position

Currently options following regular arguments are not interpreted as
options. This fixes that.

Users can still treat values starting with a hyphen (`-`) as regular
arguments by using `--`, e.g.:

    dust -d 2 -r ~/Documents -F -- --this-is-my-dir
This commit is contained in:
Taro Tanaka
2024-04-29 12:14:34 +09:00
committed by andy.boot
parent ecd6b85c17
commit 87581f328e
-1
View File
@@ -7,7 +7,6 @@ pub fn build_cli() -> Command {
Command::new("Dust")
.about("Like du but more intuitive")
.version(env!("CARGO_PKG_VERSION"))
.trailing_var_arg(true)
.arg(
Arg::new("depth")
.short('d')