From 87581f328e3e9ac9e49cdaee92446b9e2e7fb424 Mon Sep 17 00:00:00 2001 From: Taro Tanaka Date: Mon, 29 Apr 2024 12:14:34 +0900 Subject: [PATCH] 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 --- src/cli.rs | 1 - 1 file changed, 1 deletion(-) diff --git a/src/cli.rs b/src/cli.rs index 1e2f0d0..797b790 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -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')