man: -P run single instance of page
This commit is contained in:
parent
6c41bd843c
commit
e482b39f8d
1 changed files with 39 additions and 31 deletions
12
rc/bin/man
12
rc/bin/man
|
@ -109,6 +109,12 @@ if(~ $#fils 0) {
|
|||
exit 'no man'
|
||||
}
|
||||
}
|
||||
switch($cmd) {
|
||||
case p; out=proof
|
||||
case P; out=page
|
||||
case *; out=cat
|
||||
}
|
||||
{
|
||||
for(i in $fils) {
|
||||
if(! /bin/test -f $i)
|
||||
echo need $i >[1=2]
|
||||
|
@ -121,10 +127,10 @@ for(i in $fils) {
|
|||
roff t $i
|
||||
|
||||
case p
|
||||
roff t $i | grep -v '^x X html' | proof
|
||||
roff t $i | grep -v '^x X html'
|
||||
|
||||
case P
|
||||
roff t $i | page
|
||||
roff t $i
|
||||
|
||||
case n
|
||||
roff n $i | sed '
|
||||
|
@ -147,3 +153,5 @@ for(i in $fils) {
|
|||
}
|
||||
}
|
||||
}
|
||||
} | $out
|
||||
|
||||
|
|
Loading…
Reference in a new issue