-
Notifications
You must be signed in to change notification settings - Fork 586
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
Rewrite Shell Script (Bash) #434
Comments
Wishlist:
|
Here's one that I do not fix. empty=$((echo hello) > output.txt) It looks like that it executes just like empty=$(echo hello > output.txt) so may be not parsed as |
It would be great if the new syntax had a separate scope for ALLCAPS_CONSTANTS.
should do it IIRC. Also, don't dump everything into |
looking at #46 @jfcherng linked this test file by @okdana |
There is a syntax test file that has been used for ShellScriptImproved. Feel free to re-use it if it helps. |
I thought I was going crazy watching ShellScript not highlight my function definitions ( |
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.
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.
Probably one of the buggiest syntaxes right now is
Shell Script (Bash)
. Some current issues/PRs:Work was done on improving the current state of things by @jfcherng with https://packagecontrol.io/packages/ShellScriptImproved. He indicated that he didn't think that was maintainable long term, hence this issue.
Issues that need to be addressed with the rewrite:
-
so partial commands/functions aren't highlighteddd if
)$()
,$(())
and ```` expansionsThere are surely many more.
The text was updated successfully, but these errors were encountered: