`prompt` shows `^M` and keep waiting after `Enter` is pressed on macOS
- Dominant language
- Rust
- Stars
- 108k
- Forks
- 6.4k
- Avg merge
- 2d 20h
- Merged PRs (30d)
- 58
Description
Like this (I pressed `Enter` three times). Using `^J` instead of `^M` (Enter) complete the prompt.

I'm not sure but should we just quit when we see `^M` (CR) or `^J` (LF) like what I've wrote on https://github.com/denoland/deno_std/pull/3777 ?
I have reported this as an issue because the current implementation seems to have been implemented that way on purpose.
https://github.com/denoland/deno/blob/e5819777c3962079a06c3b09bced1945b1c135f7/runtime/js/41_prompt.js#L61-L70
Contributor guide
Research direction
Start with runtime/js/41_prompt.js at lines 61-70, then compare the reported macOS behavior with the deno_std pull request linked in the issue. Reproduce the prompt interaction using Enter and ^J, and confirm that the prompt completes correctly for both line-ending inputs.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- javascript
- Domain
- cli
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 45/100