# Improve Bash syntax highlighting \(\#25324\) · gitcafe/zed

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

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

Visibility: public

Requested revision: d0a0303428bed88da0c3773740a9cd8b39d8910d

Requested commit: d0a0303428bed88da0c3773740a9cd8b39d8910d

Commit: d0a0303428bed88da0c3773740a9cd8b39d8910d

Tree: 1e7017656bd4d97c8a60145e367879b87d7e146f

Author: chbk

Committer: GitHub

## Message

````
Improve Bash syntax highlighting (#25324)

Release Notes:

  - Improved Bash syntax highlighting

| Zed 0.174.6 | With this PR |
| --- | --- |
|
![Image](https://github.com/user-attachments/assets/ecff952a-c10c-447a-8a99-ebd4ac6d6936)
|
![Image](https://github.com/user-attachments/assets/37568a83-f32c-4d4c-bd9a-3ebbe9aa40ae)
|

- `string`: `string`
- `variable`: `property` -> `variable`
- `number`: `number`
- `regex`: `string.regex`
- `>&`, `>&-`, `:`, `//`, `/`, `%`, `%%`, `#`, `##`, `=`, `==`:
`operator`
- `-lt`, `-le`, `-gt`, `-ge`, `-eq`, `-ne`, `-z`, `-n`:
`keyword.operator`
- `;`: `punctuation.delimiter`
- `(`, `)`, `{`, `}`, `[`, `]`: `punctuation.bracket`
- `$`, `${ }`, `$( )`: `punctuation.special`, as defined in other
languages

```bash
variable=I\ like\ Zed
function my_function() {
  echo "Hello world, ${variable//regex/string}" > file
}
if [ $(uid) -lt 600 ]; then
  my_function;
  cat file | grep hello >&3
fi
```
````

## Parents

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

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