fix: unbound 'example' in config editor under set -u

Under 'set -u', 'local field=$1 key flags desc rest example' leaves the
unassigned locals UNSET rather than empty, so any POS_CONFIG key without
an '::example' hint (e.g. the whole system scope) hit 'example: unbound
variable' and aborted the scope listing. Initialize all locals explicitly.
This commit is contained in:
Your Name
2026-08-09 04:38:10 -04:00
parent cb82acb155
commit cc01fd8059
+1 -1
View File
@@ -90,7 +90,7 @@ cfg_scope_envfile() {
# The optional example is "desc::example" — a literal "::" separates the
# value-format hint from the description.
_cfg_key_line() {
local field="$1" key flags desc rest example
local field="$1" key="" flags="" desc="" rest="" example=""
key="${field%%=*}"
if [[ "$field" == *"="* ]]; then
rest="${field#*=}"