mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-08-16 01:38:11 +02:00
fix(plugins): fix _comps
error in completion generation plugins (#10190)
Fixes #10190
This commit is contained in:
@ -12,12 +12,18 @@ alias dup='deno upgrade'
|
||||
|
||||
# COMPLETION FUNCTION
|
||||
if (( $+commands[deno] )); then
|
||||
if [[ ! -f $ZSH_CACHE_DIR/deno_version ]] \
|
||||
|| [[ "$(deno --version)" != "$(< "$ZSH_CACHE_DIR/deno_version")" ]] \
|
||||
|| [[ ! -f $ZSH/plugins/deno/_deno ]]; then
|
||||
deno completions zsh > $ZSH/plugins/deno/_deno
|
||||
deno --version > $ZSH_CACHE_DIR/deno_version
|
||||
ver="$(deno --version)"
|
||||
ver_file="$ZSH_CACHE_DIR/deno_version"
|
||||
comp_file="$ZSH/plugins/deno/_deno"
|
||||
|
||||
if [[ ! -f "$comp_file" || ! -f "$ver_file" || "$ver" != "$(< "$ver_file")" ]]; then
|
||||
deno completions zsh >| "$comp_file"
|
||||
echo "$ver" >| "$ver_file"
|
||||
fi
|
||||
|
||||
declare -A _comps
|
||||
autoload -Uz _deno
|
||||
_comps[deno]=_deno
|
||||
|
||||
unset ver ver_file comp_file
|
||||
fi
|
||||
|
Reference in New Issue
Block a user