Posts

Showing posts from October, 2006

lab 65 - Man pages in Acme

NAME lab 65 - Man pages in Acme NOTES This lab's purpose is to have man-pages opened in acme automatically. Easiest way to do this is to allow plumb to get it's data piped from another program. So we can do: man2txt /man/sec/file | plumb -i -d edit -a action showdata -a filename '/man/file(sec)'; given that we want to plumb it to acme we have to set the destination port -d edit, and instruct acme to show the data with the tag set to the value of the filename argument. So now we can add to our plumbing rules something like: # man pages kind is text data matches '([a-zA-Z0-9\-]+)\(([0-9]+)\)' plumb alwaysstart man # nasty plumbing hack plumb start /dis/sh.dis -c '/usr/salva/dis/man -b $2 $1' where /usr/salva/dis/man is an adaptation of /rc/bin/man from Plan9, and in particular when invoked with the -b option does: man2txt $file | plumb -i -d edit -a action showdata -a filename '/man/'^${tl $*}^'('^${hd $*}^')' But if w