From 6fae53bcea76eb3057014c0a583237756d637182 Mon Sep 17 00:00:00 2001 From: sommerfeld Date: Fri, 17 Apr 2026 10:53:33 +0100 Subject: 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. --- home/.config/zsh/.zshrc | 1 + 1 file changed, 1 insertion(+) 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 -- cgit v1.2.3-70-g09d2