]> git.lizzy.rs Git - plan9front.git/blob - rc/lib/rcmain
more manpage cleanup
[plan9front.git] / rc / lib / rcmain
1 # rcmain: Plan 9 version
2 if(~ $#home 0) home=/
3 if(~ $#ifs 0) ifs='     
4 '
5 switch($#prompt){
6 case 0
7         prompt=('% ' '  ')
8 case 1
9         prompt=($prompt '       ')
10 }
11 if(~ $rcname ?.out) prompt=('broken! ' '        ')
12 if(flag p) path=/bin
13 if not{
14         finit
15         if(~ $#path 0) path=(. /bin)
16 }
17 fn sigexit
18 if(! ~ $#cflag 0){
19         if(flag l && /bin/test -r $home/lib/profile) . $home/lib/profile
20         status=''
21         eval $cflag
22 }
23 if not if(flag i){
24         if(flag l && /bin/test -r $home/lib/profile) . $home/lib/profile
25         status=''
26         if(! ~ $#* 0) . $*
27         . -i '#d/0'
28 }
29 if not if(~ $#* 0) . '#d/0'
30 if not{
31         status=''
32         . $*
33 }
34 exit $status