shithub: purgatorio

ref: 00c219c7d9c2b9f60c2db0e1ba7289b2301209a7
dir: /utils/rcsh/rcmain/

View raw version
# rcmain: 9pm version
if(~ $#home 0) home=/
if(~ $#ifs 0) ifs=' 	
'
switch($#prompt){
case 0
case 1
	prompt=('% ' '	')
}
if(~ $rcname v.out) prompt=('broken! ' '	')
if(! ~ $#cflag 0){
	if(flag l && test -r $home/lib/profile) . $home/lib/profile
	status=''
	eval $cflag
}
if not if(flag i){
	if(flag l && test -r $home/lib/profile) . $home/lib/profile
	status=''
	if(! ~ $#* 0) . $*
	if not . -i 'stdin$'
}
if not {
	if(~ $#* 0) . 'stdin$'
	if not{
		status=''
		. $*
	}
}
exit $status