Impossible to paste verbatim a multi lines code in packer console?

Hi,

It would be nice to just copy and paste a multi lines code from a template code to the packer console. For instance, imagine I have this code in a template (a multi lines code, it’s just a basic example):

regex(
  "(?P<release>[.0-9]+)",
  var.name
)

Maybe I have missed something but, to me, it’s impossible to just paste this code in packer console. Before, I have to change this code to have just one line. In this case, it’s a quick task to do that but in other (and more complex) cases, it’s a little bit tedious.

Have I missed something or the copy and paste is just impossible currently?
Thanks for your help.

My version of Packer: v1.12.0
My OS: Ubuntu 22.04.5 LTS

Hi,

UP?

I still have the same problem (impossible to test multi lines code in packer console) with Packer version 1.13.1.

Furthermore, why doesn’t this code (a oneliner) work?

~$ packer console --config-type=hcl2 

> local "config" { expression = "test" }
> Error: Extra characters after expression

  on <console-input> line 1:
  (source code not available)

An expression was successfully parsed, but extra characters were found after it.

> 

Thx for your help.