mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-06-05 12:36:30 +08:00
Add instruction to declare the variable
This commit is contained in:
parent
e900ad8bad
commit
8bb3b11962
@ -9,6 +9,9 @@ This is the `pattern` highlighter, that highlights user-defined patterns.
|
|||||||
To use this highlighter, associate patterns with styles in the
|
To use this highlighter, associate patterns with styles in the
|
||||||
`ZSH_HIGHLIGHT_PATTERNS` associative array, for example in `~/.zshrc`:
|
`ZSH_HIGHLIGHT_PATTERNS` associative array, for example in `~/.zshrc`:
|
||||||
|
|
||||||
|
# Declare the variable
|
||||||
|
typeset -A ZSH_HIGHLIGHT_PATTERNS
|
||||||
|
|
||||||
# To have commands starting with `rm -rf` in red:
|
# To have commands starting with `rm -rf` in red:
|
||||||
ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red')
|
ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red')
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user