blob: 57610bf62a75fc936ba5f38e31a37679f40680d5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
#!/dis/sh
load std
fn cmdform {
sed 's;/man/;;
s;(.*)/(0intro);man \1 \2 # intro(\1);
s;(.*)/(.*);man \1 \2 # \2(\1);'
}
post=cmdform
x=$*
~ $1 -f && {
post=cat
x=${tl $x}
}
x=`{echo $x|tr A-Z a-z|tr -dc 'a-z0-9_ \012'} # fold case, delete funny chars
~ $#x 0 && {echo Usage: lookman key ... >[1=2]; exit usage}
look $x /man/index | sed 's/^.* //' |sort |uniq | $post
|