fixed spellcheck and minor issues for release
This commit is contained in:
+5
-4
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user