Skip to content
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
@hobti01

Description

@hobti01

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.

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions