Вы не можете выбрать более 25 тем Темы должны начинаться с буквы или цифры, могут содержать дефисы(-) и должны содержать не более 35 символов.

27 строки
1.2 KiB

8 лет назад
  1. zsh-syntax-highlighting / highlighters / regexp
  2. ------------------------------------------------
  3. This is the `regexp` highlighter, that highlights user-defined regular
  4. expressions. It's similar to the `pattern` highlighter, but allows more complex
  5. patterns.
  6. ### How to tweak it
  7. To use this highlighter, associate regular expressions with styles in the
  8. `ZSH_HIGHLIGHT_REGEXP` associative array, for example in `~/.zshrc`:
  9. ZSH_HIGHLIGHT_REGEXP+=('\bsudo\b' fg=123,bold)
  10. This will highlight "sudo" only as a complete word, i.e., "sudo cmd", but not
  11. "sudoedit"
  12. The syntax for values is the same as the syntax of "types of highlighting" of
  13. the zsh builtin `$zle_highlight` array, which is documented in [the `zshzle(1)`
  14. manual page][zshzle-Character-Highlighting].
  15. See also: [regular expressions tutorial][perlretut], zsh regexp operator `=~`
  16. in [the `zshmisc(1)` manual page][zshmisc-Conditional-Expressions]
  17. [zshzle-Character-Highlighting]: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
  18. [perlretut]: http://perldoc.perl.org/perlretut.html
  19. [zshmisc-Conditional-Expressions]: http://zsh.sourceforge.net/Doc/Release/Conditional-Expressions.html#Conditional-Expressions