pattern, regexp: Declare the variable in the documentation example

Fixes #590.
This commit is contained in:
Tobias Sette
2018-12-12 03:56:56 -02:00
committed by Daniel Shahaf
parent e900ad8bad
commit 3dc74b5c2c
2 changed files with 4 additions and 0 deletions

View File

@@ -9,6 +9,9 @@ This is the `pattern` highlighter, that highlights user-defined patterns.
To use this highlighter, associate patterns with styles in the
`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:
ZSH_HIGHLIGHT_PATTERNS+=('rm -rf *' 'fg=white,bold,bg=red')