kevinlawler / kona

Open-source implementation of the K programming language
ISC License
1.36k stars 138 forks source link

prompt should display after scrpt is run #557

Closed tavmem closed 4 years ago

tavmem commented 4 years ago

In kona, when executing a script, the 2-space prompt is displayed before the script is run:

$ rlwrap -n ~/kona/k script.k
kona      \ for help. \\ to exit.

  x=3
x=2
x=1
x=0
x=0, a=0
x=1, a=1
x=2, a=2
x=3, a=3
3
"1st console command"
"1st console command"
  "2nd console command"
"2nd console command"

In k2.8, the 2-space prompt is displayed after the script is run:

$ rlwrap -n ~/k2.8/k script.k
K 2.8 2000-10-10 Copyright (C) 1993-2000 Kx Systems
\ for help. \\ to exit.

x=3
x=2
x=1
x=0
x=0, a=0
x=1, a=1
x=2, a=2
x=3, a=3
3
  "1st console command"
"1st console command"