# grammars: Stop treating \`fish\` modelines as Shell Script \(\#58550\) · gitcafe/zed

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

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

Visibility: public

Requested revision: c40629d1a1352cf00a476218c151bb8c66c8f8fb

Requested commit: c40629d1a1352cf00a476218c151bb8c66c8f8fb

Commit: c40629d1a1352cf00a476218c151bb8c66c8f8fb

Tree: 19a0e46696af314c9b4186cc6b2810d32f13dafd

Author: Kunall Banerjee

Committer: GitHub

## Message

```
grammars: Stop treating `fish` modelines as Shell Script (#58550)

Bash listed `fish` in `modeline_aliases`, so a `filetype=fish` modeline
resolved to Shell Script before the real [Fish
language](https://zed.dev/extensions/fish) could match by name or
grammar. Fish is intentionally non-POSIX, so the Bash grammar is the
wrong fit here.

| Header | After |
|--------|--------|
| <img width="1912" height="1237" alt="image"
src="https://github.com/user-attachments/assets/ed212a24-92aa-4ede-a432-47c6c6724f08"
/> | <img width="1732" height="1125" alt="image"
src="https://github.com/user-attachments/assets/934140b3-9473-4cca-a3e5-84aa3c4d827a"
/> |

Self-Review Checklist:

- [x] I've reviewed my own diff for quality, security, and reliability
- [ ] Unsafe blocks (if any) have justifying comments
- [ ] The content is consistent with the [UI/UX
checklist](https://github.com/zed-industries/zed/blob/main/CONTRIBUTING.md#uiux-checklist)
- [ ] Tests cover the new/changed behavior
- [ ] Performance impact has been considered and is acceptable

Closes #58532.

Release Notes:

- Dropped `fish` from `modeline_aliases` which forced the file to be
detected as Shell Script instead of Fish
```

## Parents

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

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