Consider using a better maintained shellscript grammar
See original GitHub issuePlease search existing issues to avoid creating duplicates.
Duplicate of locked https://github.com/microsoft/vscode/issues/40956 , which redirected the discussion to https://github.com/atom/language-shellscript/issues/100 , where I was told it’s no longer their problem:
VSCode is still using the old TextMate grammar, which the Atom team no longer maintains as we have moved many grammars (including this one) over to Tree-sitter.
·
Also please test using the latest insiders build to make sure your issue has not already been fixed:
Can’t do that right now, maybe next week. In case it was really fixed, please consider this issue as a request to annotate the locked thread with updated info.
- VSCode Version: 1.36.1
- OS Version: Ubuntu 16.04 LTS (xenial)
Steps to Reproduce:
- Create a bash file
moo.sh
:
#!/bin/bash
nl <(sed -nre 's!^\s+!!p' <<' __FOO__'
########################
## Dummy Message ##
########################
__FOO__
)
echo bar
- Compare with my screenshot.
- Run it and observe that bash considers “echo” a command of its own.
- Unident
__FOO__
to see the flipside of this bug: VSCode now thinks everything is ok. - Run again, see that in reality, unindenting broke it:
./moo.sh: line 2: unexpected EOF while looking for matching `)'
./moo.sh: line 9: syntax error: unexpected end of file
Does this issue occur when all extensions are disabled?: Yes
Issue Analytics
- State:
- Created 4 years ago
- Reactions:9
- Comments:17 (5 by maintainers)
Top GitHub Comments
Probably the same issue here. I have an intended Heredoc whose delimiter isn’t recognized correctly because of indentation. Although I’m using the
<<-
syntax as stated inman bash
I have found that it seems to break with the standard EOF too:
As you can see, this works on Github itself. While it works here, this breaks in VSCode: