mirror of
git://git.code.sf.net/p/cdesktopenv/code
synced 2025-02-15 04:32:24 +00:00
src/cmd/ksh93/bltins/typeset.c: - Removing the nv_search() call altogether was actually not neccessary, I was just searching the wrong tree: instead of sh.fun_base, simply search the current sh.fun_tree which has a view to all the layered parent subshell copes. It is not going to find it in the current subshell tree but will find it in one of the parent trees if it exists. The cost of an unnecessary dummy is negligible, but so is the cost of this search, and doing it is more correct.
This commit is contained in:
parent
24b7fcb771
commit
295cce2c6d
1 changed files with 1 additions and 1 deletions
|
@ -1398,7 +1398,7 @@ static int unall(int argc, char **argv, register Dt_t *troot, Shell_t* shp)
|
|||
}
|
||||
else if(troot==shp->alias_tree)
|
||||
r = 1;
|
||||
else if(troot==shp->fun_tree && troot!=shp->fun_base)
|
||||
else if(troot==shp->fun_tree && troot!=shp->fun_base && nv_search(name,shp->fun_tree,0))
|
||||
nv_open(name,troot,NV_NOSCOPE); /* create dummy virtual subshell node without NV_FUNCTION attribute */
|
||||
}
|
||||
sh_popcontext(shp,&buff);
|
||||
|
|
Loading…
Reference in a new issue