many bugfix, fixed getopt split

This commit is contained in:
2026-10-13 16:01:13 +02:00
parent b5be992d82
commit ba1e07744e
22 changed files with 478 additions and 125 deletions
+9 -3
View File
@@ -109,7 +109,9 @@ setlocale()
return 1
fi
# Restore the getopt-normalised (shell-quoted) argument list
eval set -- "$PARSED"
local -a _pargs=()
_getopt_split _pargs "$PARSED"
set -- "${_pargs[@]}"
while true; do
case "$1" in
-h|--help)
@@ -232,8 +234,12 @@ build_locale_shortcuts()
continue
fi
# Optional collision warning
if declare -F "$fname" >/dev/null 2>&1; then
# Collision warning. A function that already calls setlocale is one of
# these shortcuts, typically inherited through the environment from a
# parent shell that loaded the profile: replacing it is not worth a
# warning at every nested shell.
if declare -F "$fname" >/dev/null 2>&1 && \
! declare -f "$fname" 2>/dev/null | grep -q 'setlocale'; then
disp W "Overriding existing function '$fname'."
fi