mirror of
https://github.com/dcarrillo/prezto.git
synced 2025-07-01 23:19:25 +00:00
Make .zcomp* location configurable (#1842)
This commit is contained in:
@ -39,12 +39,13 @@ typeset -A compl_commands=(
|
||||
|
||||
for compl_command in "${(k)compl_commands[@]}"; do
|
||||
if (( $+commands[$compl_command] )); then
|
||||
cache_file="${TMPDIR:-/tmp}/prezto-$compl_command-cache.$UID.zsh"
|
||||
cache_file="${XDG_CACHE_HOME:-$HOME/.cache}/prezto/$compl_command-cache.zsh"
|
||||
|
||||
# Completion commands are slow; cache their output if old or missing.
|
||||
if [[ "$commands[$compl_command]" -nt "$cache_file" \
|
||||
|| "${ZDOTDIR:-$HOME}/.zpreztorc" -nt "$cache_file" \
|
||||
|| ! -s "$cache_file" ]]; then
|
||||
mkdir -p "$cache_file:h"
|
||||
command ${=compl_commands[$compl_command]} >! "$cache_file" 2> /dev/null
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user