You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[bug] ${#UNSET} unbound-variable diagnostic leaks the # operator into the name (#UNSET vs UNSET) #200
For ${#name} the reported variable name must be name — the # length operator must not leak into the unbound-variable diagnostic. Same shape in the array suite: ( echo ${#narray[4]} ) under set -u reports #narray[4] instead of GNU's narray[4]. Exit status matches (1); only the message name text is wrong, but scripts that scrape the variable name out of the message (set -u handlers) get a poisoned name.
GNU anchor
subst.c:9777 parameter_brace_expand() length branch (${#name}) — passes the de-#'d name to the unbound-variable error
error path: err_unbound / unbound_variable reporting in subst.c
Activity
param lane: alternate-rhs escaped glob chars stay literal; ${#name} u…
caomengxuan666 commentedon Sep 27, 2026
已修复并合入 master(commit ddeabd56)。${#UNSET} 的 unbound variable 诊断现在按 GNU subst.c:9944-9951(err_unboundvar(name+1))报告去掉 # 的名字:#UNSET→UNSET、#1→1、#a[0]→a[0] 均已对 WSL GNU 5.3.0 探针验证。感谢报告!