From 48350d047de7db80a25e740f1338eff8564d2171 Mon Sep 17 00:00:00 2001
From: Cole McAnelly <76577549+colemcanelly@users.noreply.github.com>
Date: Thu, 12 Feb 2026 07:01:56 -0600
Subject: [PATCH] languages: Highlight case statements and special variables
for Shell Scripts (#48200)
Part of https://github.com/zed-industries/zed/issues/9461. Similar PRs:
- https://github.com/zed-industries/zed/pull/46722
- https://github.com/zed-industries/zed/pull/39683
- https://github.com/zed-industries/zed/pull/39801
## Release Notes:
- Allowed highlighting for case statement items for users and theme
authors via the `string.regex` syntax property.
- Allowed highlighting for special variables via `variable.special`
## Screenshots
| **Before** | **After** |
|:--:|:--:|
|
|
|
---
crates/languages/src/bash/highlights.scm | 3 +++
1 file changed, 3 insertions(+)
diff --git a/crates/languages/src/bash/highlights.scm b/crates/languages/src/bash/highlights.scm
index 2852e5ff9a..d3c53a68e9 100644
--- a/crates/languages/src/bash/highlights.scm
+++ b/crates/languages/src/bash/highlights.scm
@@ -110,3 +110,6 @@
(command (_) @constant)
(#match? @constant "^-")
)
+
+(case_item value: (_) @string.regex)
+(special_variable_name) @variable.special