Discussion:
New format of output from man -k
Darren Reed
2014-07-31 12:43:52 UTC
Permalink
NetBSD has a new man command and now mandoc is what's used.

ok.

My problem is the output. e.g.:

netbsd-current# man -k nfsd
$<2>nfsd$<2> ($<2>8$<2>) $<2>remote NFS server$<2>
$<2>nfsd$<2> runs on a server machine to service NFS requests from
client machines. At least one $<2>nfsd$<2> must be running for a machine
to operate as a server. Unless otherwise specified, four servers for UDP
transport are started. The following...

$<2>nfssvc$<2> ($<2>2$<2>) $<2>NFS services$<2>
...set in flags. Calls used by $<2>nfsd$<2>(8) On the server side,
nfssvc is called with the flag NFSSVC_NFSD and a pointer to a struct
nfsd_srvargs { struct $<2>nfsd$<2> *nsd_nfsd; /* Pointer
to in kernel $<2>nfsd$<2> struct */ uid_t nsd_uid;
/* Effective uid mapped..

Now "man -k nfsd" works nicely on every other platform I use (or have
ever used) but somehow it fails badly here. I get that some people may
see this as being better and I don't want to rain on that parade. And
I'm sure it looks better in someone else's terminal but that's not what
interests me.

My question is this.

How do I get it to look like it did before with one line per man page?

Darren
(current is 6.99.43)

What it used to look like...

$ man -k nfs
confstr (3) - get string-valued configurable variables
exports (5) - define remote mount points for NFS mount requests
mount_kernfs (8) - mount the /kern file system
mount_nfs (8) - mount NFS file systems
mountd (8) - service remote NFS mount requests
namei, lookup_for_nfsd, lookup_for_nfsd_index, relookup, NDINIT,
namei_simple_kernel, namei_simple_user (9) - pathname lookup
nfsd (8) - remote NFS server
nfsmb, nfsmbc (4) - NVIDIA nForce 2/3/4 SMBus controller and SMBus driver
nfsstat (1) - display NFS statistics
nfssvc (2) - NFS services
pcnfsd, rpc.pcnfsd (8) - (PC)NFS authentication and print request server
rpc.lockd (8) - NFS file locking daemon
rump_nfs (8) - mount a nfs share with a userspace server
showmount (8) - show remote NFS mounts on host
Steffen Nurpmeso
2014-07-31 12:53:03 UTC
Permalink
Darren Reed <***@netbsd.org> wrote:
|NetBSD has a new man command and now mandoc is what's used.
|
|ok.
|
|My problem is the output. e.g.:
[.]
|My question is this.
|
|How do I get it to look like it did before with one line per man page?
|Darren
|(current is 6.99.43)
|
|What it used to look like...
|
|$ man -k nfs
|confstr (3) - get string-valued configurable variables
|exports (5) - define remote mount points for NFS mount requests
[.]

I _absolutely_ agree with this.

--steffen
Joerg Sonnenberger
2014-07-31 13:14:35 UTC
Permalink
Post by Darren Reed
netbsd-current# man -k nfsd
$<2>nfsd$<2> ($<2>8$<2>) $<2>remote NFS server$<2>
$<2>nfsd$<2> runs on a server machine to service NFS requests from
client machines. At least one $<2>nfsd$<2> must be running for a machine
to operate as a server. Unless otherwise specified, four servers for UDP
transport are started. The following...
Looks like a seriously broken terminal settings, but OK. You can get a
short version without context by using "apropos -C". The old-style
output format can be obtained by "apropos -l".

Joerg
Alan Barrett
2014-07-31 13:23:25 UTC
Permalink
Post by Darren Reed
netbsd-current# man -k nfsd
$<2>nfsd$<2> ($<2>8$<2>) $<2>remote NFS server$<2>
$<2>nfsd$<2> runs on a server machine to service NFS requests from
[...]
The "$<2>" looks like the terminfo specification for a delay. I
susect that mandoc is trying underline some words, it's failing
to interpret the terminfo spec properly, with the result that
$<2> in the terminfo spec is displayed as $<2> instead of being
interpreted as a 2-millisecond delay.
Post by Darren Reed
How do I get it to look like it did before with one line per man page?
[...]
Post by Darren Reed
What it used to look like...
$ man -k nfs
confstr (3) - get string-valued configurable variables
exports (5) - define remote mount points for NFS mount requests
I wish I could get that output format back for "man -k". I like
the new full-text search, but dislike the new output format.

A workaround is to run apropos directly:

TERM=dumb apropos -C nfsd

--apb (Alan Barrett)
Christos Zoulas
2014-08-01 07:31:47 UTC
Permalink
Post by Alan Barrett
TERM=dumb apropos -C nfsd
export APROPOS=-l

christos
Alan Barrett
2014-08-02 08:39:05 UTC
Permalink
Post by Christos Zoulas
Post by Alan Barrett
TERM=dumb apropos -C nfsd
export APROPOS=-l
I want the new full-text search, but the old output format.
apropos -l searches only the name and one-line description, not
the full text. apropos -C underlines all the output. Neither is
what I want.

--apb (Alan Barrett)
Valery Ushakov
2014-08-02 17:40:37 UTC
Permalink
Post by Alan Barrett
Post by Christos Zoulas
Post by Alan Barrett
TERM=dumb apropos -C nfsd
export APROPOS=-l
I want the new full-text search, but the old output format.
apropos -l searches only the name and one-line description, not
the full text. apropos -C underlines all the output. Neither is
what I want.
-r to turn off formatting?

Why does -C highlight everything, btw?

-uwe

Darren Reed
2014-08-01 16:12:39 UTC
Permalink
Setting APROPOS to -1 did not work.

(netbsd-current:~) setenv APROPOS -1
(netbsd-current:~) man -k nfs
$<2>nfsstat$<2> ($<2>1$<2>) $<2>display NFS statistics$<2>
nfsstat displays statistics kept about $<2>NFS$<2> client and server
activity. The options are as follows: c Only display values for
$<2>NFS$<2> client side. s Only display values for $<2>NFS$<2> server
side. M Extract values associated with the name list from...


...

and dumb has its own issues:

(netbsd-current:~) setenv TERM dumb
(netbsd-current:~) man -k nfs
nfsstat (1) display NFS statistics
nfsstat displays statistics kept about NFS client and server activity.
The options are as follows: c Only display values for NFS client side. s
Only display values for NFS server side. M Extract values associated
with the name list from...
...
perltrap (1) Perl traps for the unwary
...CW Awk Perl ARGC scalar @ARGV (compare with
$#ARGV) ARGV[0] $0 FILENAME $ARGV FNR $. -
something FS (whatever you like) NF $#Fld, or
some such NR $. OFMT $# OFS $,
ORS $ RLENGTH length($&) RS $/
RSTART length($) SUBSEP $; R 4 You cannot set...
...
tcsh (1) C shell with file name completion and command line editing
...newer/f/' 'n/-{,n}cpio/f/' n/-exec/c/' 'n/-ok/c/' 'n/-user/u/'
'n/-group/g/' 'n/-fstype/(nfs 4.2)/' 'n/-type/(b c d f l p s)/'
c/-/(name newer cpio ncpio exec ok user...

Is it possible to add in a new switch, such as "-H"
to give the old style of output?

(I don't know how substantial the changes have been behind the scenes...)

Darren
Martin Husemann
2014-08-01 16:22:06 UTC
Permalink
Post by Darren Reed
Setting APROPOS to -1 did not work.
ell, not one.

Martin
Paul Goyette
2014-08-01 16:29:37 UTC
Permalink
Letter 'l', for "legacy mode"

:)
Post by Darren Reed
Setting APROPOS to -1 did not work.
(netbsd-current:~) setenv APROPOS -1
(netbsd-current:~) man -k nfs
$<2>nfsstat$<2> ($<2>1$<2>) $<2>display NFS statistics$<2>
nfsstat displays statistics kept about $<2>NFS$<2> client and server
activity. The options are as follows: c Only display values for
$<2>NFS$<2> client side. s Only display values for $<2>NFS$<2> server
side. M Extract values associated with the name list from...
...
(netbsd-current:~) setenv TERM dumb
(netbsd-current:~) man -k nfs
nfsstat (1) display NFS statistics
nfsstat displays statistics kept about NFS client and server activity.
The options are as follows: c Only display values for NFS client side. s
Only display values for NFS server side. M Extract values associated
with the name list from...
...
perltrap (1) Perl traps for the unwary
$#ARGV) ARGV[0] $0 FILENAME $ARGV FNR $. -
something FS (whatever you like) NF $#Fld, or
some such NR $. OFMT $# OFS $,
ORS $ RLENGTH length($&) RS $/
RSTART length($) SUBSEP $; R 4 You cannot set...
...
tcsh (1) C shell with file name completion and command line editing
...newer/f/' 'n/-{,n}cpio/f/' n/-exec/c/' 'n/-ok/c/' 'n/-user/u/'
'n/-group/g/' 'n/-fstype/(nfs 4.2)/' 'n/-type/(b c d f l p s)/'
c/-/(name newer cpio ncpio exec ok user...
Is it possible to add in a new switch, such as "-H"
to give the old style of output?
(I don't know how substantial the changes have been behind the scenes...)
Darren
-------------------------------------------------------------------------
| Paul Goyette | PGP Key fingerprint: | E-mail addresses: |
| Customer Service | FA29 0E3B 35AF E8AE 6651 | paul at whooppee.com |
| Network Engineer | 0786 F758 55DE 53BA 7731 | pgoyette at juniper.net |
| Kernel Developer | | pgoyette at netbsd.org |
-------------------------------------------------------------------------
Loading...