Phidica / sublime-fish

A robust Sublime Text syntax package for fish
MIT License
35 stars 2 forks source link

bourne-style test commands not recognized #8

Closed rwols closed 5 years ago

rwols commented 7 years ago
#!/usr/bin/env fish
function die
    echo $argv
    exit 1 
end
set tokens foo bar
[ (count $tokens) -eq 3 ] ; or die whoops
# <- should ideally be support.function.test.begin
#                       ^ should ideally be support.function.test.end
Phidica commented 7 years ago

The current highlighting for this style of test is the same as that done by the fish parser itself, because the ending ] has no special treatment. So this is not a bug, but rather a request for an enhancement. That said, I can see the advantage of scoping it as support.function and I believe it can be done