rc: replace forgotten ENV_RCARGLIST

This commit is contained in:
Giacomo Tesio 2017-10-19 00:16:19 +02:00
parent d33221de34
commit a5c14e60d7
2 changed files with 4 additions and 3 deletions

View File

@ -168,7 +168,8 @@ main(int argc, char *argv[])
flag['l'] = flagset;
if(flag['I'])
flag['i'] = 0;
else if(flag['i']==0 && argc==1 && Isatty(0)) flag['i'] = flagset;
else if(flag['i']==0 && argc==1 && Isatty(0))
flag['i'] = flagset;
rcmain = flag['m']?flag['m'][0]:Rcmain;
err = openfd(2);
kinit();
@ -332,7 +333,7 @@ Xexit(void)
--runq->pc;
starval = vlook(ENV_RCARGLIST)->val;
start(trapreq->fn, trapreq->pc, (struct var *)0);
runq->local = newvar("*", runq->local);
runq->local = newvar(ENV_RCARGLIST, runq->local);
runq->local->val = copywords(starval, (struct word *)0);
runq->local->changed = 1;
runq->redir = runq->startredir = 0;

View File

@ -139,7 +139,7 @@ execfunc(var *func)
runq->argv->words = 0;
poplist();
start(func->fn, func->pc, runq->local);
runq->local = newvar("*", runq->local);
runq->local = newvar(ENV_RCARGLIST, runq->local);
runq->local->val = starval;
runq->local->changed = 1;
}