feat(bash): highlight variable argument for printf -v

This commit is contained in:
Omar Valdez
2025-03-23 01:14:22 -07:00
committed by Christian Clason
parent c78594ce06
commit 652831b231

View File

@@ -247,6 +247,17 @@
"READLINE_ARGUMENT" "READLINE_LINE" "READLINE_MARK" "READLINE_POINT" "REPLY" "SECONDS" "SHELL"
"SHELLOPTS" "SHLVL" "SRANDOM" "TIMEFORMAT" "TMOUT" "TMPDIR" "UID"))
((command
name: (command_name
(word) @_printf)
.
argument: (word) @_v
.
argument: (word) @variable)
(#eq? @_printf "printf")
(#eq? @_v "-v")
(#lua-match? @variable "^[a-zA-Z_][a-zA-Z0-9_]*$"))
(case_item
value: (word) @variable.parameter)