# directories
fn l{ if(~ $#* 0) echo `{pwd}^':'; if(test $#* -lt 2) lc -F $*; if not for(dir) @{ cd $dir; echo $dir^':';lc -F } }
fn ll{ ls -l $* }
fn d{ if(test $#* -lt 2) cd $1; if(! ~ $#* 1) arg=$*; if not arg='.'; l $arg }
# find
fn f{ du -a $* | sed 's/^.* //g' }
fn s{ lc *.[chsyl] }
# grep source files
fn g{ grep -n $* *.[chsyl] /dev/null }
# acme
fn a { plumber; acme -c1 -f $font $* }
fn ad { dumpfile = $home/lib/dump/$1; touch $dumpfile; bind $dumpfile $home/acme.dump; acme -l acme.dump }
# plumber
fn pb{ plumb $* }
fn pl{ plumb 'Local '$* }
fn pn{ plumb 'Local echo plumb namespace:; ns' }
fn pp{ plumber }
# rio
fn r{ wsyss=($wsyss $wsys); rio -i window }
fn nw{ window $* }
fn w{ plumb 'Local window -m '^$"*}
fn ws{ if(! ~ $#* 0){ wsys=$1;shift ; window -m $* } }
fn wctl {while ()awk '$1=="new" { $1=""; if($2=="-cd") print "cd " $3; $2=$3=""; print "window -m " $0 ; exit; }'|rc}
fn ss{ echo scroll >> /dev/wctl }
# services
fn serv {srvname=$1^.^$user;$1=/srv/^$srvname;shift;srv -eq $"* $srvname}
fn calc{ serv calc dc; w -scroll -dx 300 -dy 100 cat $calc; awk '{print $0 " p" >>"'^$calc^'"}' };
fn riot{ serv riot wctl; wctl=$riot }
# misc
fn x{ exit }
|