{ "information_for_contributors": [ "This file has been converted from https://github.com/jeff-hykin/better-shell-syntax/blob/master/autogenerated/shell.tmLanguage.json", "If you want to provide a fix or improvement, please create a pull request against the original repository.", "Once accepted there, we are happy to receive an update request." ], "version": "https://github.com/jeff-hykin/better-shell-syntax/commit/4ba5d703087cac3c60cd57b206fd1cea0ff959cc", "name": "Shell Script", "scopeName": "source.shell", "patterns": [ { "include": "#initial_context" } ], "repository": { "alias_statement": { "begin": "(?:(alias)(?:[ \\t]*+)((?:(?:((?\\(\\)\\$`\\\\\"\\|]+)(?!>))", "captures": { "1": { "name": "string.unquoted.argument.shell", "patterns": [ { "match": "\\*", "name": "variable.language.special.wildcard.shell" }, { "include": "#variable" }, { "include": "#numeric_literal" }, { "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(?!\\/)))(?:((?<=^|;|&|[ \\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?$)))", "end": "(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?|#|\\n|$|;|[ \\t]))))", "end": "(?:(?=[ \\t])|(?:(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|[ \\t]*#|\\])(?>?)(?:[ \\t]*+)([^ \t\n'&;<>\\(\\)\\$`\\\\\"\\|]+))", "captures": { "1": { "name": "keyword.operator.redirect.shell" }, "2": { "name": "string.unquoted.argument.shell" } } }, "redirect_number": { "match": "(?<=[ \\t])(?:(?:(1)|(2)|(\\d+))(?=>))", "captures": { "1": { "name": "keyword.operator.redirect.stdout.shell" }, "2": { "name": "keyword.operator.redirect.stderr.shell" }, "3": { "name": "keyword.operator.redirect.$3.shell" } } }, "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": { "match": "(?:(?:[ \\t]++)\\-(?:\\w+))*", "captures": { "0": { "patterns": [ { "match": "(?:[ \\t]++)(\\-)(\\w+)", "captures": { "1": { "name": "string.unquoted.argument.shell constant.other.option.dash.shell" }, "2": { "name": "string.unquoted.argument.shell constant.other.option.shell" } } } ] } } }, "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": { "match": "(?:(?!(?:!|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|[ \\t]))(?:(?:(?:[ \\t]*+)((?:[^ \t\n'&;<>\\(\\)\\$`\\\\\"\\|]+)(?!>)))?)(?:(?:\\$\")|\"))", "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" }, { "match": "(?|#|\\n|$|;|[ \\t]))(?:(?:(?:[ \\t]*+)((?:[^ \t\n'&;<>\\(\\)\\$`\\\\\"\\|]+)(?!>)))?)(?:(?:\\$')|'))", "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" }, { "match": "(?