fn l { ls -l $* } fn getcwd { cwd = `{pwd | sed 's$.*/$$'} if(~ $#cwd 0) cwd = / echo $cwd } fn c { cd $* label `{pwd|sed 's|'$home'/||'} } fn x { xargs -p$NPROC $* } fn d { for(url){ out=`{echo $url | awk -F/ '{ print $NF }'} >$out {hget $1 | tput -p |[2] aux/statusmsg $out}& } } fn f { du -a $* | sed 's/^[0-9]+ +//' } fn m { if(! ~ $#1 0) plumb http://^$1 } fn k { $* str = (Local $*) plumb $"str } fn 9fs { switch($1){ case mars2 if(test -e /srv/mars2) mount /srv/mars2 /n/mars2 if not rimport -s mars2 mars2.inri.net / /n/mars2 case contrib if(test -e /srv/contrib) mount /srv/contrib /n/contrib if not rimport -c -s contrib mars2.inri.net /usr/spew/contrib /n/contrib case * rm '/env/fn#9fs' builtin 9fs $* } } fn fastmail { upas/fs -f /imaps/imap.fastmail.com } fn readall { for(msg in `{ls /mail/fs/mbox | grep '[0-9]+$'}){ echo s > $msg/flags } } fn h { if(~ $#1 0) sed 5q if not sed $1^q } fn loadfactotum { auth/secstore -u spew -s mars2.inri.net -G factotum > /mnt/factotum/ctl } fn sam { font=$fontm builtin sam $* } fn acme { builtin acme -f $font -F $fontm -c 1 $* } fn ww { winwatch -e '^(acme|rio)$' } fn stroll { if(~ $#* 1) cd $1 pwd echo stroll .. ls -F | grep '/$' | sed 's/^(.*)\/$/stroll \1/g' for(i in `' '{ls}) if(test -f $i) echo plumb $i }