-
Notifications
You must be signed in to change notification settings - Fork 589
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
shell highlighting broken if no space follows <<< #626
Comments
Build 3124 breaks the shell syntax (25000 sanity limit) for me as well on Ubuntu 16.04 |
Interesting... there is no real change between 3124 and 3114 for shellscript. You may temporary switch to use https://packagecontrol.io/packages/ShellScriptImproved before there is a official shellscript re-write. |
If you are hitting the recursion error it means you have a third party syntax installed that is creating an include loop. This is very likely an HTML syntax, but may be something like JavaScript. |
Or some markdown flavor. |
@jfcherng thanks, it's a fix for now ... |
What is almost certainly happening is that Shell Script allows embedded heredocs of the syntaxes Markdown, HTML, Python, Ruby, AppleScript and Textile. One of those syntaxes on your machine must be from a third-party package, and must have a scope that includes Shell Script directly (for embedding), or includes it via another include. The one possible way to stem the tide of such recursion errors is for Sublime Text to add functionality that allows omitting a context when embedded. Then, we'd add an This would almost certainly work fine in practice, since it would be kind of crazy for someone to embed PHP with a heredoc of a Shell Script inside of a Shell Script heredoc. And if they did, it would seem perfectly fine to not syntax highlight the innermost Shell Script code. |
Issue links ----------- Intends to close sublimehq#434 Fixes sublimehq#626 Fixes sublimehq#190 Fixes sublimehq#46 Goodies ------- * Proper context sensitive command invocations * Variable expansion as from ShellScriptImproved * Backtick handling as from ShellScriptImproved * No with_prototype contexts * Generic options handling * Builtin-commands know their valid options * Renamed Shell-Unix-Generic to bash, as it's really just bash (and dash) About 1300 syntax tests, tested out in the wild with various bash scripts. Deficiencies ------------ The heredocs handling is still not perfect, but it gets the job done if you don't have a function definition, inline if-block or compound command on the same line as the start of the heredoc token. * It's easy to bring back the embedded language highlighting for particular heredoc tokens, but this is omitted for now. * It's easy to embed the regex language for regex matching in if-blocks at this point. Acknowledgements ---------------- * @jfcherng for starting ShellScriptImproved and the huge amount of syntax tests, * @okdana for creating syntax tests, * @FichteFoll for pointing me to the Ruby syntax for heredoc handling, * @KingKeith, @wbond for their suggestions about scope names.
Issue links ----------- Intends to close sublimehq#434 Fixes sublimehq#626 Fixes sublimehq#190 Fixes sublimehq#46 Goodies ------- * Proper context sensitive command invocations * Variable expansion as from ShellScriptImproved * Backtick handling as from ShellScriptImproved * No with_prototype contexts * Generic options handling * Builtin-commands know their valid options * Renamed Shell-Unix-Generic to bash, as it's really just bash (and dash) About 1300 syntax tests, tested out in the wild with various bash scripts. Deficiencies ------------ The heredocs handling is still not perfect, but it gets the job done if you don't have a function definition, inline if-block or compound command on the same line as the start of the heredoc token. * It's easy to bring back the embedded language highlighting for particular heredoc tokens, but this is omitted for now. * It's easy to embed the regex language for regex matching in if-blocks at this point. Acknowledgements ---------------- * @jfcherng for starting ShellScriptImproved and the huge amount of syntax tests, * @okdana for creating syntax tests, * @FichteFoll for pointing me to the Ruby syntax for heredoc handling, * @keith-hall, @wbond for their suggestions about scope names.
Issue links ----------- Intends to close sublimehq#434 Fixes sublimehq#626 Fixes sublimehq#190 Fixes sublimehq#46 Goodies ------- * Proper context sensitive command invocations * Variable expansion as from ShellScriptImproved * Backtick handling as from ShellScriptImproved * No with_prototype contexts * Generic options handling * Builtin-commands know their valid options * Renamed Shell-Unix-Generic to bash, as it's really just bash (and dash) About 1300 syntax tests, tested out in the wild with various bash scripts. Deficiencies ------------ The heredocs handling is still not perfect, but it gets the job done if you don't have a function definition, inline if-block or compound command on the same line as the start of the heredoc token. * It's easy to bring back the embedded language highlighting for particular heredoc tokens, but this is omitted for now. * It's easy to embed the regex language for regex matching in if-blocks at this point. Acknowledgements ---------------- * @jfcherng for starting ShellScriptImproved and the huge amount of syntax tests, * @okdana for creating syntax tests, * @FichteFoll for pointing me to the Ruby syntax for heredoc handling, * @keith-hall, @wbond for their suggestions about scope names.
Related: sublimehq/sublime_text#1534 |
Issue links ----------- Intends to close sublimehq#434 Fixes sublimehq#626 Fixes sublimehq#190 Fixes sublimehq#46 Goodies ------- * Proper context sensitive command invocations * Variable expansion as from ShellScriptImproved * Backtick handling as from ShellScriptImproved * No with_prototype contexts * Generic options handling * Builtin-commands know their valid options * Renamed Shell-Unix-Generic to bash, as it's really just bash (and dash) About 1300 syntax tests, tested out in the wild with various bash scripts. Deficiencies ------------ The heredocs handling is still not perfect, but it gets the job done if you don't have a function definition, inline if-block or compound command on the same line as the start of the heredoc token. * It's easy to bring back the embedded language highlighting for particular heredoc tokens, but this is omitted for now. * It's easy to embed the regex language for regex matching in if-blocks at this point. Acknowledgements ---------------- * @jfcherng for starting ShellScriptImproved and the huge amount of syntax tests, * @okdana for creating syntax tests, * @FichteFoll for pointing me to the Ruby syntax for heredoc handling, * @keith-hall, @wbond for their suggestions about scope names.
See rmarquis/pacaur#557 (comment) and rmarquis/pacaur#557 (comment).
The text was updated successfully, but these errors were encountered: