Mercurial > repos > other > linux
view nanorc.d/sh.nanorc @ 135:298fa524406a
Update to latest HG Prompt and make it Python 3 compliant
author | IBBoard <dev@ibboard.co.uk> |
---|---|
date | Sat, 04 Jan 2020 20:09:53 +0000 |
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:]]+$"