{ "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/ab3c6da1c3651dff20651ebcf0ec5adb5fe413a0", "name": "Shell Script", "scopeName": "source.shell", "patterns": [ { "include": "#initial_context" } ], "repository": { "alias_statement": { "begin": "(alias)\\s*+\\s*+(?:((?<=^|;|&|\\s)(?:export|declare|typeset|local|readonly)(?=\\s|;|&|$))\\s*+)?((?\\(\\)\\$`\\\\\"\\|]+(?!>))", "captures": { "1": { "name": "string.unquoted.argument.shell", "patterns": [ { "match": "\\*", "name": "variable.language.special.wildcard.shell" }, { "include": "#variable" }, { "include": "#numeric_literal" }, { "match": "(?|#|\\n|$|;|\\s))(?:\\s*+([^ \n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>)))?(?:(?:\\$')|'))|(\\s*+(?!(?:!|%|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|\\s))(?:\\s*+([^ \n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>)))?(?:(?:\\$\")|\")))", "end": "(?=;|\\||&|\\n|\\)|\\`|\\{|\\}| *#|\\])(?|#|\\n|$|;|\\s))(?:((?<=^|;|&|\\s)(?:export|declare|typeset|local|readonly)(?=\\s|;|&|$))|((?!\\\\\\n?$)(?:(?:\\$?\")|(?:.+?))))(?:(?=\\s)|(?=;|\\||&|\\n|\\)|\\`|\\{|\\}| *#|\\])(?|#|\\n|$|;|\\s))(?:((?<=^|;|&|\\s)(?:export|declare|typeset|local|readonly)(?=\\s|;|&|$))|((?!\\\\\\n?$)(?:(?:\\$?\")|(?:.+?))))(?:(?=\\s)|(?=;|\\||&|\\n|\\)|\\`|\\{|\\}| *#|\\])(?|&&|\\|\\|", "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" } ] }, "misc_ranges": { "patterns": [ { "include": "#logical_expression_single" }, { "include": "#logical_expression_double" }, { "begin": "\\(\\(", "end": "\\)\\)", "beginCaptures": { "0": { "name": "punctuation.section.arithmetic.shell" } }, "endCaptures": { "0": { "name": "punctuation.section.arithmetic.shell" } }, "name": "meta.arithmetic.shell", "patterns": [ { "include": "#math" } ] }, { "begin": "(?|#|\\n|$|;|\\s)))", "end": "(?:(?=\\s)|(?=;|\\||&|\\n|\\)|\\`|\\{|\\}| *#|\\])(?)", "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": "(?:\\s++\\-\\w+)*", "captures": { "0": { "patterns": [ { "match": "\\s++(\\-)(\\w+)", "captures": { "1": { "name": "string.unquoted.argument.shell constant.other.option.dash.shell" }, "2": { "name": "string.unquoted.argument.shell constant.other.option.shell" } } } ] } } }, "start_of_double_quoted_command_name": { "match": "\\s*+(?!(?:!|%|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|\\s))(?:\\s*+([^ \n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>)))?(?:(?:\\$\")|\")", "captures": { "1": { "name": "entity.name.command.shell", "patterns": [ { "match": "\\*", "name": "variable.language.special.wildcard.shell" }, { "include": "#variable" }, { "include": "#numeric_literal" }, { "match": "(?|#|\\n|$|;|\\s))(?:\\s*+([^ \n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>)))?(?:(?:\\$')|')", "captures": { "1": { "name": "entity.name.command.shell", "patterns": [ { "match": "\\*", "name": "variable.language.special.wildcard.shell" }, { "include": "#variable" }, { "include": "#numeric_literal" }, { "match": "(?