A: 

You could use the internet... all of the man pages are on it... just prefix your searches with

zsh man

(If you know where they are located on the harddrive... you might be able to grep them... I don't know as I have not ever needed to myself)

SeanJA
+2  A: 

Using the internet is probably the best way. The other approach is to use the zshall manpage, which contains all the manpages together. You can then search for compinit in whatever viewer you're using.

EDIT: I just remembered a better way of doing this: Use zsh's run-help function.

$> run-help compinit

This will take you to the manpage that zsh thinks is most appropriate for the topic. It also works for non-zsh related topics like ps, grep, etc, but has been adjusted to work for zsh topics as well.

If for some reason run-help isn't loaded, you can use

$> autoload run-help

to do so.

sykora
I get "no manual entry for compinit". I think that you have something in your .zshrc which has expanded your manuals for Zsh. I have the following in .zshrc: "autoload run-help" and "HELPDIR=~/zsh_help". Perhaps, you have downloaded Zsh manuals to zsh_help?
Masi
In either case, run-help compinit gives me the manpage for zshcompsys, so you can try there. I've checked my zshrc setup, and there isn't anything there that greatly influences the manpage lookups.
sykora
@sykora: I have Zsh 4.3.4. Which is your version of Zsh? I have another question too. Which is your OS? Mine is OSX.
Masi
I am using zsh version 4.3.9 on Debian squeeze/sid, but run-help has been working for me since 4.2.5
sykora
@Sykora: Do you know where the command run-help loads the manuals?
Masi
+2  A: 

Often for this kind of thing man -k compinit works, because authors are sensible enough to put lots of identifiers into the "short description" of the man page.

This doesn't seem to be the case here ... so you're going to have to grep through the source. Which is gzipped ...

zgrep -c compinit /usr/share/man/man1/zsh*

or if you don't have zgrep:

cd tmp
cp /usr/share/man/man1/zsh* .
gunzip zsh*.gz
grep -c compinit zsh*

There are more elegant ways to do this, but that gives you a list of how often compinit appears in each file:

zsh.1:0
zsh4.1:0
zshall.1:0
zshbuiltins.1:0
zshcalsys.1:0
zshcompctl.1:0
zshcompsys.1:29
zshcompwid.1:0
zshcontrib.1:0
zshexpn.1:0
zshmisc.1:0
zshmodules.1:1
zshoptions.1:0
zshparam.1:0
zshroadmap.1:0
zshtcpsys.1:0
zshzftpsys.1:0
zshzle.1:0
Sharkey
@Sharkey: Your commands are useful. Thank you!
Masi