rc: rename $cflag in $rccmd
This commit is contained in:
parent
a70f27680a
commit
65d37f432f
@ -12,13 +12,13 @@ if(~ $rcname ?.out) prompt=('broken! ' ' ')
|
||||
if(flag p) path=/cmd
|
||||
if not{
|
||||
finit
|
||||
if(~ $#path 0) path=(. /cmd)
|
||||
if(~ $#path 0) path=(/cmd .)
|
||||
}
|
||||
fn sigexit
|
||||
if(! ~ $#cflag 0){
|
||||
if(! ~ $#rccmd 0){
|
||||
if(flag l && /cmd/test -r $home/lib/profile) . $home/lib/profile
|
||||
status=''
|
||||
eval $cflag
|
||||
eval $rccmd
|
||||
}
|
||||
if not if(flag i){
|
||||
if(flag l && /cmd/test -r $home/lib/profile) . $home/lib/profile
|
||||
|
@ -177,9 +177,9 @@ main(int argc, char *argv[])
|
||||
Vinit();
|
||||
inttoascii(num, mypid = getpid());
|
||||
setvar(ENV_PID, newword(num, (word *)0));
|
||||
setvar("cflag", flag['c']?newword(flag['c'][0], (word *)0)
|
||||
setvar(ENV_RCCMD, flag['c']?newword(flag['c'][0], (word *)0)
|
||||
:(word *)0);
|
||||
setvar("rcname", newword(argv[0], (word *)0));
|
||||
setvar(ENV_RCNAME, newword(argv[0], (word *)0));
|
||||
i = 0;
|
||||
bootstrap[i++].i = 1;
|
||||
bootstrap[i++].f = Xmark;
|
||||
|
@ -18,6 +18,8 @@
|
||||
#define ENV_PROMPT "prompt"
|
||||
#define ENV_STATUS "status"
|
||||
#define ENV_CDPATH "cdpath"
|
||||
#define ENV_RCNAME "rcname"
|
||||
#define ENV_RCCMD "rccmd"
|
||||
|
||||
#define NSIG 32
|
||||
#define SIGINT 2
|
||||
|
Loading…
Reference in New Issue
Block a user