X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=runtime%2Fsyntax%2Fsh.yaml;h=5776c5963566484059392279e67c5bd4f61db973;hb=54c23cae72d7237bc898a59f79aad0acffdf0ffe;hp=02d176e16ab5df82d71e1f94c9709b20fbad1969;hpb=e4c2f5d25948dbea51ee94506060ef6fe44924c6;p=micro.git diff --git a/runtime/syntax/sh.yaml b/runtime/syntax/sh.yaml index 02d176e1..5776c596 100644 --- a/runtime/syntax/sh.yaml +++ b/runtime/syntax/sh.yaml @@ -1,8 +1,8 @@ filetype: shell detect: - filename: "(\\.sh$|\\.bash|\\.bashrc|bashrc|\\.bash_aliases|bash_aliases|\\.bash_functions|bash_functions|\\.bash_profile|bash_profile|Pkgfile|pkgmk.conf|profile|rc.conf|PKGBUILD|.ebuild\\$|APKBUILD)" - header: "^#!.*/(env +)?(ba)?sh( |$)" + filename: "(\\.sh$|\\.bash|\\.ash|bashrc|bash_aliases|bash_functions|profile|bash-fc\\.|Pkgfile|pkgmk.conf|rc.conf|PKGBUILD|.ebuild\\$|APKBUILD)" + header: "^#!.*/(env +)?(ba)?(a)?(mk)?sh( |$)" rules: # Numbers @@ -20,8 +20,8 @@ rules: - statement: "--[a-z-]+" - statement: "\\ -[a-z]+" - - identifier: "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?" - - identifier: "\\$\\{?[0-9A-Z_!@#$*?-]+\\}?" + - identifier: "\\$\\{?[0-9A-Za-z_!@#$*?-]+\\}?" + - identifier: "\\$\\{?[0-9A-Za-z_!@#$*?-]+\\}?" - constant.string: start: "\"" @@ -36,7 +36,7 @@ rules: rules: [] - comment: - start: "(^|[[:space:]])#" + start: "(^|\\s)#" end: "$" rules: - todo: "(TODO|XXX|FIXME):?"