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 Shell Script Syntax highlight problem after pipe and command with ; #90

Open
alexr00 opened this issue May 13, 2024 · 0 comments
Open

Comments

@alexr00
Copy link

alexr00 commented May 13, 2024

The code with a problem is:

#!/usr/bin/bash

# broken while highlight after pipe
cat $foo |
while read i; do
	# broken done; highlight after output
	echo "output";
done;

# OK
cat $foo |

while read i; do
	echo "output"
done;

# OK
cat $foo | while read i; do
	echo "output";
done

# OK
cat $foo | while read i; do
	echo "output";
	# COMM
done;

It looks like:

image

The first read has:

string.unquoted.shell
meta.while.shell
meta.statement.shell
source.shelll

but the second read has:

support.function.builtin.shell
entity.name.command.shell
entity.name.function.call.shell
meta.statement.command.name.shell
meta.statement.command.shell
meta.statement.shell
meta.scope.while-loop.shell
source.shell

The first done has:

entity.name.command.shell
entity.name.function.call.shell
meta.statement.command.name.shell
meta.statement.command.shell
meta.statement.shell
source.shell

but the second done has:

keyword.control.shell
meta.scope.while-loop.shell
source.shell

It should look like:

I would expect that the squared read and the circled done should have the same color.

Originally from @gullevek in microsoft/vscode#212572.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant