mirror of
https://git.code.sf.net/p/zsh/code
synced 2026-04-18 06:53:35 -04:00
51374: Expose named references in $parameters, fix substitution error.
This commit is contained in:
@@ -105,10 +105,15 @@ getpmparameter(UNUSED(HashTable ht), const char *name)
|
||||
pm->node.nam = dupstring(name);
|
||||
pm->node.flags = PM_SCALAR | PM_READONLY;
|
||||
pm->gsu.s = &nullsetscalar_gsu;
|
||||
if ((rpm = (Param) realparamtab->getnode(realparamtab, name)) &&
|
||||
!(rpm->node.flags & PM_UNSET))
|
||||
if ((rpm = (Param) realparamtab->getnode2(realparamtab, name)) &&
|
||||
!(rpm->node.flags & PM_UNSET)) {
|
||||
pm->u.str = paramtypestr(rpm);
|
||||
else {
|
||||
if ((rpm->node.flags & PM_NAMEREF) &&
|
||||
(rpm = (Param) realparamtab->getnode(realparamtab, name)) &&
|
||||
!(rpm->node.flags & PM_UNSET)) {
|
||||
pm->u.str = zhtricat(pm->u.str, "-", paramtypestr(rpm));
|
||||
}
|
||||
} else {
|
||||
pm->u.str = dupstring("");
|
||||
pm->node.flags |= (PM_UNSET|PM_SPECIAL);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user