jay icon indicating copy to clipboard operation
jay copied to clipboard

Multiline commands aren't supported

Open schfkt opened this issue 5 years ago • 2 comments

It looks like I can't enter a multiline command in jay, e.g. a for loop:

> for (let applicant of applicants) { 
SyntaxError: Unexpected token (2:1)
> for (var i = 1; i < 10; i++) { 
SyntaxError: Unexpected token (2:1)

The same works fine in node REPL:

> const applicants = [1,2,3]
undefined
> for (let applicant of applicants) {
... console.log(applicant)
... }
1
2
3
undefined
> for (var i = 0; i < 3; i++) {
... console.log(i)
... }
0
1
2
undefined

schfkt avatar Jul 24 '19 08:07 schfkt

This is a super huge deal for me as well, I love jay and have used it since near its release but not being able to do multi-line makes some things near impossible.

You cannot write more than a trivial amount of code at once, because it all has to go on a single line. And copy-pasting does not work.

GavinRay97 avatar Dec 16 '19 00:12 GavinRay97

Here is most of it, I just cant get the evaluation to fire now: PULL REQUEST: https://github.com/nikersify/jay/pull/26

GavinRay97 avatar Dec 16 '19 02:12 GavinRay97