github-linguist / github-linguist/linguist

Enhance shell syntax highlighting

Open
#5,682 4 comments 17 reactions 0 assignees View on GitHub
Improvement
Dominant language
Ruby
Stars
13.7k
Forks
5.4k
Avg merge
1d 15h
Merged PRs (30d)
17

Description

## Describe the enhancement

I don't know whether the issue is related to linguist.

Is it possible to improve the highlighting for code snippets marked with *shell* or *bash* that denote running a command?
It would be great if the name of the command/program was colored and the color of string arguments was improved.

For example, the commands used in the [README](https://github.com/github/linguist/blob/79c1166e7f20ae9620d6c8f7dea75e2a1d7f160e/README.md?plain=1#L21) file of linguist itself:

````
```shell
gem install github-linguist "string argument"
```
````
results in:

```shell
gem install github-linguist "string argument"
```

The color of `"string argument"` is barely distinguishable from the color of the background (on GitHub light theme) and the `gem` is not colored at all.

Some IDEs like [IntelliJ IDEA](https://github.com/JetBrains/intellij-community) highlight markdown code snippets labeled with `shell` or `bash` language identifier like below.
Light theme:
![Syntax highlighting for markdown code snippets in IntelliJ light theme](https://user-images.githubusercontent.com/29678011/145675713-6ee8a49b-c448-49ce-9782-a57a18b57542.png)
Dark theme:
![Syntax highlighting for markdown code snippets in IntelliJ dark theme](https://user-images.githubusercontent.com/29678011/145675738-a361ac3b-ac2f-4c58-a1a1-a60f9330864a.png)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.