fix: resolve multiple bugs across git prompt, colorize, and globalias plugins

This commit is contained in:
Codebuff Contributor 2026-05-16 06:16:40 +06:00
commit c5fb48da9d
3 changed files with 14 additions and 5 deletions

View file

@ -3,9 +3,13 @@ globalias() {
# (z) splits into words using shell parsing
# (A) makes it an array even if there's only one element
local word=${${(Az)LBUFFER}[-1]}
if [[ $GLOBALIAS_FILTER_VALUES[(Ie)$word] -eq 0 ]]; then
zle _expand_alias
zle expand-word
# Don't expand if the word looks like an environment variable assignment
# (e.g. DEBUG=1 or KEY="value") to avoid expanding aliases in env vars
if [[ $word != *"="* ]]; then
if [[ $GLOBALIAS_FILTER_VALUES[(Ie)$word] -eq 0 ]]; then
zle _expand_alias
zle expand-word
fi
fi
zle self-insert
}