You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
Repository navigation
This repository was archived by the owner on Dec 15, 2022. It is now read-only.
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 bashecho"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"$(echoecho"highlighting reset"echo"Case 3:"read one two <<<$fooecho"Everything after <<< incorrectly highlighted when $ is used"echo"until a match is found at the beginning of a line"$fooecho"highlighting reset"echo"Case 4:"read one two <<<$fooecho"Everything after <<< incorrectly highlighted when $ is used"echo"until a match is found at the beginning of a line"$fooecho"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?]
Activity
[-]String redirection from subshell highlighting problem[/-][+]String redirection highlighting problem[/+]hobti01 commentedon Nov 23, 2017
Simple workaround (solution?), enclose the right-hand-side in double-quotes, i.e. make it a string:
read one two <<< "$foo"adamkdean commentedon Dec 15, 2017
I came here to report this too.
@hobti01 that won't work, that actually changes the functionality. These lines behave differently.