diff --git a/lisp/progmodes/sh-script.el b/lisp/progmodes/sh-script.el index 7216975ebfd..5075e9a0afc 100644 --- a/lisp/progmodes/sh-script.el +++ b/lisp/progmodes/sh-script.el @@ -3369,7 +3369,11 @@ See `sh-mode--treesit-other-keywords' and :language 'bash :override t '((command_substitution) @sh-quoted-exec - (string (expansion (variable_name) @font-lock-variable-use-face))) + (expansion (variable_name) @font-lock-variable-use-face) + (expansion ["${" "}"] @font-lock-bracket-face) + (simple_expansion + "$" @font-lock-bracket-face + (variable_name) @font-lock-variable-use-face)) :feature 'heredoc :language 'bash