# Highlight bash conditionals and arithmetic operators \(\#56484\) · gitcafe/zed

[View on GitCafe](https://git.cafe/gitcafe/zed/commit/5e36ec82562b49476052b123cacc4e64df97160f)

Repository: [gitcafe/zed](https://git.cafe/gitcafe/zed)

Visibility: public

Requested revision: 5e36ec82562b49476052b123cacc4e64df97160f

Requested commit: 5e36ec82562b49476052b123cacc4e64df97160f

Commit: 5e36ec82562b49476052b123cacc4e64df97160f

Tree: 6a5e8aba23312202f2b2bd52a258ba64a991424f

Author: liam

Committer: GitHub

## Message

```
Highlight bash conditionals and arithmetic operators (#56484)

Resolves https://github.com/zed-industries/zed/issues/56478

This diff fixes Bash syntax highlighting for conditional and arithmetic
expressions. The Bash parser already recognizes tokens like `[[`, `]]`,
`((`, `))`, `$((`, `!=`, and `||`, but Zed’s Bash highlight query was
not capturing several of them.

With this change, the Bash highlight query styles those operators and
delimiters consistently with existing shell operators, brackets, and
special punctuation.

| Before | After |
| --- | --- |
| <img width="1667" height="1088" alt="ayu-old"
src="https://github.com/user-attachments/assets/0a89bd71-0a13-4ebe-8bc9-abc27ab42ed8"
/> | <img width="1667" height="1088" alt="ayu-new"
src="https://github.com/user-attachments/assets/afa5e8ab-f94a-4f5e-8fe8-770bac07559a"
/> |

Release Notes:
- Fixed bash syntax highlighting for conditional expressions, arithmetic
expressions, and related operators.
```

## Parents

- [a221a86d490e6ade04ca3480c4aeb76dda190a6f](https://git.cafe/gitcafe/zed/commit/a221a86d490e6ade04ca3480c4aeb76dda190a6f?format=markdown)

[Source at this commit](https://git.cafe/gitcafe/zed/tree/5e36ec82562b49476052b123cacc4e64df97160f?format=markdown)
