Re: Inconsistent macro notation in manual pages.
"G. Branden Robinson" <[email protected]>
| Newsgroups | gmane.comp.printing.groff.general |
|---|---|
| Message-ID | <20260228213839.zyj5mzwir5vuzqkh@illithid> |
Hi Alexis of the flexible beast, At 2026-02-28T17:01:19+1100, Alexis wrote: > "G. Branden Robinson" <[email protected]> writes: > > # 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]' > > } > > As a data point, this nifty function overall worked for me with mandoc > man(1) as well, although: > > * mandoc man(1) doesn't like 'groff(7)' as an argument, resulting in > a "No entry for groff(7) in the manual" error. (`man 7 groff` > works fine.) Right. Support for that form of man page specification is unique to man-db man, as far as I know. Colin Watson would be the authority here. > * i've been trialing using most(1) instead of less(1), and the > function doesn't work with the former. Sounds like it doesn't attempt to support even the relatively small number of command-line options specified for more(1) by the POSIX standard. https://pubs.opengroup.org/onlinepubs/9799919799/utilities/more.html Maybe doing so is not part of its mission, or the program simply needs further development. Regards, Branden
signature.asc
(application/pgp-signature, 833 B)
-----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEEh3PWHWjjDgcrENwa0Z6cfXEmbc4FAmmjYFgACgkQ0Z6cfXEm bc4JbA//eu9zfCIEixnNwsIhPVLmJhMJdolfihAJXNYaojuAlvR4HPlBWeqOjInI PKrumYy25SyZGt8TkwvQZIDbdlGWWhPo7Q88ssro7ojvkIgdH9GtXFkX5h5JdF5p F77Fm64/EonDCACJz/nGoz60/X2LT0kE2+OIXEs+V5Gqka2ZLhYRRDog7Bx6yL+C 9p/fISTiv/h4AXraAgp0X5fYts3WJAOFSy6mCYOaM01Qi/1kPoeM+JuABBcSkhlv /dyD3PPT8pnlhXfw2C8KwqpYLFw5Aqtu0t1LA5Q5bOXHOgEO6ZaoiY+LmZR/kVnt fsmkwOlqD0GPjbGtupzP8O8ZVMmIG8AdurRZma9R6bEXjfR4CTVZZ55NlzEc5rdc 13C3LM0NYZ5JuG/Dn/v2b1ZPPT7rtJlbZhkPpcJGlMe+FLu8BKNVXlLK32eCh/cl iqOGoE+SPo27yCVAvTTSW5LDMOTI7H+OQ2AeNbjUHubUJ067X9uyqDgFMhk8aCwc J8uxh4hjftiyz9HogfpahllWttsISTzvrxuH3KAUxDED5ePNNTQFcHZrOP6dBZN/ HuiOKQVuq3aHzFVduVyMXmEe8hIWLKICP33m4Ur9Jsp/7uPs11fm4QivzgXCGVkq intiEmg2qFXsOjkigDFKSoZ9eBgrmqRmwTwkd6eZChD/ksVYV9c= =TXea -----END PGP SIGNATURE-----