get rid of eval (use readarray)

This commit is contained in:
fatalerrors
2026-07-09 18:17:53 +02:00
parent c1ea14e145
commit 99dc9a4ef5
15 changed files with 130 additions and 46 deletions

View File

@@ -69,7 +69,9 @@ genpwd()
-n 'genpwd' -- "$@")
# shellcheck disable=SC2181 # getopt return code is checked immediately after
if [[ $? -ne 0 ]]; then return 1; fi
eval set -- "$PARSED"
local -a _pargs=()
readarray -td '' _pargs < <(printf '%s' "$PARSED" | xargs printf '%s\0')
set -- "${_pargs[@]}"
while true; do
case "$1" in