Re: Inconsistent macro notation in manual pages.

Morten Bo Johansen <[email protected]>
Newsgroups gmane.comp.printing.groff.general
Message-ID <[email protected]>
On 2026-02-28 G. Branden Robinson wrote:

> Here it is as a shell function you can put in your
> .bashrc (or startup file for some other POSIX shell).
>
>     # Search for a word in a given man page.
>     #
>     # Equivalent examples (if using man-db man): tagman am 7 groff
>     #                                            tagman am 'groff(7)'
>     #                                            tagman am -s 7 groff
>     tagman () {
>       word=$1
>       shift
>       man "$@" | "${PAGER:-less}" -c '+/[^a-zA-Z0-9]'"$word"'[^a-zA-Z0-9]'
>     }

[ By accident, I sent this to Branden in private mail ]

Thanks for this, Branden.

Alexis: most(1) needs the "-r" switch to use regular expressions.

Regards,
Morten
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.