diff options
| author | Charles.Forsyth <devnull@localhost> | 2006-12-23 00:30:12 +0000 |
|---|---|---|
| committer | Charles.Forsyth <devnull@localhost> | 2006-12-23 00:30:12 +0000 |
| commit | 6e425a9de8c003b5a733621a6b6730ec3cc902b8 (patch) | |
| tree | 314123bcab78ff295f38f85f31dc141e5fe22d15 /dis/lookman | |
| parent | 74a4d8c26dd3c1e9febcb717cfd6cb6512991a7a (diff) | |
20061220
Diffstat (limited to 'dis/lookman')
| -rw-r--r-- | dis/lookman | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/dis/lookman b/dis/lookman new file mode 100644 index 00000000..edf8972b --- /dev/null +++ b/dis/lookman @@ -0,0 +1,18 @@ +#!/dis/sh +load std + +fn cmdform { + sed 's;/man/;; + 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 |
