This repository was archived by the owner on Dec 15, 2022. It is now read-only.
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
String redirection highlighting problem #92
Open
Description
Prerequisites
I did not perform these steps because I do not see that they are applicable ;) I did look for similar issues and found nothing.
- Put an X between the brackets on this line if you have done all of the following:
- Reproduced the problem in Safe Mode: http://flight-manual.atom.io/hacking-atom/sections/debugging/#using-safe-mode
- Followed all applicable steps in the debugging guide: http://flight-manual.atom.io/hacking-atom/sections/debugging/
- Checked the FAQs on the message board for common solutions: https://discuss.atom.io/c/faq
- Checked that your issue isn't already filed: https://github.com/issues?utf8=✓&q=is%3Aissue+user%3Aatom
- Checked that there is not already an Atom package that provides the described functionality: https://atom.io/packages
Description
Highlighting is incorrect when using string redirection <<<
and subshell
Steps to Reproduce
Create this file in Atom with Shell Script
highlighting:
#!/usr/bin/env bash
echo "Case 1:"
read one two <<< "hello world"
echo "Correctly highlighted when string is used"
echo "Case 2:"
read one two <<< $(echo "hello world")
echo "Everything after <<< incorrectly highlighted when $ is used"
echo "until a match is found at the beginning of a line"
$(echo
echo "highlighting reset"
echo "Case 3:"
read one two <<< $foo
echo "Everything after <<< incorrectly highlighted when $ is used"
echo "until a match is found at the beginning of a line"
$foo
echo "highlighting reset"
echo "Case 4:"
read one two <<< $foo
echo "Everything after <<< incorrectly highlighted when $ is used"
echo "until a match is found at the beginning of a line"
$foo
echo "highlighting NOT reset"
Expected behavior: [What you expect to happen]
Correct highlighting after <<< $()
Actual behavior: [What actually happens]
Highlighting incorrect
Reproduces how often: [What percentage of the time does it reproduce?]
100%
Versions
MacOS 10.13.1
$ atom --version
Atom : 1.22.0
Electron: 1.6.15
Chrome : 56.0.2924.87
Node : 7.4.0
$ apm --version
apm 1.18.8
npm 3.10.10
node 6.9.5 x64
python 2.7.10
git 2.14.1
edit: clarified that it is not only for subshell and reset must be at beginning of line