Allow setting a cache file name suffix, e.g. "-${TERM}"
When mixing tmux (TERM=tmux-256color) and native terminal windows/tabs
(e.g. TERM=xterm-kitty), since they share the same instant prompt cache
files, the cache files are invalidated every time I start a new Zsh in a
different $TERM [1].
People who have this issue can set _P10K_CACHE_SUFFIX="-${TERM}" to work
around it.
[1] e2db860745
This commit is contained in:
parent
bde5ca4c2a
commit
82fdf6848d
3 changed files with 7 additions and 7 deletions
|
@ -53,7 +53,7 @@ function _p9k_init_locale() {
|
|||
(( $+functions[_p9k_setup] )) && _p9k_setup
|
||||
return 0
|
||||
fi
|
||||
typeset -gr __p9k_dump_file=${XDG_CACHE_HOME:-~/.cache}/p10k-dump-${(%):-%n}.zsh
|
||||
typeset -gr __p9k_dump_file=${XDG_CACHE_HOME:-~/.cache}/p10k-dump-${(%):-%n}${_P10K_CACHE_SUFFIX}.zsh
|
||||
if [[ $__p9k_dump_file != $__p9k_instant_prompt_dump_file ]] && (( ! $+functions[_p9k_preinit] )) && source $__p9k_dump_file 2>/dev/null && (( $+functions[_p9k_preinit] )); then
|
||||
_p9k_preinit
|
||||
fi
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue