Plan 9 from Bell Labs’s /usr/web/sources/contrib/stallion/profile

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


bind -b $home/bin/rc /bin
bind -b $home/bin/$cputype /bin
bind -c $home/tmp /tmp
GOBIN=$home/bin/$cputype
font=/lib/font/bit/vera/unicode.12.font
fixedfont=/lib/font/bit/veram/unicode.12.font
vtfont=/lib/font/bit/veram/vera.14.font
tabstop=8
fn A {acme -c 1 $*}
fn D {acme -l $home/lib/acme/$1}
fn F {plumb `{f $* | awk '{print $1}' | sed 's/:$//'}}
fn M {troff -man $* | lp -dstdout | page}
fn m {nroff -man $*}
fn W {. $home/lib/rio/$1}
fn acme {builtin acme -a -f $fixedfont $*}
fn cd {builtin cd $*; awd}
fn find {du -a $* | awk '{print $2}'}
fn own {cpu -h `{cat /dev/sysname} -u `{cat /dev/hostowner} $*}
fn dirs {. /bin/dirs $*}
fn pushd {. /bin/pushd $*}
fn popd {. /bin/popd $*}
fn ttD {tt '^T^TD'}
fn ttr {tt '^T^Tr'}
fn vt {builtin vt -f $vtfont -x $*}
switch($service){
case terminal
	plumber
	startupasfs
	echo -n accelerated >'#m/mousectl'
	echo -n 'res 3' >'#m/mousectl'
	prompt=('term% ' '	')
	fn term%{ $* }
	exec rio -i riostart
case cpu
	if(test -e /mnt/term/env/wsys){	# rio already running
		bind -a /mnt/term/mnt/wsys /dev
		if(test -w /dev/label)
			echo -n $sysname >/dev/label
	}
	bind /mnt/term/dev/cons /dev/cons
	bind /mnt/term/dev/consctl /dev/consctl
	bind -a /mnt/term/dev /dev
	prompt=($sysname'% ' '	')
	fn $sysname%{ $* }
	startupasfs
	news
	if(! test -e /mnt/term/env/wsys){	# cpu call from drawterm
		plumber
		exec rio -i riostart -sR
	}
case con
	prompt=($sysname'% ' '	')
	news
}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to webmaster@9p.io.