-
Notifications
You must be signed in to change notification settings - Fork 591
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[RFC] Shells, there are so many #2638
Comments
We have inheritance. It should be quite simple to handle smaller differences like those between bash and zsh. I don't have any overview about the shell specific details though. I am not quite sure which implementations in Bash were made tolerant to work with ZSH or other shell dialects. I am not quite sure which ones are special for Bash only. If we want to create different dialects, we should have a base syntax which contains common rules, which Bash, ZSH, ... can make use of by inerhitance. Not sure if POSIX.sublime-syntax would be the name of choise or something generic like Not sure where to put the cryptic long In short: Can bash be renamed to "Shell (Basic)" with I think we should handle simple to handle dialects in this repo to have them out of the box and keep them together. I am still a bit concerned about possible dependencies created by inheritance. If too many 3rd-party packages extend syntaxes of this repo it will become hard/impossible to make bigger changes (renaming contexts) without breaking them. Thus we should try to keep things together. I am not sure about Fish though. With a bird's eye on its homepage syntax seems quite different. Not sure if that can be handled with overriding 2 or 3 contexts only. Not aware of all the other's though. |
A possibly useful reference: https://hyperpolyglot.org/unix-shells |
Probably useful to choose/find POSIX compatible common language features to be commonly supported by all shells. https://pubs.opengroup.org/onlinepubs/9699919799/utilities/contents.html |
I think this is closed by #4024 |
The ShellScript package has basically evolved into Bash (and is now fairly explicit about being Bash). People are using the Bash-centric highlighting for their sh, Zsh, Fish, etc. files as well, and it sometimes leads to mishighlighting.
What should be done? Here are some broad options:
Leave it as-is
This has the nice feature of being simple. Anyone can make or install a third-party package that specifically matches their shell's syntax.
Add other shells here
Pros: ST ships with more stuff.
Cons: maintenance, update cycle, making the thing in the first place, duplication of work.
Add other shells here as inherited files
I imagine this as a
POSIX.sublime-syntax
that Bash and other shells can inject into or tinker with.Pros: ST ships with more stuff. Less duplication of work than independent files.
Cons: maintenance, update cycle, now the Shells are interdependent and changes are harder to make without breaking something else.
The text was updated successfully, but these errors were encountered: