Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: zsh-5.2-test-3

Ray Andrews wrote on Sun, Dec 11, 2016 at 17:04:33 -0800:
> Yeah, did that now and it takes me to the right man page, but doesn't
> search within it for the command -- if that's even to be expected.
> I've often wondered if 'man' has some search that is specific to the
> command headings within one of those large files like zshcontrib.
> When the command is a common word, like 'test' one sees it dozens of
> times in plain text before one gets to the command itself.

Two optiosn:

1) Use regular expressions.  Assuming your $PAGER is 'less':

    man zshall
    /^ *test <Enter>
    [that's slash, caret, space, asterisk, etc — type it exactly so]

will find instance of 'test' on beginning of line, only.  Then `n'
to go to the next match.

Sidebar: I use MANOPT='--nh --nj' to inhibit hyphenation in manpages,
which is useful when grepping for words that would otherwise have
straddled a end-of-line hyphen.  (I also use MANWIDTH=80, but that's
a matter of preference.)

2) Use the HTML or PDF manual, which have indices at the end.  Looking
up `test' in the index will jump you to the right place.

Messages sorted by: Reverse Date, Date, Thread, Author