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.
This commit is contained in:
Zane Duffield
2026-01-14 11:16:54 +11:00
committed by Andrew Kesterson
parent 35b6965e5d
commit a75144bf94

View File

@@ -303,7 +303,7 @@ function cmdarg_parse
fi fi
if [[ "$fullopt" == "--" ]] && [[ $parsing -eq 0 ]]; then if [[ "$fullopt" == "--" ]] && [[ $parsing -eq 0 ]]; then
cmdarg_argv+=($@) cmdarg_argv+=("$@")
break break
elif [[ "${fullopt:0:2}" == "--" ]]; then elif [[ "${fullopt:0:2}" == "--" ]]; then
longopt=${fullopt:2} longopt=${fullopt:2}