- Notifications
You must be signed in to change notification settings - Fork7
Description
Hallo, problem is with tag v1.1.4 and I have found:
In shellscript.json, we have a group, "normal_statement_seperator" which includes 4 symbols:
The semicolon,;
"name": "punctuation.separator.semicolon.range"
An and,&&
"name": "punctuation.separator.statement.and.shell"
An or,||
"name": "punctuation.separator.statement.or.shell"
A background,&
"name": "punctuation.separator.statement.background.shell"
I first came on the problem that a script would hang if it backgrounded a process, a simple example:
sleep 10&
The statement background separator is used on lines 64 and 1817, I noticed there could be an issue with the grouping and confirmed there is a problem with this grouping.
The same problem occurs if you use a semicolon with a command on a single line, this also hangs:
echo hallo;
Then, if you put a statement on the same line (after either semicolon or ampersand), it will parse successfully:
sleep 10&echo hallo
A workaround, resulting in valid output, could be to use the nop:
sleep 10&: