bun icon indicating copy to clipboard operation
bun copied to clipboard

Stuck shell on windows (nushell)

Open romancitodev opened this issue 11 months ago • 8 comments

What version of Bun is running?

1.1.0+5903a6141

What platform is your computer?

Microsoft Windows NT 10.0.19045.0 x64

What steps can reproduce the bug?

  1. Run any bun command. (bun run dev)
  2. Send the Ctrl + C Signal.
  3. Write anything.

image

What is the expected behavior?

The expected behaviour is just obtain control of the shell again.

What do you see instead?

No response

Additional information

No response

romancitodev avatar Apr 01 '24 22:04 romancitodev

In other shells like powershell, works correctly.

romancitodev avatar Apr 01 '24 22:04 romancitodev

I can confirm this happens on win 11 also.

I have noticed few things by using:

nushell - only alphabets works. ctrl, alt, enter, backspace , etc. does not work. Arrow keys generate symbols ( [A [B [C [D ) cmd - everything works except backspace clears out whole words instead of single letters, Arrow keys generate symbols ( [A [B [C [D ) powershell - everything works normally.

pratikb64 avatar Apr 02 '24 12:04 pratikb64

related issue on nushell side https://github.com/nushell/nushell/issues/12355

Apparently, there are some attributes that are not cleaned up on windows after an interrupt

Barbiero avatar Apr 03 '24 16:04 Barbiero

Having this exact same issue.

dan-myles avatar Apr 03 '24 19:04 dan-myles

Want to come and note that this still happens with Nushell in v1.1.3

image

itsMapleLeaf avatar Apr 08 '24 18:04 itsMapleLeaf

Works for me with bun v1.1.3 and nushell 0.91.0.

image

But I'm not going to close the issue because it may not work for someone else.

romancitodev avatar Apr 08 '24 21:04 romancitodev

That's interesting, since the issue reported earlier was reported on 0.91.1. Regression in a patch release?

It could also be related to how the Vite CLI hooks into the keyboard for h + enter

EDIT: Can confirm. I disabled that message and keyboard handler with logLevel: "warn" in my vite config, and now it works fine.

itsMapleLeaf avatar Apr 08 '24 22:04 itsMapleLeaf

Hello,

Just an additional data point. The error is reproducible on bun 1.1.7+b0b7db5c0 and nu 0.93.0 (In both Windows Terminal and in conhost.exe, win11 23H2 - 22631.3527)

Behavior is very similar to the previous one.

PAStheLoD avatar May 05 '24 20:05 PAStheLoD