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
|
|
@ -90,6 +90,7 @@ colorize_less() {
|
|||
# (e.g. when not scrolled to the bottom) while already the next file will be displayed.
|
||||
local LESSOPEN="| zsh -c 'source \"$ZSH_COLORIZE_PLUGIN_PATH\"; \
|
||||
ZSH_COLORIZE_TOOL=$ZSH_COLORIZE_TOOL ZSH_COLORIZE_STYLE=$ZSH_COLORIZE_STYLE \
|
||||
ZSH_COLORIZE_CHROMA_FORMATTER=$ZSH_COLORIZE_CHROMA_FORMATTER \
|
||||
colorize_cat %s 2> /dev/null'"
|
||||
|
||||
# LESSCLOSE will be set to prevent any errors by executing a user script
|
||||
|
|
|
|||
|
|
@ -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