Skip to content

Commit

Permalink
Adjust syntax for rewritten ShellScript
Browse files Browse the repository at this point in the history
  • Loading branch information
deathaxe committed Aug 6, 2024
1 parent 37276bd commit 7034d56
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 1 deletion.
5 changes: 5 additions & 0 deletions Bash (AzureDevops).sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,8 @@ contexts:
string-prototype:
- meta_prepend: true
- include: scope:source.yaml.pipeline.azure-devops#string-interpolations

variables:
# lazy escaping from heredoc as shell maybe indented
no_indent: ^\s*
tab_indent: ^\s*
8 changes: 8 additions & 0 deletions Bash (Github Actions).sublime-syntax
Original file line number Diff line number Diff line change
Expand Up @@ -17,13 +17,21 @@ contexts:
- include: scope:source.yaml.pipeline.github-actions#string-interpolations

heredocs-body:
# before Packages PR #4024
- meta_prepend: true
- match: ^\s*\3$ # the third capture from redirections-here-document
scope: meta.tag.heredoc.shell entity.name.tag.heredoc.shell
pop: 1

heredocs-body-no-expansion:
# before Packages PR #4024
- meta_prepend: true
- match: ^\s*\5$ # the fourth capture from redirections-here-document
scope: meta.tag.heredoc.shell entity.name.tag.heredoc.shell
pop: 1

variables:
# requires Packages PR #4024
# lazy escaping from heredoc as shell maybe indented
no_indent: ^\s*
tab_indent: ^\s*
12 changes: 11 additions & 1 deletion tests/syntax_test_github_actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -230,7 +230,17 @@ jobs:
- name: https://docs.github.com/en/actions/using-workflows/workflow-commands-for-github-actions#environment-files
run: |
echo '# Some Markdown Content Here' >> $GITHUB_STEP_SUMMARY
# ^^^^^^^^^^^^^^^^^^^^ variable.language.github-actions
# ^^^^^^^^^^^^^^^^^^^^ variable.language.github-actions
echo <<EOF
# ${tilte}
# <- meta.string.heredoc.shell string.unquoted.heredoc.shell
# ^^^^^^^^ meta.string.heredoc.shell meta.interpolation.parameter.shell
$GITHUB_STEP_SUMMARY
# <- meta.string.heredoc.shell variable.language.github-actions punctuation.definition.variable.github-actions
#^^^^^^^^^^^^^^^^^^^ meta.string.heredoc.shell variable.language.github-actions
EOF
# <- meta.tag.heredoc.end.shell entity.name.tag.heredoc.shell
- name: folded shell script command
run: >-
Expand Down

0 comments on commit 7034d56

Please sign in to comment.