docs: Enable Syntax Highlighting for Code Snippits

This commit is contained in:
Sean Wei
2019-01-13 16:12:41 +08:00
parent 693757bfd7
commit 4fb570e104
12 changed files with 234 additions and 124 deletions

View File

@@ -10,8 +10,10 @@ patterns.
To use this highlighter, associate regular expressions with styles in the
`ZSH_HIGHLIGHT_REGEXP` associative array, for example in `~/.zshrc`:
typeset -A ZSH_HIGHLIGHT_PATTERNS
ZSH_HIGHLIGHT_REGEXP+=('\bsudo\b' fg=123,bold)
```zsh
typeset -A ZSH_HIGHLIGHT_PATTERNS
ZSH_HIGHLIGHT_REGEXP+=('\bsudo\b' fg=123,bold)
```
This will highlight "sudo" only as a complete word, i.e., "sudo cmd", but not
"sudoedit"