This commit is contained in:
Olivier Mehani 2026-01-20 05:16:34 -03:00 committed by GitHub
commit fb7ddce14e
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
2 changed files with 17 additions and 0 deletions

View file

@ -13,5 +13,18 @@ if [[ ! -f "$ZSH_CACHE_DIR/completions/_mise" ]]; then
_comps[mise]=_mise
fi
if [[ "$ZSH_MISE_AUTOEXPORT_VERSIONS" != true ]]; then
_updateMiseVersions() {
unset -m "MISE_TOOL_*"
eval $(mise ls -c --no-header \
| sed 's/^\(\S\+\)\s\+\(\S\+\).*$/export MISE_TOOL_\U\1=\2/')
}
autoload -U add-zsh-hook
add-zsh-hook chpwd _updateMiseVersions
_updateMiseVersions # Initial call to check the current directory at shell startup
fi
# Generate and load mise completion
mise completion zsh >| "$ZSH_CACHE_DIR/completions/_mise" &|