Does less
(or any other lightweight pager I could use as $PAGER
) has such a feature?
For example, if I type man bash
and then enter /incorporates
it doesn't find the word, despite it being right there, in the second paragraph:
DESCRIPTION Bash is an sh-compatible command language interpreter that executes commands read from the standard input or from a file. Bash also incor- porates useful features from the Korn and C shells (ksh and csh).
My djvu and pdf viewer "incorporates" such a feature, and probably other document viewers do too. (pdftotext
simply re-joins the words, which means that pdftotext file.pdf - | grep pattern
may still be more reliable than pdfgrep
).
IIRC info
(the GNU texinfo docs viewer) just doesn't hyphenate the words, in order to avoid this. While not directly actionable (I'm mostly using less
with preformatted files), I would also be interested in any groff/mandoc options/tricks that could inhibit the end-of-line hyphenation.
less
specifically or aboutman
when the pager isless
- however you may find the discussion here helpful: How can I keep “man” from hyphenating items? MANWIDTH? – steeldriver Mar 20 '20 at 17:30