Skip to content
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

Bash syntax highlighting in yml files in VSCode #207338

Closed
martyzee opened this issue Mar 11, 2024 · 12 comments
Closed

Bash syntax highlighting in yml files in VSCode #207338

martyzee opened this issue Mar 11, 2024 · 12 comments
Assignees
Labels
feature-request Request for new features or functionality grammar Syntax highlighting grammar

Comments

@martyzee
Copy link

Type: Bug

When using a bash step in a pipeline job, the syntax highlighting is unpredictable and sometimes just doesn’t work.

image
image
image

VS Code version: Code 1.85.1 (Universal) (0ee08df, 2023-12-13T09:48:06.308Z)
OS version: Darwin x64 22.6.0
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-8750H CPU @ 2.20GHz (12 x 2200)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: disabled_off
direct_rendering_display_compositor: disabled_off_ok
gpu_compositing: enabled
multiple_raster_threads: enabled_on
opengl: enabled_on
rasterization: enabled
raw_draw: disabled_off_ok
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) 3, 4, 5
Memory (System) 16.00GB (0.10GB free)
Process Argv --crash-reporter-id 6c111b17-ec67-4a51-9adb-d3dc8085e9f3
Screen Reader no
VM 0%
Extensions (8)
Extension Author (truncated) Version
terraform 4op 0.2.5
jsoncrack-vscode Ayk 2.0.2
restore-terminals Eth 1.1.8
vscode-docker ms- 1.29.0
remote-containers ms- 0.327.0
stannum-shellscript-syntax sta 0.0.3
json2yaml tux 0.2.0
errorlens use 3.16.0
A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscoreces:30445986
vscod805:30301674
binariesv615:30325510
vsaa593:30376534
py29gd2263:30899288
c4g48928:30535728
azure-dev_surveyone:30548225
a9j8j154:30646983
962ge761:30959799
pythongtdpath:30769146
welcomedialog:30910333
pythonidxpt:30866567
pythonnoceb:30805159
asynctok:30898717
pythontestfixt:30902429
pythonregdiag2:30936856
pyreplss1:30897532
pythonmypyd1:30879173
pythoncet0:30885854
pythontbext0:30879054
accentitlementsc:30887149
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
pydisww1:30959800
cppperfcontrol:30979541
d34g3935:30971562
bg6jg535:30979843
78248357:30976999
ccp2r6:30958158
dsvsc020:30976470

@VSCodeTriageBot
Copy link
Collaborator

Thanks for creating this issue! It looks like you may be using an old version of VS Code, the latest stable release is 1.87.1. Please try upgrading to the latest version and checking whether this issue remains.

Happy Coding!

@alexr00
Copy link
Member

alexr00 commented Mar 12, 2024

@martyzee can you share a copy+pastable cope snippet that I can use to reproduce the issue?

@alexr00 alexr00 added the info-needed Issue requires more information from poster label Mar 12, 2024
@martyzee
Copy link
Author

@martyzee can you share a copy+pastable cope snippet that I can use to reproduce the issue?

stages:
  - stage: CheckPolicies
    pool:
      name: Default
    jobs:
      - job: CheckPolicies
        steps:
          - bash: |
              set -euo pipefail
              var=14 # this is an inline comment
              echo "echo statement"
              echo

              # this is a big comment
              # this is a big comment
              # this is a big comment
              for file in myfilename
              do
                echo do stuff
              done
stages:
  - stage: CheckPolicies
    pool:
      name: Default
    jobs:
      - job: CheckPolicies
      "
        steps:
          - bash: |
              set -euo pipefail
              var=14 # this is an inline comment
              echo "echo statement"
              echo

              # this is a big comment
              # this is a big comment
              # this is a big comment
              for file in myfilename
              do
                echo do stuff
              done
stages:
  - stage: CheckPolicies
    pool:
      name: Default
    jobs:
      - job: CheckPolicies
      {
        steps:
          - bash: |
              set -euo pipefail
              var=14 # this is an inline comment
              echo "echo statement"
              echo

              # this is a big comment
              # this is a big comment
              # this is a big comment
              for file in myfilename
              do
                echo do stuff
              done

@RedCMD
Copy link
Contributor

RedCMD commented Mar 12, 2024

{ is the start of flow-mapping
which does allow comments (under prototype)
image

and " just breaks strings in a weird way

@martyzee
Copy link
Author

martyzee commented Mar 12, 2024

{ is the start of flow-mapping which does allow comments (under prototype)

and " just breaks strings in a weird way

I purely used those characters as an example of what the comments should look like, not in any way functional.

@RedCMD
Copy link
Contributor

RedCMD commented Mar 12, 2024

currently there's no special support for bash

you would like bash added as an embedded language?

@alexr00
Copy link
Member

alexr00 commented Mar 13, 2024

Thanks for samples @martyzee and thanks for the analysis @RedCMD!

@alexr00 alexr00 added feature-request Request for new features or functionality grammar Syntax highlighting grammar and removed info-needed Issue requires more information from poster labels Mar 13, 2024
@alexr00 alexr00 added this to the Backlog Candidates milestone Mar 13, 2024
@VSCodeTriageBot
Copy link
Collaborator

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@martyzee
Copy link
Author

This feature request is now a candidate for our backlog. The community has 60 days to upvote the issue. If it receives 20 upvotes we will move it to our backlog. If not, we will close it. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

Is this technically not a bug?

@martyzee
Copy link
Author

currently there's no special support for bash

you would like bash added as an embedded language?

@RedCMD can you upvote please?

@VSCodeTriageBot
Copy link
Collaborator

This feature request has not yet received the 20 community upvotes it takes to make to our backlog. 10 days to go. To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@VSCodeTriageBot
Copy link
Collaborator

🙁 In the last 60 days, this feature request has received less than 20 community upvotes and we closed it. Still a big Thank You to you for taking the time to create this issue! To learn more about how we handle feature requests, please see our documentation.

Happy Coding!

@VSCodeTriageBot VSCodeTriageBot closed this as not planned Won't fix, can't repro, duplicate, stale May 13, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality grammar Syntax highlighting grammar
Projects
None yet
Development

No branches or pull requests

4 participants