Apply last_patch51_3 from vodz
This commit is contained in:
parent
5956028f6f
commit
1887b0478f
16
shell/ash.c
16
shell/ash.c
@ -2418,9 +2418,23 @@ static void evalcommand(union node *cmd, int flags)
|
|||||||
for (argp = cmd->ncmd.assign; argp; argp = argp->narg.next) {
|
for (argp = cmd->ncmd.assign; argp; argp = argp->narg.next) {
|
||||||
expandarg(argp, &varlist, EXP_VARTILDE);
|
expandarg(argp, &varlist, EXP_VARTILDE);
|
||||||
}
|
}
|
||||||
for (argp = cmd->ncmd.args; argp; argp = argp->narg.next) {
|
for (argp = cmd->ncmd.args; argp && !arglist.list; argp = argp->narg.next) {
|
||||||
expandarg(argp, &arglist, EXP_FULL | EXP_TILDE);
|
expandarg(argp, &arglist, EXP_FULL | EXP_TILDE);
|
||||||
}
|
}
|
||||||
|
if (argp) {
|
||||||
|
struct builtincmd *bcmd;
|
||||||
|
int pseudovarflag;
|
||||||
|
|
||||||
|
bcmd = find_builtin(arglist.list->text);
|
||||||
|
pseudovarflag = bcmd && IS_BUILTIN_ASSIGN(bcmd);
|
||||||
|
for (; argp; argp = argp->narg.next) {
|
||||||
|
if (pseudovarflag && isassignment(argp->narg.text)) {
|
||||||
|
expandarg(argp, &arglist, EXP_VARTILDE);
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
expandarg(argp, &arglist, EXP_FULL | EXP_TILDE);
|
||||||
|
}
|
||||||
|
}
|
||||||
*arglist.lastp = NULL;
|
*arglist.lastp = NULL;
|
||||||
*varlist.lastp = NULL;
|
*varlist.lastp = NULL;
|
||||||
expredir(cmd->ncmd.redirect);
|
expredir(cmd->ncmd.redirect);
|
||||||
|
Loading…
Reference in New Issue
Block a user