fixed spellcheck and minor issues for release

This commit is contained in:
2026-10-13 17:49:03 +02:00
parent 8221ac5325
commit ea1a8a7a7e
25 changed files with 74 additions and 205 deletions
+5 -4
View File
@@ -63,6 +63,7 @@ _getopt_split()
_gs_out=()
while [[ -n "$s" ]]; do
# shellcheck disable=SC1003 # '\' is a literal backslash
case "${s:0:1}" in
"'")
s="${s:1}"
@@ -108,12 +109,12 @@ export -f _getopt_split
_trap_restore()
{
local line
local -a w=()
local -a _tr_w=()
while IFS= read -r line; do
[[ "$line" == "trap -- "* ]] || continue
_getopt_split w "$line"
# w = (trap -- <command> <SIGNAL>)
[[ ${#w[@]} -eq 4 ]] && trap -- "${w[2]}" "${w[3]}"
_getopt_split _tr_w "$line"
# _tr_w = (trap -- <command> <SIGNAL>)
[[ ${#_tr_w[@]} -eq 4 ]] && trap -- "${_tr_w[2]}" "${_tr_w[3]}"
done <<< "$1"
return 0
}