oven-sh / bun

Incredibly fast JavaScript runtime, bundler, test runner, and package manager – all in one
https://bun.sh
Other
73.87k stars 2.74k forks source link

Support arrow keys in bun init prompts #1672

Open JacksonKearl opened 1 year ago

JacksonKearl commented 1 year ago

What is the problem this feature would solve?

Currently, attempting to use arrow keys to navigate around text entered in bun init prompts results in ^[[D^[[D^[[D^[[A^[[B^[[B^[[B^[[A^[[A^[[B^[[A^[f^[b^[f^[f^[f-type feedback, rather than cursor navigation.

image

What is the feature you are proposing to solve the problem?

Some sort of support for readline-style navigation.

What alternatives have you considered?

The with-readline wrapper package works well enough (with-readline bun init)

birkskyum commented 5 months ago

can confirm this is an issue on

Araxeus commented 4 months ago

This is also an issue in for await (const line of console)

tested on Windows 10 + Bun v1.1.11