summaryrefslogtreecommitdiff
path: root/shell
diff options
context:
space:
mode:
authorEric Andersen <andersen@codepoet.org>2002-10-22 11:58:59 +0000
committerEric Andersen <andersen@codepoet.org>2002-10-22 11:58:59 +0000
commit1887b0478f2743ce7808e8b37462e18d584611e1 (patch)
treef95c04d377b7ec7bac90b41ee91c78fab333135a /shell
parent5956028f6f438131e8995af029de448a21ea8d8c (diff)
downloadbusybox-w32-1887b0478f2743ce7808e8b37462e18d584611e1.tar.gz
busybox-w32-1887b0478f2743ce7808e8b37462e18d584611e1.tar.bz2
busybox-w32-1887b0478f2743ce7808e8b37462e18d584611e1.zip
Apply last_patch51_3 from vodz
Diffstat (limited to 'shell')
-rw-r--r--shell/ash.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/shell/ash.c b/shell/ash.c
index 216780c9d..f0729ed4d 100644
--- a/shell/ash.c
+++ b/shell/ash.c
@@ -2418,9 +2418,23 @@ static void evalcommand(union node *cmd, int flags)
2418 for (argp = cmd->ncmd.assign; argp; argp = argp->narg.next) { 2418 for (argp = cmd->ncmd.assign; argp; argp = argp->narg.next) {
2419 expandarg(argp, &varlist, EXP_VARTILDE); 2419 expandarg(argp, &varlist, EXP_VARTILDE);
2420 } 2420 }
2421 for (argp = cmd->ncmd.args; argp; argp = argp->narg.next) { 2421 for (argp = cmd->ncmd.args; argp && !arglist.list; argp = argp->narg.next) {
2422 expandarg(argp, &arglist, EXP_FULL | EXP_TILDE); 2422 expandarg(argp, &arglist, EXP_FULL | EXP_TILDE);
2423 } 2423 }
2424 if (argp) {
2425 struct builtincmd *bcmd;
2426 int pseudovarflag;
2427
2428 bcmd = find_builtin(arglist.list->text);
2429 pseudovarflag = bcmd && IS_BUILTIN_ASSIGN(bcmd);
2430 for (; argp; argp = argp->narg.next) {
2431 if (pseudovarflag && isassignment(argp->narg.text)) {
2432 expandarg(argp, &arglist, EXP_VARTILDE);
2433 continue;
2434 }
2435 expandarg(argp, &arglist, EXP_FULL | EXP_TILDE);
2436 }
2437 }
2424 *arglist.lastp = NULL; 2438 *arglist.lastp = NULL;
2425 *varlist.lastp = NULL; 2439 *varlist.lastp = NULL;
2426 expredir(cmd->ncmd.redirect); 2440 expredir(cmd->ncmd.redirect);