diff --git a/runtime/queries/ecma/injections.scm b/runtime/queries/ecma/injections.scm index 09cca4418..72ad31da4 100644 --- a/runtime/queries/ecma/injections.scm +++ b/runtime/queries/ecma/injections.scm @@ -10,6 +10,18 @@ arguments: (template_string) @injection.content (#any-of? @injection.language "html" "css" "json" "sql" "js" "ts" "bash")) +; Parse the contents of $ template literals as shell commands + +(call_expression + function: [ + (identifier) @_template_function_name + (member_expression + property: (property_identifier) @_template_function_name) + ] + arguments: (template_string) @injection.content + (#eq? @_template_function_name "$") + (#set! injection.language "bash")) + ; Parse the contents of gql template literals ((call_expression