jeff-hykin / better-shell-syntax

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

while inside functions is not coloured correctly #83

Closed balupton closed 5 months ago

balupton commented 6 months ago

The code with a problem is:

#!/usr/bin/env bash

function eval_wrapper {
    while test "$1" = '--'; do
        shift
    done
}
#!/usr/bin/env bash

function eval_wrapper () (
    while test "$1" = '--'; do
        shift
    done
)

It looks like:

CleanShot 2024-03-29 at 13 07 51@2x CleanShot 2024-03-29 at 13 09 47@2x

It should look like:

CleanShot 2024-03-29 at 13 08 18@2x

version

v1.8.3

Zhengqbbb commented 6 months ago

same problem - [theme: "Vitesse Theme QB" ]

It seems that the first line of "while" in the function will cause

testing(){
    while :; do
        echo 1
    done
}

CleanShot 2024-03-29 at 16 37 31@2x

jeff-hykin commented 5 months ago

should be fixed with v1.8.5