aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorLibravatar sommerfeld <[email protected]>2026-04-17 10:53:33 +0100
committerLibravatar sommerfeld <[email protected]>2026-04-17 10:53:33 +0100
commit6fae53bcea76eb3057014c0a583237756d637182 (patch)
tree0405ea456d5099d20c92fbe32152f1020541733d
parent70c58e6e1c587dfc95e474f6facc18fb685b7512 (diff)
downloaddotfiles-6fae53bcea76eb3057014c0a583237756d637182.tar.gz
dotfiles-6fae53bcea76eb3057014c0a583237756d637182.tar.bz2
dotfiles-6fae53bcea76eb3057014c0a583237756d637182.zip
fix: declare ZSH_HIGHLIGHT_STYLES before subscript assignment
With extendedglob on, ZSH_HIGHLIGHT_STYLES[comment] triggers 'assignment to invalid subscript range' because the array doesn't exist yet and [comment] is parsed as a glob pattern. Explicitly declare it as an associative array first.
-rw-r--r--home/.config/zsh/.zshrc1
1 files changed, 1 insertions, 0 deletions
diff --git a/home/.config/zsh/.zshrc b/home/.config/zsh/.zshrc
index cd6458e..b94733a 100644
--- a/home/.config/zsh/.zshrc
+++ b/home/.config/zsh/.zshrc
@@ -288,6 +288,7 @@ _fzf_compgen_dir() { fd --type d --hidden --follow --exclude ".git" . "$1" }
# ── Plugins (must be sourced last) ────────────────────────────────────────────
# Highlight config must be set BEFORE sourcing the plugin
ZSH_HIGHLIGHT_HIGHLIGHTERS=(main brackets pattern)
+typeset -A ZSH_HIGHLIGHT_STYLES
ZSH_HIGHLIGHT_STYLES[comment]='fg=yellow'
source /usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh