Mercurial > repos > other > linux
view nanorc.d/sh.nanorc @ 116:d2c73b0b5c36
Add a combining underline
Used (imperfectly) in https://twitter.com/IBBoard/status/1004067517751549957
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Mon, 09 Jul 2018 20:08:20 +0100 |
parents | 5f2c5800fa8a |
children |
line wrap: on
line source
## Here is an example for Bourne shell scripts. syntax "sh" "\.sh$" header "^#!.*((ba|da|k|pdk)?sh[-0-9_]*|openrc-run|runscript)" magic "(POSIX|Bourne-Again) shell script.*text" linter dash -n comment "#" icolor cyan "^[0-9A-Z_]+\(\)" color cyan "\<(break|case|continue|do|done|elif|else|esac|exit|fi|for|function|if|in|read|return|select|shift|then|time|until|while)\>" color cyan "\<(declare|eval|exec|export|let|local)[[:space:]]\>" color cyan "[{}():;|`$<>!=&\\]" "(\]|\[)" color cyan "(function )?[a-zA-Z0-9_]+[[:space:]]*\(\)" color cyan "-[Ldefgruwx]\>" color red "-(eq|ne|gt|lt|ge|le|s|n|z)\>" color red "&&|\|\|" color brightblue "\<(awk|cat|cd|ch(grp|mod|own)|cp|echo|env|grep|install|ln|make|mkdir|mv|popd|printf|pushd|rm|rmdir|sed|set|tar|touch|umask|unset)\>" # Basic variable names (no braces). color magenta "\$[-0-9@*#?$!]" "\$[[:alpha:]_][[:alnum:]_]*" # More complicated variable names; handles braces and replacements and arrays. color magenta "\$\{[#!]?([-@*#?$!]|[0-9]+|[[:alpha:]_][[:alnum:]_]*)(\[([[:space:]]*[[:alnum:]_]+[[:space:]]*|@)\])?(([#%/]|:?[-=?+])[^}]*\}|\[|\})" # Strings. color yellow ""(\\.|[^"])*"" "'(\\.|[^'])*'" # Comments. color green "(^|[[:space:]])#.*$" # Trailing whitespace. color ,green "[[:space:]]+$"