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

Use of bash bitwise shift left causes colour highlighting to break #227068

Closed
Tracked by #227290
theknowledge opened this issue Aug 29, 2024 · 6 comments
Closed
Tracked by #227290

Use of bash bitwise shift left causes colour highlighting to break #227068

theknowledge opened this issue Aug 29, 2024 · 6 comments
Assignees
Labels
grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream

Comments

@theknowledge
Copy link

theknowledge commented Aug 29, 2024

Type: Bug

Including bash bitwise shift left << inside a variable assignment causes all subsequent colour highlighting to break, all text except $variables appears orange
e.g.
b=$(( a << 4 ))

Other operators do not cause a problem.

VS Code version: Code 1.90.2 (5437499, 2024-06-18T22:34:26.404Z)
OS version: Windows_NT x64 10.0.19045
Modes:

System Info
Item Value
CPUs Intel(R) Core(TM) i7-7700 CPU @ 3.60GHz (8 x 3600)
GPU Status 2d_canvas: enabled
canvas_oop_rasterization: enabled_on
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
skia_graphite: disabled_off
video_decode: enabled
video_encode: enabled
vulkan: disabled_off
webgl: enabled
webgl2: enabled
webgpu: enabled
Load (avg) undefined
Memory (System) 15.85GB (5.25GB free)
Process Argv --crash-reporter-id bec0f67a-4990-41d2-bfd2-893d445a558a
Screen Reader no
VM 0%
Extensions (23)
Extension Author (truncated) Version
doxdocgen csc 1.4.0
better-cpp-syntax jef 1.27.1
rainbow-csv mec 3.12.0
debugpy ms- 2024.8.0
python ms- 2024.12.3
vscode-pylance ms- 2024.8.2
jupyter ms- 2024.5.0
jupyter-keymap ms- 1.1.2
jupyter-renderers ms- 1.0.19
vscode-jupyter-cell-tags ms- 0.1.9
vscode-jupyter-slideshow ms- 0.1.6
remote-containers ms- 0.380.0
remote-ssh ms- 0.113.1
remote-ssh-edit ms- 0.86.0
remote-wsl ms- 0.88.2
cmake-tools ms- 1.19.49
cpptools ms- 1.21.6
cpptools-extension-pack ms- 1.3.0
makefile-tools ms- 0.10.26
remote-explorer ms- 0.4.3
tcl ras 0.1.0
shellcheck tim 0.37.1
cmake twx 0.0.17

(1 theme extensions excluded)

A/B Experiments
vsliv368:30146709
vspor879:30202332
vspor708:30202333
vspor363:30204092
vscod805:30301674
binariesv615:30325510
vsaa593cf:30376535
py29gd2263:31024239
c4g48928:30535728
azure-dev_surveyone:30548225
962ge761:30959799
pythongtdpath:30769146
welcomedialogc:30910334
pythonnoceb:30805159
asynctok:30898717
pythonregdiag2:30936856
pythonmypyd1:30879173
h48ei257:31000450
pythontbext0:30879054
accentitlementsc:30995553
dsvsc016:30899300
dsvsc017:30899301
dsvsc018:30899302
cppperfnew:31000557
dsvsc020:30976470
pythonait:31006305
dsvsc021:30996838
bdiig495:31013172
pythoncenvpt:31062603
a69g1124:31058053
dvdeprecation:31068756
dwnewjupytercf:31046870
impr_priority:31102340
refactort:31108082
pythonrstrctxt:31112756
wkspc-onlycs-c:31111717
wkspc-ranged-t:31125599
ei213698:31121563
aajjf12562:31125793

Copy link

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

Happy Coding!

@theknowledge
Copy link
Author

Problem persists in v1.92.2

@alexr00
Copy link
Member

alexr00 commented Aug 30, 2024

Can you share a screenshot?

@alexr00 alexr00 added the info-needed Issue requires more information from poster label Aug 30, 2024
@theknowledge
Copy link
Author

Hi Alex, sure thing:
image

As opposed to:
image

Thanks

@johan-boule
Copy link

I think VSCode's syntax parsing for Bash or just posix shell, is probably only 50% correct, no more.
I don't use VSCode for doing bash stuff, because the colors are wrong half the time and it's distracting.

@bysnet bysnet mentioned this issue Aug 31, 2024
@alexr00
Copy link
Member

alexr00 commented Sep 2, 2024

Duplicate of the upstream issue jeff-hykin/better-shell-syntax#93, but because of the license change we can't take the fix.

@alexr00 alexr00 added grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream and removed info-needed Issue requires more information from poster labels Sep 2, 2024
@alexr00 alexr00 closed this as completed Sep 2, 2024
@vs-code-engineering vs-code-engineering bot locked and limited conversation to collaborators Oct 17, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
grammar Syntax highlighting grammar upstream-issue-linked This is an upstream issue that has been reported upstream
Projects
None yet
Development

No branches or pull requests

3 participants