From 255ee7296daf7c37eb14a89beb40a7e913d78003 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** | |:--:|:--:| | image | image | --- 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 2852e5ff9a34d28c93ad274c5c0e80f9d5ffe2d0..d3c53a68e930185c7748d60cba1ea6bbe6cc5fce 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