diff --git a/languages.toml b/languages.toml index 03af4fc2f9fa..f148acdcaa07 100644 --- a/languages.toml +++ b/languages.toml @@ -934,7 +934,7 @@ indent = { tab-width = 2, unit = " " } [[grammar]] name = "bash" -source = { git = "https://github.com/tree-sitter/tree-sitter-bash", rev = "275effdfc0edce774acf7d481f9ea195c6c403cd" } +source = { git = "https://github.com/tree-sitter/tree-sitter-bash", rev = "f8fb3274f72a30896075585b32b0c54cad65c086" } [[language]] name = "php" diff --git a/runtime/queries/bash/highlights.scm b/runtime/queries/bash/highlights.scm index 92d61e8b83e0..f33a7c2d3ae8 100644 --- a/runtime/queries/bash/highlights.scm +++ b/runtime/queries/bash/highlights.scm @@ -7,45 +7,33 @@ (command_name) @function -(variable_name) @variable.other.member +(variable_name) @property [ - "if" - "then" - "else" - "elif" - "fi" "case" - "in" - "esac" -] @keyword.control.conditional - -[ - "for" "do" "done" + "elif" + "else" + "esac" + "export" + "fi" + "for" + "function" + "if" + "in" "select" + "then" + "unset" "until" "while" -] @keyword.control.repeat - -[ - "declare" - "typeset" - "export" - "readonly" - "local" - "unset" - "unsetenv" ] @keyword -"function" @keyword.function - (comment) @comment (function_definition name: (word) @function) -(file_descriptor) @constant.numeric.integer +(file_descriptor) @number [ (command_substitution) @@ -60,7 +48,6 @@ ">>" "<" "|" - (expansion_flags) ] @operator (