denoland / denoland/deno

`prompt` shows `^M` and keep waiting after `Enter` is pressed on macOS

Open
#21,189 0 comments 0 reactions 0 assignees View on GitHub
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.

![CleanShot 2023-11-14 at 05 57 07](https://github.com/denoland/deno/assets/546312/7452face-e37a-4bf1-af8c-a126011d97ce)

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

Open the contributing 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.