1
0
mirror of https://github.com/scopatz/nanorc synced 2024-10-31 23:00:00 +01:00
nanorc/csh.nanorc
davidhcefx 3b48b83389 Force all syntax regex to ends with $
- Lots of syntax regex are poorly written and did not ends with a '$',
   which caused them competing with other regex rules.
2023-04-13 23:02:34 +08:00

16 lines
823 B
Plaintext

## Here is an example for c-shell scripts.
##
syntax "CSH" "\.csh$" "\.tcshrc$" "\.cshrc$" "\.login$" "\.logout$" "\.history$"
header "^#!.*/(env +)?(t)?csh( |$)"
color green "\<(break|breaksw|case|continue|default|else|end|endif|endsw|exec|exit|foreach|goto|if|repeat|shift|switch|then|while)\>"
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
color green "-[rfuMZwdgAUxlkebtAGoczpPsS]\>"
color green "-(A\:|M\:|U\:|G\:)\>"
color brightblue "\<(alias|bindkey|cat|cd|chmod|chown|complete|cp|echo|env|grep|install|ln|make|mkdir|mv|printenv|rm|sed|set|setenv|tar|touch|umask|unalias|uncomplete|unset|unsetenv)\>"
icolor brightgreen "^\s+[0-9A-Z_]+\s+\(\)"
icolor brightred "\$\{?[0-9A-Z_!@#$*?-]+\}?"
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
color cyan "(^|[[:space:]])#.*$"
color ,green "[[:space:]]+$"