Skip to content

Unable to parse heredoc at the beginning of the line #305

Open

Description

@mstachniuk

The parser is not able to parse the following valid Bash code:

#!/bin/bash

<<-EOF echo "Hello
  World"
EOF

Activity

  1. paulirish commented on Mar 30, 2026

    @paulirish

    Repro in gemini cli, which triggers this problem.

    gemini -p "Call run_shell_command to write a file. Use the command: << 'EOF' > scratch.ts\nhello\nEOF" --yolo
    
    # Bash command parsing error detected for command: << 'EOF' > scratch.ts
    # hello
    # EOF Syntax Errors: [ 'Error node: "<" at 0:1' ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions