sevdokimov / FriendlyTerminal

Public issue tracking for Friendly Terminal IntelliJ plugin.
7 stars 0 forks source link

Can't run multiline code #14

Closed Cosolom closed 1 year ago

Cosolom commented 1 year ago

When I inserted code with multiple lines - I can't submit it. "Enter" adding new lines instead of run code

sevdokimov commented 1 year ago

I cannot reproduce the problem. Could you provide the text? May be the text contains an unfinished string literal.

Cosolom commented 1 year ago

It's not related to text FriendlyTerminal

sevdokimov commented 1 year ago

The problem is in the IntelliJ IDEA language parser, it doesn't recognize EOF at the end as a heredoc finish marker. As a workaround, you can insert a line break between EOF and "`". Example:

PHP=`cat << 'EOF'
some text
EOF
`; echo $PHP
Cosolom commented 1 year ago

Thank you!! It works