Subject: [PATCH] 31.0.50; bash-ts-mode does not fontify varibles used consistently
From: Jostein Kjønigsen <[email-masked]>
To: [email-masked]
Date: Wed, 30 Apr 2025 22:43:59 +0200
List-Id: <debbugs-submit.debbugs.gnu.org>

Hey everyone.

When writing bash-scripts one often refers to variables in lots of different syntax variants, like the ones below:

    echo "${var}"
    echo "$var"
    echo ${var}
    echo $var

Using bash-ts-mode in Emacs these are all presented inconsistently:

* as string
* as variable-declaration
* as variable-use

This is due to missing or incorrectly configured selectors in sh-script.el.

Attached is a patch which makes them consistely fontified as font-lock-variable-use-face and use font-lock-bracket-face for the enclosing brackets.

Cheers!

—
Kind Regards
Jostein Kjønigsen

￼