const lang = Object.freeze({ "displayName": "Shell", "name": "shellscript", "patterns": [{ "include": "#initial_context" }], "repository": { "alias_statement": { "begin": "(?:(alias)(?:[ \\t]*+)((?:(?:((?\\(\\)\\$`\\\\\"\\|]+)(?!>))" }, { "include": "#normal_statement_context" }] }, "array_value": { "begin": "(?:[ \\t]*+)(?:(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))(?:[ \\t]*+)((?:(?:((?|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/)))(?:((?<=^|;|&|[ \\t])(?:readonly|declare|typeset|export|local)(?=[ \\t]|;|&|$))|((?!"|'|\\\\\\n?$)(?:[^!'" \\t\\n\\r]+?)))(?:(?= |\\t)|(?:(?=;|\\||&|\\n|\\)|\\\`|\\{|\\}|[ \\t]*#|\\])(?|&&|\\|\\|", "name": "keyword.operator.logical.shell" }, { "match": "(?[>=]?|==|!=|^|\\|{1,2}|&{1,2}|\\?|\\:|,|=|[*/%+\\-&^|]=|<<=|>>=", "name": "keyword.operator.arithmetic.shell" }, { "match": "0[xX][0-9A-Fa-f]+", "name": "constant.numeric.hex.shell" }, { "match": "0\\d+", "name": "constant.numeric.octal.shell" }, { "match": "\\d{1,2}#[0-9a-zA-Z@_]+", "name": "constant.numeric.other.shell" }, { "match": "\\d+", "name": "constant.numeric.integer.shell" }, { "match": "(?|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?!\\\\\\n?$)))", "beginCaptures": {}, "end": "(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?|#|\\n|$|;|[ \\t]))))", "beginCaptures": { "1": { "name": "string.unquoted.argument.shell constant.other.option.dash.shell" }, "2": { "name": "string.unquoted.argument.shell constant.other.option.shell" } }, "contentName": "string.unquoted.argument constant.other.option", "end": "(?:(?=[ \\t])|(?:(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?>?)(?:[ \\t]*+)([^ \\t\\n'&;<>\\(\\)\\$`\\\\\"\\|]+))" }, "redirect_number": { "captures": { "1": { "name": "keyword.operator.redirect.stdout.shell" }, "2": { "name": "keyword.operator.redirect.stderr.shell" }, "3": { "name": "keyword.operator.redirect.$3.shell" } }, "match": "(?<=[ \\t])(?:(?:(1)|(2)|(\\d+))(?=>))" }, "redirection": { "patterns": [{ "begin": "[><]\\(", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": "\\)", "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.interpolated.process-substitution.shell", "patterns": [{ "include": "#initial_context" }] }, { "match": "(?])(&>|\\d*>&\\d*|\\d*(>>|>|<)|\\d*<&|\\d*<>)(?![<>])", "name": "keyword.operator.redirect.shell" }] }, "regex_comparison": { "match": "\\=~", "name": "keyword.operator.logical.regex.shell" }, "regexp": { "patterns": [{ "match": "(?:.+)" }] }, "simple_options": { "captures": { "0": { "patterns": [{ "captures": { "1": { "name": "string.unquoted.argument.shell constant.other.option.dash.shell" }, "2": { "name": "string.unquoted.argument.shell constant.other.option.shell" } }, "match": "(?:[ \\t]++)(\\-)(\\w+)" }] } }, "match": "(?:(?:[ \\t]++)\\-(?:\\w+))*" }, "simple_unquoted": { "match": "[^ \\t\\n'&;<>\\(\\)\\$`\\\\\"\\|]", "name": "string.unquoted.shell" }, "start_of_command": { "match": "(?:(?:[ \\t]*+)(?:(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?!foreach\\b(?!\\/)|select\\b(?!\\/)|repeat\\b(?!\\/)|until\\b(?!\\/)|while\\b(?!\\/)|case\\b(?!\\/)|done\\b(?!\\/)|elif\\b(?!\\/)|else\\b(?!\\/)|esac\\b(?!\\/)|then\\b(?!\\/)|for\\b(?!\\/)|end\\b(?!\\/)|in\\b(?!\\/)|fi\\b(?!\\/)|do\\b(?!\\/)|if\\b(?!\\/))(?!\\\\\\n?$)))" }, "start_of_double_quoted_command_name": { "captures": { "1": { "name": "entity.name.function.call.shell entity.name.command.shell", "patterns": [{ "match": "\\*", "name": "variable.language.special.wildcard.shell" }, { "include": "#variable" }, { "include": "#numeric_literal" }, { "captures": { "1": { "name": "constant.language.$1.shell" } }, "match": "(?|#|\\n|$|;|[ \\t]))(?:(?:(?:[ \\t]*+)((?:[^ \\t\\n\'&;<>\\(\\)\\$`\\\\"\\|]+)(?!>)))?)(?:(?:\\$")|"))', "name": "meta.statement.command.name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell" }, "start_of_single_quoted_command_name": { "captures": { "1": { "name": "entity.name.function.call.shell entity.name.command.shell", "patterns": [{ "match": "\\*", "name": "variable.language.special.wildcard.shell" }, { "include": "#variable" }, { "include": "#numeric_literal" }, { "captures": { "1": { "name": "constant.language.$1.shell" } }, "match": "(?|#|\\n|$|;|[ \\t]))(?:(?:(?:[ \\t]*+)((?:[^ \\t\\n'&;<>\\(\\)\\$`\\\\\"\\|]+)(?!>)))?)(?:(?:\\$')|'))", "name": "meta.statement.command.name.quoted.shell string.quoted.single.shell punctuation.definition.string.begin.shell entity.name.function.call.shell entity.name.command.shell" }, "string": { "patterns": [{ "match": "\\\\.", "name": "constant.character.escape.shell" }, { "begin": "'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.quoted.single.shell" }, { "begin": '\\$?"', "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": '"', "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.quoted.double.shell", "patterns": [{ "match": '\\\\[\\$\\n`"\\\\]', "name": "constant.character.escape.shell" }, { "include": "#variable" }, { "include": "#interpolation" }] }, { "begin": "\\$'", "beginCaptures": { "0": { "name": "punctuation.definition.string.begin.shell" } }, "end": "'", "endCaptures": { "0": { "name": "punctuation.definition.string.end.shell" } }, "name": "string.quoted.single.dollar.shell", "patterns": [{ "match": "\\\\(?:a|b|e|f|n|r|t|v|\\\\|')", "name": "constant.character.escape.ansi-c.shell" }, { "match": '\\\\[0-9]{3}"', "name": "constant.character.escape.octal.shell" }, { "match": '\\\\x[0-9a-fA-F]{2}"', "name": "constant.character.escape.hex.shell" }, { "match": '\\\\c."', "name": "constant.character.escape.control-char.shell" }] }] }, "support": { "patterns": [{ "match": "(?<=^|;|&|\\s)(?::|\\.)(?=\\s|;|&|$)", "name": "support.function.builtin.shell" }] }, "variable": { "patterns": [{ "captures": { "1": { "name": "punctuation.definition.variable.shell variable.parameter.positional.all.shell" }, "2": { "name": "variable.parameter.positional.all.shell" } }, "match": "(?:(\\$)(\\@(?!\\w)))" }, { "captures": { "1": { "name": "punctuation.definition.variable.shell variable.parameter.positional.shell" }, "2": { "name": "variable.parameter.positional.shell" } }, "match": "(?:(\\$)([0-9](?!\\w)))" }, { "captures": { "1": { "name": "punctuation.definition.variable.shell variable.language.special.shell" }, "2": { "name": "variable.language.special.shell" } }, "match": "(?:(\\$)([-*#?$!0_](?!\\w)))" }, { "begin": "(?:(\\$)(\\{)(?:[ \\t]*+)(?=\\d))", "beginCaptures": { "1": { "name": "punctuation.definition.variable.shell variable.parameter.positional.shell" }, "2": { "name": "punctuation.section.bracket.curly.variable.begin.shell punctuation.definition.variable.shell variable.parameter.positional.shell" } }, "contentName": "meta.parameter-expansion", "end": "\\}", "endCaptures": { "0": { "name": "punctuation.section.bracket.curly.variable.end.shell punctuation.definition.variable.shell variable.parameter.positional.shell" } }, "patterns": [{ "match": "!|:[-=?]?|\\*|@|##|#|%%|%|\\/", "name": "keyword.operator.expansion.shell" }, { "captures": { "1": { "name": "punctuation.section.array.shell" }, "2": { "name": "punctuation.section.array.shell" } }, "match": "(?:(\\[)(?:[^\\]]+)(\\]))" }, { "match": "[0-9]+", "name": "variable.parameter.positional.shell" }, { "match": "(?