Prerequisites
Description
The shell syntax highlighting does not behave as expected after the first double quote of a string that follows an output redirection (line 200 on the screenshot below).
All the rest of the file is somewhat coloured as a string (green).
Please find the following screenshot from Atom:

For comparison, here's also a screenshot from gedit of the same file, to show how the syntax highlighting look:

(Copyright note: the code snippet shown in the screenshots above is from the script "multicrop" for ImageMagick by Fred Weinhaus, found at http://www.fmwconcepts.com/imagemagick/index.php)
After some trials, it seems that removing >&2 fixes the highlighting. So, the syntax is coloured correctly if that is deleted. In the steps below you find a snipped i used for trials.
Steps to Reproduce
- Take this snippet of code:
functs()
{
echo >&2 ""
echo >&2 "$USER:" "$PATH"
echo >&2 'this' "that"
}
- Paste it in Atom, select "Shell Script" as sysntax highlighitng
- You'll see that after the first double quote of the first string after
>&2 everything is green, a part from variables
- To verify what should be the behaviour, paste the same snippet in gedit and highlighting for "sh" does hold the desired result
- When the string
>&2 is removed, sometimes the systax is highlighted correctly again.
Expected behavior:
See description
Actual behavior:
See description
Reproduces how often:
All the time, consistently
Versions
$ atom --version
Atom : 1.40.1
Electron: 3.1.10
Chrome : 66.0.3359.181
Node : 10.2.0
$ apm --version
apm 2.4.3
npm 6.2.0
node 10.2.1 x64
atom 1.40.1
python 2.7.15+
git 2.17.1
Additional Information
Ubuntu OS, 18.04
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 18.04.3 LTS
Release: 18.04
Codename: bionic
Prerequisites
Description
The shell syntax highlighting does not behave as expected after the first double quote of a string that follows an output redirection (line 200 on the screenshot below).


All the rest of the file is somewhat coloured as a string (green).
Please find the following screenshot from Atom:
For comparison, here's also a screenshot from gedit of the same file, to show how the syntax highlighting look:
(Copyright note: the code snippet shown in the screenshots above is from the script "multicrop" for ImageMagick by Fred Weinhaus, found at http://www.fmwconcepts.com/imagemagick/index.php)
After some trials, it seems that removing
>&2fixes the highlighting. So, the syntax is coloured correctly if that is deleted. In the steps below you find a snipped i used for trials.Steps to Reproduce
>&2everything is green, a part from variables>&2is removed, sometimes the systax is highlighted correctly again.Expected behavior:
See description
Actual behavior:
See description
Reproduces how often:
All the time, consistently
Versions
Additional Information
Ubuntu OS, 18.04