mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
fix(core): move plugin-generated completion files to $ZSH_CACHE_DIR/completions
Fixes #10183
This commit is contained in:
parent
4e6e49652b
commit
d2269180b0
6 changed files with 24 additions and 5 deletions
|
|
@ -1,7 +1,10 @@
|
|||
if (( $+commands[fnm] )); then
|
||||
ver="$(fnm --version)"
|
||||
ver_file="$ZSH_CACHE_DIR/fnm_version"
|
||||
comp_file="$ZSH/plugins/fnm/_fnm"
|
||||
comp_file="$ZSH_CACHE_DIR/completions/_fnm"
|
||||
|
||||
mkdir -p "${comp_file:h}"
|
||||
(( ${fpath[(Ie)${comp_file:h}]} )) || fpath=("${comp_file:h}" $fpath)
|
||||
|
||||
if [[ ! -f "$comp_file" || ! -f "$ver_file" || "$ver" != "$(< "$ver_file")" ]]; then
|
||||
fnm completions --shell=zsh >| "$comp_file"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue