## Syntax highlighting for zsh scripts (initially copied from sh.nanorc) syntax "zsh" "\.zsh[^\.]+?$" header "^#!.*/zsh" ## Function definition icolor brightgreen "^[0-9A-Z_]+\(\)" ## Conditionals and control flow color green "\<(case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>" color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)" ## Conditional flags color green "-[Ldefgruwx]\>" color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>" ## Bash-inherited / common linux commands color brightblue "\<(alias|bindkey|cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|source|tar|touch|umask|unset)\>" ## zsh-specific color brightblue "\<(autoload|compinit|prompt(init)?|setopt|zmodload|zstyle)\>" ## Variables icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?" ## Comments color cyan "(^|[[:space:]])#.*$" ## Strings color brightyellow ""(\\.|[^"])*"" color brightyellow "'(\\.|[^'])*'" ## Trailing spaces #color ,green "[[:space:]]+$"