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.

Shell command in back quotes with <<  #158

@alexr00

Description

@alexr00

Prerequisites

Description

Tokenization is broken if script has back quotes with <<.

Steps to Reproduce

  1. Create file test.sh
  2. Open test.sh and paste example below
CHANGELOG=`cat << EOF
nginx ($VER-2~$REL) $REL; urgency=low

  * $VER

 -- $CONTRIB_NAME <$CONTRIB_EMAIL>  $DATE
EOF`
  1. Write code below CHANGELOG.

Gist with example
All code below back quotes will be highlighted as 'shell code'.
Expected behavior:

The string and backtick related scopes will end with the closing backtick.

Even after the closing backtick these are the scopes:

string.unquoted.heredoc.shell
string.interpolated.backtick.shell
source.shell

Versions

VS Code version: Code 1.44.2 (ff915844119ce9485abfe8aa9076ec76b5300ddd, 2020-04-16T17:07:18.473Z)
OS version: Darwin x64 17.7.0

Additional Information

Originally from @psycho-coder in microsoft/vscode#96144

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions