mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2026-05-22 04:51:12 +02:00
fix: resolve multiple bugs across git prompt, colorize, and globalias plugins
This commit is contained in:
parent
a07126330b
commit
c5fb48da9d
3 changed files with 14 additions and 5 deletions
|
|
@ -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
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue