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

Re: zsh built in help features



On 18 Oct 2019, at 07:11, Perry Smith <pedz@xxxxxxxxxxxxxxxx> wrote:
> I had found the _run-help script (is that what they are called?) and
> found that HELPDIR needed to be set but then it does an
> anonymous function with magic I don’t yet understand and
> finally falls back to _man.

The functions prefixed with _ are completion functions. The files for the
functions themselves are located elsewhere. To find one you can either run
`whence -v` on it (but it must be loaded first), or do something like the
following:

  # Print matching file paths
  print -rl - $^fpath/**/run-help(N)

  # Print contents of matching files
  cat -- $^fpath/**/run-help(N)

(whence/which/where can also print the contents, but again only after the
function is loaded, and they will strip all of the comments and formatting)

dana



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