Closed bbrk24 closed 2 weeks ago
It seems to work for me (on Node 22.9.0, on Windows and on Linux).
Is your shell overwriting the a
? Above I'm using zsh with PROMPT_EOL_MARK="%S%F{green}[↩]%f%s"
I just got a slow-mo video with my phone, and you seem to be right -- but even at 240 fps, it's barely noticeable.
https://github.com/user-attachments/assets/408727b8-cc94-4f2a-b5c0-e361dbd65a74
I feel like it's worth pointing out that for whatever reason it only overwrites that "a" when I run it with civet
directly, and never when I compile it to JS and then run it with node
.
As for some environment differences: I'm on bash 5.1.16 (not zsh), and node 20.18 (not 22).
Could it be npx
causing the issue? What happens if you run civet
directly?
Wait, yes! It's npx
's fault. What?!
MWE:
When saved in
mwe.civet
, runningcivet mwe.civet
produces no output, butcivet -c --js mwe.civet -o .mjs && node mwe.mjs
prints an "a" with no trailing newline. Addingprocess.stdout.write '\n'
at the end of the program makes it print "a" with a trailing newline in both cases.