diff --git a/runtime/syntax/awk.yaml b/runtime/syntax/awk.yaml index ff3f6988e7..33050cd399 100644 --- a/runtime/syntax/awk.yaml +++ b/runtime/syntax/awk.yaml @@ -2,7 +2,7 @@ filetype: awk detect: filename: "\\.awk$" - header: "^#!.*bin/(env +)?awk( |$)" + header: "^#!.*bin/(env +((-S|--split-string(=\\w+)? +)?)?)?awk( |$)" rules: - preproc: "\\$[A-Za-z0-9_!@#$*?\\-]+" diff --git a/runtime/syntax/csx.yaml b/runtime/syntax/csx.yaml index 5ba6ea1117..af4f4540fc 100644 --- a/runtime/syntax/csx.yaml +++ b/runtime/syntax/csx.yaml @@ -1,7 +1,7 @@ filetype: csharp-script detect: filename: "\\.csx$" - header: "^#!.*/(env +)?dotnet-script( |$)" + header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?dotnet-script( |$)" rules: - include: "csharp" diff --git a/runtime/syntax/fish.yaml b/runtime/syntax/fish.yaml index 73da226886..3f1834c95e 100644 --- a/runtime/syntax/fish.yaml +++ b/runtime/syntax/fish.yaml @@ -2,7 +2,7 @@ filetype: fish detect: filename: "\\.fish$" - header: "^#!.*/(env +)?fish( |$)" + header: "^#!.*/(env +((-S|--split-string=?[^\\s]*) +)?)?fish( |$)" rules: # Numbers diff --git a/runtime/syntax/groovy.yaml b/runtime/syntax/groovy.yaml index 1830f8b5e3..25ed8a607d 100644 --- a/runtime/syntax/groovy.yaml +++ b/runtime/syntax/groovy.yaml @@ -2,7 +2,7 @@ filetype: groovy detect: filename: "(\\.(groovy|gy|gvy|gsh|gradle)$|^[Jj]enkinsfile$)" - header: "^#!.*/(env +)?groovy *$" + header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?groovy *$" rules: # And the style guide for constants is CONSTANT_CASE diff --git a/runtime/syntax/javascript.yaml b/runtime/syntax/javascript.yaml index dcf7442fd1..8890cdece2 100644 --- a/runtime/syntax/javascript.yaml +++ b/runtime/syntax/javascript.yaml @@ -2,7 +2,7 @@ filetype: javascript detect: filename: "(\\.(m|c)?js$|\\.es[5678]?$)" - header: "^#!.*/(env +)?node( |$)" + header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?node( |$)" rules: - constant.number: "\\b[-+]?([1-9][0-9]*|0[0-7]*|0x[0-9a-fA-F]+)([uU][lL]?|[lL][uU]?)?\\b" @@ -27,7 +27,7 @@ rules: # - constant: "/[^*]([^/]|(\\\\/))*[^\\\\]/[gim]*" - constant: "\\\\[0-7][0-7]?[0-7]?|\\\\x[0-9a-fA-F]+|\\\\[bfnrt'\"\\?\\\\]" - - comment: "^#!.*/(env +)?node( |$)" + - comment: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?node( |$)" - identifier: "\\b(alert|decodeURI|decodeURIComponent|document|encodeURI|encodeURIComponent|escape|eval|isFinite|isNaN|parseFloat|parseInt|unescape|uneval|window)\\b" - identifier: "\\b(Intl|WebAssembly)\\b" diff --git a/runtime/syntax/julia.yaml b/runtime/syntax/julia.yaml index 6555032b14..fb9a939c44 100644 --- a/runtime/syntax/julia.yaml +++ b/runtime/syntax/julia.yaml @@ -2,7 +2,7 @@ filetype: julia detect: filename: "\\.jl$" - header: "^#!.*/(env +)?julia( |$)" + header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?julia( |$)" rules: diff --git a/runtime/syntax/justfile.yaml b/runtime/syntax/justfile.yaml index c32d5dd449..a931fe74f1 100644 --- a/runtime/syntax/justfile.yaml +++ b/runtime/syntax/justfile.yaml @@ -3,7 +3,7 @@ filetype: 'justfile' detect: filename: "(\\.?[Jj]ustfile|\\.just)$" - header: "^#!.*/(env +)?[bg]?just --justfile" + header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?[bg]?just --justfile" rules: - identifier: "^[a-zA-Z_][a-zA-Z0-9_-]*" diff --git a/runtime/syntax/makefile.yaml b/runtime/syntax/makefile.yaml index 7e90cdeb76..6ca5ff958e 100644 --- a/runtime/syntax/makefile.yaml +++ b/runtime/syntax/makefile.yaml @@ -2,7 +2,7 @@ filetype: makefile detect: filename: "([Mm]akefile|\\.ma?k)$" - header: "^#!.*/(env +)?[bg]?make( |$)" + header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?[bg]?make( |$)" rules: - preproc: "\\<(ifeq|ifdef|ifneq|ifndef|else|endif)\\>" diff --git a/runtime/syntax/nftables.yaml b/runtime/syntax/nftables.yaml index 489fdb0b29..9ca1619d40 100644 --- a/runtime/syntax/nftables.yaml +++ b/runtime/syntax/nftables.yaml @@ -2,7 +2,7 @@ filetype: nftables detect: filename: "(nftables\\.(conf|rules)$|nftables(\\.rules)?\\.d/)" - header: "^(#!.*/(env +)?nft( |$)|flush +ruleset)" + header: "^(#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?nft( |$)|flush +ruleset)" rules: - type: "\\b(chain|counter|map|rule|ruleset|set|table)\\b" diff --git a/runtime/syntax/perl.yaml b/runtime/syntax/perl.yaml index 2b01b8942a..22644e4a7b 100644 --- a/runtime/syntax/perl.yaml +++ b/runtime/syntax/perl.yaml @@ -2,7 +2,7 @@ filetype: perl detect: filename: "\\.p[lmp]$" - header: "^#!.*/(env +)?perl( |$)" + header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?perl( |$)" rules: - type: "\\b(accept|alarm|atan2|bin(d|mode)|c(aller|homp|h(dir|mod|op|own|root)|lose(dir)?|onnect|os|rypt)|d(bm(close|open)|efined|elete|ie|o|ump)|e(ach|of|val|x(ec|ists|it|p))|f(cntl|ileno|lock|ork))\\b|\\b(get(c|login|peername|pgrp|ppid|priority|pwnam|(host|net|proto|serv)byname|pwuid|grgid|(host|net)byaddr|protobynumber|servbyport)|([gs]et|end)(pw|gr|host|net|proto|serv)ent|getsock(name|opt)|gmtime|goto|grep|hex|index|int|ioctl|join)\\b|\\b(keys|kill|last|length|link|listen|local(time)?|log|lstat|m|mkdir|msg(ctl|get|snd|rcv)|next|oct|open(dir)?|ord|pack|pipe|pop|printf?|push|q|qq|qx|rand|re(ad(dir|link)?|cv|say|do|name|quire|set|turn|verse|winddir)|rindex|rmdir|s|scalar|seek(dir)?)\\b|\\b(se(lect|mctl|mget|mop|nd|tpgrp|tpriority|tsockopt)|shift|shm(ctl|get|read|write)|shutdown|sin|sleep|socket(pair)?|sort|spli(ce|t)|sprintf|sqrt|srand|stat|study|substr|symlink|sys(call|read|tem|write)|tell(dir)?|time|tr(y)?|truncate|umask)\\b|\\b(un(def|link|pack|shift)|utime|values|vec|wait(pid)?|wantarray|warn|write)\\b" diff --git a/runtime/syntax/python2.yaml b/runtime/syntax/python2.yaml index 3a993b056c..5a8eaf31cb 100644 --- a/runtime/syntax/python2.yaml +++ b/runtime/syntax/python2.yaml @@ -2,7 +2,7 @@ filetype: python2 detect: filename: "\\.py2$" - header: "^#!.*/(env +)?python2$" + header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?python2$" rules: diff --git a/runtime/syntax/python3.yaml b/runtime/syntax/python3.yaml index a87a2cb97c..00dcf7b99a 100644 --- a/runtime/syntax/python3.yaml +++ b/runtime/syntax/python3.yaml @@ -2,7 +2,7 @@ filetype: python detect: filename: "\\.py(3|w)?$" - header: "^#!.*/(env +)?python(3)?$" + header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?python(3)?$" rules: # built-in objects diff --git a/runtime/syntax/ruby.yaml b/runtime/syntax/ruby.yaml index dadb4c26aa..d89076b354 100644 --- a/runtime/syntax/ruby.yaml +++ b/runtime/syntax/ruby.yaml @@ -2,7 +2,7 @@ filetype: ruby detect: filename: '\.(rb|rake|gemspec)$|^(.*[\\/])?(Gemfile|config\.ru|Rakefile|Capfile|Vagrantfile|Guardfile|Appfile|Fastfile|Pluginfile|Podfile|\.?[Bb]rewfile)$' - header: "^#!.*/(env +)?ruby( |$)" + header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?ruby( |$)" rules: - comment.bright: diff --git a/runtime/syntax/sage.yaml b/runtime/syntax/sage.yaml index e24fbeb603..9859125b59 100644 --- a/runtime/syntax/sage.yaml +++ b/runtime/syntax/sage.yaml @@ -2,7 +2,7 @@ filetype: sage detect: filename: "\\.sage$" - header: "^#!.*/(env +)?sage( |$)" + header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?sage( |$)" rules: diff --git a/runtime/syntax/sed.yaml b/runtime/syntax/sed.yaml index ed33bae599..3f6be2f61d 100644 --- a/runtime/syntax/sed.yaml +++ b/runtime/syntax/sed.yaml @@ -2,7 +2,7 @@ filetype: sed detect: filename: "\\.sed$" - header: "^#!.*bin/(env +)?sed( |$)" + header: "^#!.*bin/(env +((-S|--split-string(=\\w+)? +)?)?)?sed( |$)" rules: - symbol.operator: "[|^$.*+]" diff --git a/runtime/syntax/sh.yaml b/runtime/syntax/sh.yaml index e6f75a80d1..49741313fd 100644 --- a/runtime/syntax/sh.yaml +++ b/runtime/syntax/sh.yaml @@ -24,7 +24,7 @@ filetype: shell # * bash-fc. (followed by a random string) detect: filename: "(\\.(sh|bash|ash|ebuild)$|(\\.bash(rc|_aliases|_functions|_profile)|\\.?profile|Pkgfile|pkgmk\\.conf|rc\\.conf|PKGBUILD|APKBUILD)$|bash-fc\\.)" - header: "^#!.*/(env +)?(ba)?(a)?(mk)?sh( |$)" + header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?(ba)?(a)?(mk)?sh( |$)" rules: # Numbers diff --git a/runtime/syntax/swift.yaml b/runtime/syntax/swift.yaml index 4874132f8e..04c705cc1e 100644 --- a/runtime/syntax/swift.yaml +++ b/runtime/syntax/swift.yaml @@ -2,7 +2,7 @@ filetype: swift detect: filename: "\\.swift$" - header: "^#!.*bin/(env +)?swift( |$)" + header: "^#!.*bin/(env +((-S|--split-string(=\\w+)? +)?)?)?swift( |$)" rules: diff --git a/runtime/syntax/tcl.yaml b/runtime/syntax/tcl.yaml index b87a7d7906..627851f582 100644 --- a/runtime/syntax/tcl.yaml +++ b/runtime/syntax/tcl.yaml @@ -2,7 +2,7 @@ filetype: tcl detect: filename: "\\.tcl$" - header: "^#!.*/(env +)?tclsh( |$)" + header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?tclsh( |$)" rules: - statement: "\\b(after|append|array|auto_execok|auto_import|auto_load|auto_load_index|auto_qualify|binary|break|case|catch|cd|clock|close|concat|continue|else|elseif|encoding|eof|error|eval|exec|exit|expr|fblocked|fconfigure|fcopy|file|fileevent|flush|for|foreach|format|gets|glob|global|history|if|incr|info|interp|join|lappend|lindex|linsert|list|llength|load|lrange|lreplace|lsearch|lset|lsort|namespace|open|package|pid|puts|pwd|read|regexp|regsub|rename|return|scan|seek|set|socket|source|split|string|subst|switch|tclLog|tell|time|trace|unknown|unset|update|uplevel|upvar|variable|vwait|while)\\b" diff --git a/runtime/syntax/zsh.yaml b/runtime/syntax/zsh.yaml index a283213104..8331ab1fc7 100644 --- a/runtime/syntax/zsh.yaml +++ b/runtime/syntax/zsh.yaml @@ -2,7 +2,7 @@ filetype: zsh detect: filename: "(\\.zsh$|\\.?(zshenv|zprofile|zshrc|zlogin|zlogout)$)" - header: "^#!.*/(env +)?zsh( |$)" + header: "^#!.*/(env +((-S|--split-string(=\\w+)? +)?)?)?zsh( |$)" rules: ## Numbers