mirror of
https://github.com/ohmyzsh/ohmyzsh.git
synced 2025-12-05 01:46:46 +01:00
fix(init): set completion colors on theme load, not with precmd
This fixes an edge case where the user actually sets zstyle ':completion:*' list-colors in their zshrc, but the previous code used a precmd hook, which would override the user changes. With this change our modifications will be set in the init script, after the theme loads, so that later changes can affect our defaults. Note that this will not be run for users on plugin managers, as these don't generally run our init script.
This commit is contained in:
parent
46fd7972a2
commit
d342b353e3
2 changed files with 3 additions and 10 deletions
|
|
@ -189,3 +189,6 @@ if [[ -n "$ZSH_THEME" ]]; then
|
|||
echo "[oh-my-zsh] theme '$ZSH_THEME' not found"
|
||||
fi
|
||||
fi
|
||||
|
||||
# set completion colors to be the same as `ls`, after theme has been loaded
|
||||
[[ -z "$LS_COLORS" ]] || zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue