2010-07-29 00:15:43 +02:00
## Here is an example for Bourne shell scripts.
##
2019-12-18 15:34:49 +01:00
syntax "SH" "\.sh$" "\.ash" "\.bashrc" "bashrc" "\.bash_aliases" "bash_aliases" "\.bash_functions" "bash_functions" "\.bash_login" "\.bash_logout" "\.bash_profile" "bash_profile" "\.profile" "revise\..+$"
header "^#!.*/(env +)?(ba|da|a)?sh( |$)"
2019-12-18 17:20:31 +01:00
magic "(POSIX|Bourne-Again) shell script.*text"
2019-12-18 17:13:13 +01:00
comment "#"
2019-12-18 17:20:31 +01:00
linter dash -n
2019-06-06 08:27:13 +02:00
## keywords:
color green "\<(case|do|done|elif|else|esac|fi|for|function|if|in|select|then|time|until|while)\>"
2010-07-29 00:15:43 +02:00
color green "(\{|\}|\(|\)|\;|\]|\[|`|\\|\$|<|>|!|=|&|\|)"
color green "-[Ldefgruwx]\>"
color green "-(eq|ne|gt|lt|ge|le|s|n|z)\>"
2019-06-06 08:27:13 +02:00
## builtins:
2019-06-06 08:40:13 +02:00
color brightblue "\<(alias|bg|bind|break|builtin|caller|cd|command|compgen|complete|compopt|continue|declare|dirs|disown|echo|enable|eval|exec|exit|export|false|fc|fg|getopts|hash|help|history|jobs|kill|let|local|logout|mapfile|popd|printf|pushd|pwd|read|readarray|readonly|return|set|shift|shopt|source|suspend|test|times|trap|true|type|typeset|ulimit|umask|unalias|unset|wait)\>"
2019-06-06 08:27:13 +02:00
## not buitins:
## cat|chmod|chown|cp|env|grep|install|ln|make|mkdir|mv|rm|sed|tar|touch
2015-04-21 09:00:55 +02:00
icolor brightgreen "^\s+[0-9A-Z_]+\s+\(\)"
2021-10-05 15:30:34 +02:00
icolor brightred "\$\{?[0-9A-Z_!@#%$*?-]+\}?"
2010-07-29 00:15:43 +02:00
color brightyellow ""(\\.|[^"])*"" "'(\\.|[^'])*'"
2014-08-03 00:25:00 +02:00
color cyan "(^|[[:space:]])#.*$"
2016-06-12 18:48:32 +02:00
color ,green "[[:space:]]+$"