2024-01-06 15:05:50 +09:00
|
|
|
((comment) @injection.content
|
|
|
|
|
(#set! injection.language "comment"))
|
2022-11-26 14:27:21 +02:00
|
|
|
|
2023-08-23 13:02:41 +03:00
|
|
|
((regex) @injection.content
|
2024-01-06 15:05:50 +09:00
|
|
|
(#set! injection.language "regex"))
|
2023-08-11 15:24:48 +03:00
|
|
|
|
2023-08-23 13:02:41 +03:00
|
|
|
((heredoc_redirect
|
2023-08-26 05:06:54 -04:00
|
|
|
(heredoc_body) @injection.content
|
2023-08-23 13:02:41 +03:00
|
|
|
(heredoc_end) @injection.language)
|
2024-01-06 15:05:50 +09:00
|
|
|
(#downcase! @injection.language))
|
2023-08-19 19:28:45 +03:00
|
|
|
|
|
|
|
|
; printf 'format'
|
|
|
|
|
((command
|
|
|
|
|
name: (command_name) @_command
|
2024-01-06 15:05:50 +09:00
|
|
|
.
|
2024-03-21 20:44:35 +09:00
|
|
|
argument: [
|
2024-12-31 00:32:34 -06:00
|
|
|
(string) @injection.content
|
2024-04-05 02:01:19 -06:00
|
|
|
(concatenation
|
2024-12-31 00:32:34 -06:00
|
|
|
(string) @injection.content)
|
2024-04-05 02:01:19 -06:00
|
|
|
(raw_string) @injection.content
|
|
|
|
|
(concatenation
|
|
|
|
|
(raw_string) @injection.content)
|
|
|
|
|
])
|
2024-01-06 15:05:50 +09:00
|
|
|
(#eq? @_command "printf")
|
2024-12-31 00:32:34 -06:00
|
|
|
(#offset! @injection.content 0 1 0 -1)
|
|
|
|
|
(#set! injection.include-children)
|
2024-01-06 15:05:50 +09:00
|
|
|
(#set! injection.language "printf"))
|
2023-08-19 19:28:45 +03:00
|
|
|
|
|
|
|
|
; printf -v var 'format'
|
|
|
|
|
((command
|
|
|
|
|
name: (command_name) @_command
|
|
|
|
|
argument: (word) @_arg
|
2024-01-06 15:05:50 +09:00
|
|
|
.
|
|
|
|
|
(_)
|
|
|
|
|
.
|
2024-03-21 20:44:35 +09:00
|
|
|
argument: [
|
2024-12-31 00:32:34 -06:00
|
|
|
(string) @injection.content
|
2024-04-05 02:01:19 -06:00
|
|
|
(concatenation
|
2024-12-31 00:32:34 -06:00
|
|
|
(string) @injection.content)
|
2024-04-05 02:01:19 -06:00
|
|
|
(raw_string) @injection.content
|
|
|
|
|
(concatenation
|
|
|
|
|
(raw_string) @injection.content)
|
|
|
|
|
])
|
2024-01-06 15:05:50 +09:00
|
|
|
(#eq? @_command "printf")
|
|
|
|
|
(#eq? @_arg "-v")
|
2024-12-31 00:32:34 -06:00
|
|
|
(#offset! @injection.content 0 1 0 -1)
|
|
|
|
|
(#set! injection.include-children)
|
2024-01-06 15:05:50 +09:00
|
|
|
(#set! injection.language "printf"))
|
2023-08-19 19:28:45 +03:00
|
|
|
|
|
|
|
|
; printf -- 'format'
|
|
|
|
|
((command
|
|
|
|
|
name: (command_name) @_command
|
|
|
|
|
argument: (word) @_arg
|
2024-01-06 15:05:50 +09:00
|
|
|
.
|
2024-03-21 20:44:35 +09:00
|
|
|
argument: [
|
2024-12-31 00:32:34 -06:00
|
|
|
(string) @injection.content
|
2024-04-05 02:01:19 -06:00
|
|
|
(concatenation
|
2024-12-31 00:32:34 -06:00
|
|
|
(string) @injection.content)
|
2024-04-05 02:01:19 -06:00
|
|
|
(raw_string) @injection.content
|
|
|
|
|
(concatenation
|
|
|
|
|
(raw_string) @injection.content)
|
|
|
|
|
])
|
2024-01-06 15:05:50 +09:00
|
|
|
(#eq? @_command "printf")
|
|
|
|
|
(#eq? @_arg "--")
|
2024-12-31 00:32:34 -06:00
|
|
|
(#offset! @injection.content 0 1 0 -1)
|
|
|
|
|
(#set! injection.include-children)
|
2024-01-06 15:05:50 +09:00
|
|
|
(#set! injection.language "printf"))
|
2024-07-19 21:53:27 -07:00
|
|
|
|
|
|
|
|
((command
|
|
|
|
|
name: (command_name) @_command
|
|
|
|
|
.
|
|
|
|
|
argument: [
|
|
|
|
|
(string)
|
|
|
|
|
(raw_string)
|
|
|
|
|
] @injection.content)
|
|
|
|
|
(#eq? @_command "bind")
|
|
|
|
|
(#offset! @injection.content 0 1 0 -1)
|
|
|
|
|
(#set! injection.include-children)
|
|
|
|
|
(#set! injection.language "readline"))
|