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

Some multiline shell commands may incorrectly highlighted #91345

Closed
GreenYun opened this issue Feb 25, 2020 · 2 comments
Closed

Some multiline shell commands may incorrectly highlighted #91345

GreenYun opened this issue Feb 25, 2020 · 2 comments
Assignees
Labels
grammar Syntax highlighting grammar upstream Issue identified as 'upstream' component related (exists outside of VS Code)

Comments

@GreenYun
Copy link

  • VSCode Version: 1.43.0-Insider
  • OS Version: Ubuntu Desktop 19.10 (also tested with Window 10 1909)

Steps to Reproduce:

  1. Select the language mode to "Shell Script"
  2. Paste the following lines into the editor
comms=$(cat some_file.txt 2>&1 | while read -r line; do \
                                    printf "%s\n" "${line%%=*}="; \
                                done)

The issue comes that all the lines following these lines may be incorrectly highlighted, that it seems to consider the parentheses not closed. In fact the script can be run perfectly in shell, which mean the lines are legal.

Does this issue occur when all extensions are disabled?: Yes.

@alexr00 alexr00 added grammar Syntax highlighting grammar upstream Issue identified as 'upstream' component related (exists outside of VS Code) labels Feb 25, 2020
@alexr00
Copy link
Member

alexr00 commented Feb 25, 2020

https://github.com/atom/language-shellscript owns this, but they are no longer maintaining the grammar.
If there is better/better maintained shell script grammar I can look at updating to that.

@alexr00
Copy link
Member

alexr00 commented Nov 5, 2020

Could be solved by #77675, which tracks considering a new shellscript grammar, so closing in favor of that issue.

@alexr00 alexr00 closed this as completed Nov 5, 2020
@github-actions github-actions bot locked and limited conversation to collaborators Dec 20, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
grammar Syntax highlighting grammar upstream Issue identified as 'upstream' component related (exists outside of VS Code)
Projects
None yet
Development

No branches or pull requests

2 participants