Change the name of the "Bash" language to "Shell". - #1174
Conversation
Change the name of the language to "Shell". Bash, while extremely widespread, is a richer language than any shell. Having the lexer report a shell script as a Bash script can be confusing, or even error-inducing. For correctness, the only thing the lexer can (correctly) assume is that the file is shell script. Beyond that, a syntactic analysis would be required. I guess the file name should be changed too.
|
I'm really not sure what purpose this would serve, but regardless, Chroma tries to stay in sync with Pygmenst, where this naming originates. |
As mentioned, correctness. If correctness doesn't concern you, there's not much I can do, indeed.
Understood. Thanks. |
I just found this pull request here, while looking into an issue on Forgejo, where we use Chroma’s detected language name at the header of a file. It would make sense there to show |
…les (#12562) This is a quick hack to show "Shell" instead of "Bash" which is an upstream issue that likely won’t be fixed. This makes it also slightly more consistent with the repository’s language statistics, which show "Shell", too. Closes: Codeberg/Community#2627 Related: alecthomas/chroma#1174 Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/12562 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
Bash, while extremely widespread, is a richer language than just any shell. Having the lexer report a shell script as a Bash script can be confusing, or even error-inducing.
For correctness, the only thing the lexer can (correctly) assume is that the file is shell script.
Beyond that, a syntactic analysis would be required.
I changed the file name too, for completeness.