Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add instructions about initializing variable #525

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open

Add instructions about initializing variable #525

wants to merge 1 commit into from

Conversation

issmirnov
Copy link

Many users use modular configuration loaders for zshrc. Adding a note to users explaining how to define ZSH_HIGHLIGHT_PATTERNS before sourcing zsh-syntax-highlighting. The typeset is important, since simply setting the variable doesn't have the desired effect.

Many users use modular configuration loaders for zshrc. Adding a note to users explaining how to define ZSH_HIGHLIGHT_PATTERNS before sourcing zsh-syntax-highlighting. The typeset is important, since simply setting the variable doesn't have the desired effect.
@issmirnov
Copy link
Author

See discussion in #524

@danielshahaf
Copy link
Member

See discussion in #524

The cases are similar but there's an important distinction: #524 is about an array (typeset -ga) and this issue is about an associative array (typeset -gA). Just writing foo=(1 2 3) implicitly declares foo as a normal array; typeset -A must be used before assigning to an associative array.

(I don't use the pattern highlighter so I hoped one of the other devs would review this patch.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants