Skip to content

Bash conditionals and operators not properly highlighted #56478

@mprz1024

Description

@mprz1024

Reproduction steps

Compare these two lines in bash. The first one is highlighted correctly, the second one isn't:

[ "$a" = 1 ] && echo yes
[[ $a != 1 ]] || echo no

This is because it's not recognising:

● Bash native conditional expressions opening/closing [[ ... ]]
● Bash arithmetic evaluation and substitution opening/closing (( ... )) and $(( ... ))
● Some operators inside these expressions, such as !=
● Bash list operator || (but && works)

Current vs. Expected behavior

Image

Zed version and system specs

Zed: v1.1.7+stable.268.c17f25cd782edffab64b7c4167abfa44f865b125 (Zed)
OS: Linux X11 debian 12
Memory: 46.7 GiB
Architecture: x86_64
GPU: Intel(R) Iris(R) Xe Graphics (RPL-P) || Intel open-source Mesa driver || Mesa 25.0.7-2~bpo12+1

Attach Zed log file

No response

Relevant Zed settings

No response

Relevant Keymap

No response

(for AI issues) Model provider details

No response

If you are using WSL on Windows, what flavor of Linux are you using?

None

Metadata

Metadata

Assignees

No one assigned

    Labels

    area:languages/bashBash scripting supportarea:tree-sitterSyntax highlighting and tree-sitterfrequency:uncommonBugs that happen for a small subset of users, special configurations, rare circumstances, etcpriority:P3Papercuts, minor issues with a clear workaround, cosmetic bugsstate:reproducibleVerified steps to reproduce included and someone on the team managed to reproduce

    Type

    No fields configured for Bug.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions