From a75144bf9407f27b5d54db7ba96c305550b1d427 Mon Sep 17 00:00:00 2001 From: Zane Duffield Date: Wed, 14 Jan 2026 11:16:54 +1100 Subject: [PATCH] Quote array expansion when appending to cmdarg_argv Without this change, excess arguments are split and glob-expanded when appended to the cmdarg_argv array. --- cmdarg.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmdarg.sh b/cmdarg.sh index 976fb7c..d909948 100644 --- a/cmdarg.sh +++ b/cmdarg.sh @@ -303,7 +303,7 @@ function cmdarg_parse fi if [[ "$fullopt" == "--" ]] && [[ $parsing -eq 0 ]]; then - cmdarg_argv+=($@) + cmdarg_argv+=("$@") break elif [[ "${fullopt:0:2}" == "--" ]]; then longopt=${fullopt:2}