mirror of
https://github.com/scopatz/nanorc
synced 2024-11-24 03:10:26 +01:00
move sh and zsh function definition highlighters after the keywords (as they can override)
This commit is contained in:
parent
e6c08f817f
commit
f1d9ca85cc
|
@ -3,12 +3,12 @@
|
|||
syntax "sh" "\.sh$" "\.bashrc" "bashrc" "\.bash_aliases" "bash_aliases" "\.bash_functions" "bash_functions" "\.bash_profile" "bash_profile"
|
||||
header "^#!.*/(env +)?(ba)?sh( |$)"
|
||||
|
||||
icolor brightgreen "^[0-9A-Z_]+\(\)"
|
||||
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 "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
|
||||
color green "-[Ldefgruwx]\>"
|
||||
color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
|
||||
color brightblue "\<(cat|cd|chmod|chown|cp|echo|env|export|grep|install|let|ln|make|mkdir|mv|rm|sed|set|tar|touch|umask|unset)\>"
|
||||
icolor brightgreen "^\s+?[0-9A-Z_]+\s+?\(\)"
|
||||
icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?"
|
||||
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
|
||||
color cyan "(^|[[:space:]])#.*$"
|
||||
|
|
|
@ -5,9 +5,6 @@ header "^#!.*/(env +)?zsh( |$)"
|
|||
## Numbers
|
||||
color brightwhite "[0-9]+"
|
||||
|
||||
## Function definition
|
||||
icolor brightgreen "^\s+?(function\s+)?[0-9A-Z_]+\s+?\(\)"
|
||||
|
||||
## Conditionals and control flow
|
||||
color green "\<(always|case|do|done|elif|else|esac|exit|fi|for|function|if|in|local|read|return|select|shift|then|time|until|while)\>"
|
||||
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
|
||||
|
@ -22,6 +19,9 @@ color brightblue "\<(add-zsh-hook|autoload|compinit|echotc|emulate|print|prompt(
|
|||
## Common linux commands
|
||||
color brightmagenta "\<(cat|chmod|chown|cp|echo|env|false|find|grep|install|kill|ln|make|mkdir|mv|pwd|rm|rmdir|sed|tar|true|touch|uname|wc|whoami)\>"
|
||||
|
||||
## Function definition
|
||||
icolor brightgreen "^\s+?(function\s+)?[0-9A-Z_]+\s+?\(\)"
|
||||
|
||||
## Variables
|
||||
icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?"
|
||||
|
||||
|
|
Loading…
Reference in New Issue
Block a user