Skip to content

Commit 99cea8c

Browse files
authored
feat(bash): inject bash into builtins expecting bash code as input (#14268)
1 parent 077c901 commit 99cea8c

File tree

1 file changed

+19
-0
lines changed

1 file changed

+19
-0
lines changed

runtime/queries/bash/injections.scm

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,3 +17,22 @@
1717
(string (string_content) @injection.content)
1818
]
1919
(#set! injection.language "jq"))
20+
21+
(command
22+
name: (command_name (word) @_command (#eq? @_command "alias"))
23+
argument: (concatenation
24+
(word)
25+
[
26+
(raw_string) @injection.content
27+
(string (string_content) @injection.content)
28+
])
29+
(#set! injection.language "bash"))
30+
31+
(command
32+
name: (command_name (word) @_command (#any-of? @_command "eval" "trap"))
33+
.
34+
argument: [
35+
(raw_string) @injection.content
36+
(string (string_content) @injection.content)
37+
]
38+
(#set! injection.language "bash"))

0 commit comments

Comments
 (0)