X-Git-Url: https://git.lizzy.rs/?a=blobdiff_plain;f=runtime%2Fsyntax%2Fsh.yaml;h=54268269b88559a0c28449b5668b80d49c793159;hb=185b8de17b8812a9990f38beb30858f5bfb4fedc;hp=88f72033b003f50264c07cd96ba022b7939f3ea0;hpb=299712ead3f31d81d968ae6459d1070324cb2d6a;p=micro.git diff --git a/runtime/syntax/sh.yaml b/runtime/syntax/sh.yaml index 88f72033..54268269 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|bashrc|\\.bash_aliases|bash_aliases|\\.bash_functions|bash_functions|\\.bash_profile|bash_profile|\\.profile|profile|Pkgfile|pkgmk.conf|profile|rc.conf|PKGBUILD|.ebuild\\$|APKBUILD)" + header: "^#!.*/(env +)?(ba)?(a)?sh( |$)" rules: # Numbers @@ -20,12 +20,13 @@ 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: "\"" end: "\"" + skip: "\\\\." rules: - constant.specialChar: "\\\\." @@ -35,7 +36,7 @@ rules: rules: [] - comment: - start: "#" + start: "(^|\\s)#" end: "$" rules: - todo: "(TODO|XXX|FIXME):?"