diff --git a/extensions/shellscript/cgmanifest.json b/extensions/shellscript/cgmanifest.json index 578a0a2ab7a..e6df65116de 100644 --- a/extensions/shellscript/cgmanifest.json +++ b/extensions/shellscript/cgmanifest.json @@ -6,11 +6,11 @@ "git": { "name": "jeff-hykin/better-shell-syntax", "repositoryUrl": "https://github.com/jeff-hykin/better-shell-syntax", - "commitHash": "4ea3d7e5f6fb493395e417a26ba5483475e88af4" + "commitHash": "ab3c6da1c3651dff20651ebcf0ec5adb5fe413a0" } }, "license": "MIT", - "version": "1.3.0" + "version": "1.3.3" } ], "version": 1 diff --git a/extensions/shellscript/syntaxes/shell-unix-bash.tmLanguage.json b/extensions/shellscript/syntaxes/shell-unix-bash.tmLanguage.json index b184c2488ff..261d0529c2e 100644 --- a/extensions/shellscript/syntaxes/shell-unix-bash.tmLanguage.json +++ b/extensions/shellscript/syntaxes/shell-unix-bash.tmLanguage.json @@ -4,7 +4,7 @@ "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/4ea3d7e5f6fb493395e417a26ba5483475e88af4", + "version": "https://github.com/jeff-hykin/better-shell-syntax/commit/ab3c6da1c3651dff20651ebcf0ec5adb5fe413a0", "name": "Shell Script", "scopeName": "source.shell", "patterns": [ @@ -14,7 +14,7 @@ ], "repository": { "alias_statement": { - "begin": "(alias)(?:\\s)+\\s*+(?:((?<=^|;|&|\\s)(?:export|declare|typeset|local|readonly)(?=\\s|;|&|$))\\s*+)?((?\\(\\)\\$`\\\\\"\\|]+(?!>)", + "match": "\\s*+([^ \n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>))", "captures": { - "0": { + "1": { + "name": "string.unquoted.argument.shell", "patterns": [ { "match": "\\*", @@ -108,8 +109,7 @@ } ] } - }, - "name": "string.unquoted.argument.shell" + } }, { "include": "#statement_context" @@ -119,7 +119,7 @@ "assignment": { "patterns": [ { - "begin": "\\s*+(?:((?<=^|;|&|\\s)(?:export|declare|typeset|local|readonly)(?=\\s|;|&|$))\\s*+)?((?|#|\\n|$|;|\\s))([^ \n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>))?(?:(?:\\$')|'))|(\\s*+(?!(?:!|%|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|\\s))([^ \n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>))?(?:(?:\\$\")|\")))", - "end": "(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|#|\\])(?|#|\\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|\\)|\\`|\\{|\\}| *#|\\])(?|#|\\n|$|;|\\s))(?:((?<=^|;|&|\\s)(?:export|declare|typeset|local|readonly)(?=\\s|;|&|$))|((?!\\\\\\n?$)(?:(?:\\$?\")|(?:.+?))))(?:(?=\\s)|(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|#|\\])(?|#|\\n|$|;|\\s))(?:((?<=^|;|&|\\s)(?:export|declare|typeset|local|readonly)(?=\\s|;|&|$))|((?!\\\\\\n?$)(?:(?:\\$?\")|(?:.+?))))(?:(?=\\s)|(?=;|\\||&|\\n|\\)|\\`|\\{|\\}| *#|\\])(?|#|\\n|$|;|\\s)))", - "end": "(?:(?=\\s)|(?=;|\\||&|\\n|\\)|\\`|\\{|\\}|#|\\])(?|#|\\n|$|;|\\s))([^ \n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>))?(?:(?:\\$\")|\")", + "match": "\\s*+(?!(?:!|%|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|\\s))(?:\\s*+([^ \n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>)))?(?:(?:\\$\")|\")", "captures": { "1": { "name": "entity.name.command.shell", @@ -1929,7 +1929,7 @@ "name": "meta.command_name.quoted.shell string.quoted.double.shell punctuation.definition.string.begin.shell entity.name.command.shell" }, "start_of_single_quoted_command_name": { - "match": "\\s*+(?!(?:!|%|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|\\s))([^ \n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>))?(?:(?:\\$')|')", + "match": "\\s*+(?!(?:!|%|&|\\||\\(|\\)|\\{|\\[|<|>|#|\\n|$|;|\\s))(?:\\s*+([^ \n'&;<>\\(\\)\\$`\\\\\"\\|]+(?!>)))?(?:(?:\\$')|')", "captures": { "1": { "name": "entity.name.command.shell", diff --git a/extensions/vscode-colorize-tests/test/colorize-results/test-173224_sh.json b/extensions/vscode-colorize-tests/test/colorize-results/test-173224_sh.json index 891aa973b90..e3638406326 100644 --- a/extensions/vscode-colorize-tests/test/colorize-results/test-173224_sh.json +++ b/extensions/vscode-colorize-tests/test/colorize-results/test-173224_sh.json @@ -99,21 +99,21 @@ }, { "c": "alias", - "t": "source.shell meta.statement.shell meta.command.shell entity.name.command.shell support.function.builtin.shell", + "t": "source.shell meta.expression.assignment.shell storage.type.alias.shell", "r": { - "dark_plus": "support.function: #DCDCAA", - "light_plus": "support.function: #795E26", - "dark_vs": "default: #D4D4D4", - "light_vs": "default: #000000", - "hc_black": "support.function: #DCDCAA", - "dark_plus_experimental": "support.function: #DCDCAA", - "hc_light": "support.function: #5E2CBC", - "light_plus_experimental": "support.function: #795E26" + "dark_plus": "storage.type: #569CD6", + "light_plus": "storage.type: #0000FF", + "dark_vs": "storage.type: #569CD6", + "light_vs": "storage.type: #0000FF", + "hc_black": "storage.type: #569CD6", + "dark_plus_experimental": "storage.type: #569CD6", + "hc_light": "storage.type: #0F4A85", + "light_plus_experimental": "storage.type: #0000FF" } }, { "c": " ", - "t": "source.shell meta.statement.shell meta.command.shell meta.argument.shell", + "t": "source.shell meta.expression.assignment.shell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -126,22 +126,36 @@ } }, { - "c": "brew-list=", - "t": "source.shell meta.statement.shell meta.command.shell meta.argument.shell string.unquoted.argument.shell", + "c": "brew-list", + "t": "source.shell meta.expression.assignment.shell variable.other.assignment.shell", "r": { - "dark_plus": "string: #CE9178", - "light_plus": "string: #A31515", - "dark_vs": "string: #CE9178", - "light_vs": "string: #A31515", - "hc_black": "string: #CE9178", - "dark_plus_experimental": "string: #CE9178", - "hc_light": "string: #0F4A85", - "light_plus_experimental": "string: #A31515" + "dark_plus": "variable: #9CDCFE", + "light_plus": "variable: #001080", + "dark_vs": "default: #D4D4D4", + "light_vs": "default: #000000", + "hc_black": "variable: #9CDCFE", + "dark_plus_experimental": "variable: #9CDCFE", + "hc_light": "variable: #001080", + "light_plus_experimental": "variable: #001080" + } + }, + { + "c": "=", + "t": "source.shell meta.expression.assignment.shell keyword.operator.assignment.shell", + "r": { + "dark_plus": "keyword.operator: #D4D4D4", + "light_plus": "keyword.operator: #000000", + "dark_vs": "keyword.operator: #D4D4D4", + "light_vs": "keyword.operator: #000000", + "hc_black": "keyword.operator: #D4D4D4", + "dark_plus_experimental": "keyword.operator: #D4D4D4", + "hc_light": "keyword.operator: #000000", + "light_plus_experimental": "keyword.operator: #000000" } }, { "c": "\"", - "t": "source.shell meta.statement.shell meta.command.shell meta.argument.shell string.quoted.double.shell punctuation.definition.string.begin.shell", + "t": "source.shell meta.expression.assignment.shell string.quoted.double.shell punctuation.definition.string.begin.shell", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -155,7 +169,7 @@ }, { "c": "brew leaves", - "t": "source.shell meta.statement.shell meta.command.shell meta.argument.shell string.quoted.double.shell", + "t": "source.shell meta.expression.assignment.shell string.quoted.double.shell", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", @@ -169,7 +183,7 @@ }, { "c": "\"", - "t": "source.shell meta.statement.shell meta.command.shell meta.argument.shell string.quoted.double.shell punctuation.definition.string.end.shell", + "t": "source.shell meta.expression.assignment.shell string.quoted.double.shell punctuation.definition.string.end.shell", "r": { "dark_plus": "string: #CE9178", "light_plus": "string: #A31515", diff --git a/extensions/vscode-colorize-tests/test/colorize-results/test_sh.json b/extensions/vscode-colorize-tests/test/colorize-results/test_sh.json index eec094fee6e..80fa9d6814c 100644 --- a/extensions/vscode-colorize-tests/test/colorize-results/test_sh.json +++ b/extensions/vscode-colorize-tests/test/colorize-results/test_sh.json @@ -2171,7 +2171,7 @@ }, { "c": "\t", - "t": "source.shell meta.function.shell meta.function.body.shell meta.statement.shell", + "t": "source.shell meta.function.shell meta.function.body.shell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -2409,7 +2409,7 @@ }, { "c": "\t", - "t": "source.shell meta.function.shell meta.function.body.shell meta.statement.shell", + "t": "source.shell meta.function.shell meta.function.body.shell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000", @@ -2535,7 +2535,7 @@ }, { "c": "\t", - "t": "source.shell meta.function.shell meta.function.body.shell meta.statement.shell", + "t": "source.shell meta.function.shell meta.function.body.shell", "r": { "dark_plus": "default: #D4D4D4", "light_plus": "default: #000000",