mirror of
git://git.code.sf.net/p/zsh/code
synced 2025-10-28 05:00:59 +01:00
25771: shell function context for substitution functions
This commit is contained in:
parent
59dd1491c6
commit
28cf4041b4
3 changed files with 15 additions and 2 deletions
13
Src/utils.c
13
Src/utils.c
|
|
@ -2935,14 +2935,23 @@ getshfunc(char *nam)
|
|||
char **
|
||||
subst_string_by_func(Shfunc func, char *arg1, char *orig)
|
||||
{
|
||||
int osc = sfcontext;
|
||||
LinkList l = newlinklist();
|
||||
char **ret;
|
||||
|
||||
addlinknode(l, func->node.nam);
|
||||
if (arg1)
|
||||
addlinknode(l, arg1);
|
||||
addlinknode(l, orig);
|
||||
sfcontext = SFC_SUBST;
|
||||
|
||||
if (doshfunc(func, l, 1))
|
||||
return NULL;
|
||||
return getaparam("reply");
|
||||
ret = NULL;
|
||||
else
|
||||
ret = getaparam("reply");
|
||||
|
||||
sfcontext = osc;
|
||||
return ret;
|
||||
}
|
||||
|
||||
/**/
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue