jeff-hykin / better-shell-syntax

💾 📦 ♻️ An improvement to the shell syntax for VS Code
MIT License
52 stars 4 forks source link

Unexpected highlighting when function starts with `pushd` or `popd` #102

Open alexr00 opened 2 months ago

alexr00 commented 2 months ago

The code with a problem is:

a() {
    pushd a
    popd
}

It looks like:

Image

It should look like:

The p and the ushd should all be the same token and the same color.

The p has the following scopes:

meta.statement.shell
meta.function.body.shell
meta.function.shell
source.shell

The u, s, h, and d are all individual tokens and have the following scopes:

string.unquoted.shell
meta.statement.command.name.shell
meta.statement.command.shell
meta.statement.shell
meta.function.body.shell
meta.function.shell
source.shell

Original from @Salamandar in https://github.com/microsoft/vscode/issues/228520