]> git.lizzy.rs Git - micro.git/blobdiff - runtime/syntax/sh.yaml
Merge pull request #1315 from matbesancon/patch-1
[micro.git] / runtime / syntax / sh.yaml
index 255f9ef7dc96e5d81cf0559a8354da0f5c69d0bf..5471e7ada2bb3394af13257169b204bf63b263cf 100644 (file)
@@ -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
@@ -25,17 +25,18 @@ rules:
 
     - constant.string:
         start: "\""
-        end: "(?<!\\\\)\""
+        end: "\""
+        skip: "\\\\."
         rules:
             - constant.specialChar: "\\\\."
 
     - constant.string:
         start: "'"
-        end: "(?<!\\\\)'"
+        end: "'"
         rules: []
 
     - comment:
-        start: "#"
+        start: "(^|\\s)#"
         end: "$"
         rules:
             - todo: "(TODO|XXX|FIXME):?"