For performance reasons, we prefer detecting Homebrew prefix internally
instead of the more idiomatic form `brew --repository`.
We attempt looking up $HOMEBREW_REPOSITORY first (in case `brew shellenv`
has been sourced-in earlier). Else, we look it up by resolving absolute
path of $HOMEBREW_REPOSITORY.
This should work for most standard (and officially documented) Homebrew
installations.
Zsh and Prezto files don't always reside in `~/`. Instead, they have
a more spec compliant location (`${ZDOTDIR:-$HOME}/`). Make them
unambiguous in the documentation. Likewise, for `$GNUPGHOME`.
Further, add instruction for optionally setting up Prezto in
`$XDG_CONFIG_HOME`.
While at this, also add clarification on relative ordering of some of
the modules, apply more formatting tweaks and doc improvements.
General purpose reformating and rewording in (a few places). This should
also make markdown linting happier.
Prefer back-ticks wherever useful and use `console` for code blocks to
be executed on terminal.
Also, update references links wherever possible (including update from
'http://' to 'https://').
Now that 'command-not-found' helper loading has been significantly
simplified and the startup time improved in the official Homebrew tap,
the workaround for script detection (and caching) can be removed.
As is the convention in prezto, we cache the command-not-found handler to
avoid incurring the performance penalty of loading ruby interpreter on
every call. This restores the 'Homebrew way' of loading command-not-found
handler.
Further, the formally recommended command lookup mechanism in Homebrew
(viz., `brew command command-not-found-init`) is ruby based and is super
slow. To avoid performance penalty, we `find` it ourselves from
`TAP_DIRECTORY` defined internally in Homebrew.
This also reinstates support for custom taps or non-standard Homebrew location.