mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-07-01 10:29:25 +00:00
Make .zcomp* location configurable (#1842)
This commit is contained in:
@ -21,11 +21,12 @@ elif (( $+commands[brew] )); then
|
||||
"$(brew --repository 2> /dev/null)"/Library/Taps/*/*/cmd/brew-command-not-found-init(|.rb)(.N)
|
||||
)
|
||||
if (( $#cnf_command )); then
|
||||
cache_file="${TMPDIR:-/tmp}/prezto-brew-command-not-found-cache.$UID.zsh"
|
||||
cache_file="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/brew-command-not-found-cache.zsh"
|
||||
|
||||
if [[ "${${(@o)cnf_command}[1]}" -nt "$cache_file" \
|
||||
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \
|
||||
|| ! -s "$cache_file" ]]; then
|
||||
mkdir -p "$cache_file:h"
|
||||
# brew command-not-found-init is slow; cache its output.
|
||||
brew command-not-found-init >! "$cache_file" 2> /dev/null
|
||||
fi
|
||||
|
Reference in New Issue
Block a user