warpdotdev / Warp

Warp is a modern, Rust-based terminal with AI built in so you and your team can build great software, faster.
https://warp.dev
Other
20.95k stars 358 forks source link

ctrl+d exits shell during input #4582

Open silly-git opened 6 months ago

silly-git commented 6 months ago

Discord username (optional)

No response

Describe the bug

When entering ctrl+d on an empty line it is expected that the shell closes, in this regard Warp behaves correctly. When the line is not empty ctrl+d should not close the shell, instead it does things like auto-completion, etc depending on the shell you're working in. In this regard Warp exits the shell, rather than allowing the shell to perform the other action.

To reproduce

  1. Open Warp.
  2. Type ech.
  3. Type ctrl+d. 3.a Expected: In zsh/tcsh the shell should display the following auto-completes: echo echotc 3.b Actual: Warp closes the shell.

Expected behavior

In zsh/tcsh the shell should display auto-completes, bash doesn't do anything, including exit.

Screenshots

No response

Operating system

MacOS

Operating system and version

14.4.0

Shell Version

zsh 5.9, bash 3.2, tcsh 6.21

Current Warp version

v0.2024.03.12.08.02.stable_01

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

No response

Additional context

The expected behaviour exists in both Terminal.app and iTerm.app (as well as Linux/other shells).

Does this block you from using Warp daily?

No

Is this a Warp specific issue? (i.e. does it happen in Terminal, iTerm, Kitty, etc.)

Yes, this I confirmed this only happens in Warp, not other terminals.

Warp Internal (ignore): linear-label:b9d78064-c89e-4973-b153-5178a31ee54e

None

dannyneira commented 6 months ago

Thanks for letting us know @silly-git. As a workaround I recommend you press TAB instead of CTRL-D to show possible completions (i.e. ech). You, can also try changing the completions keybind to CTRL-D instead of TAB and if there is nothing selected you can use that command to open the completion menu and show possible options like in a normal terminal.

Also, currently, CTRL-D also deletes text if any are selected in the input.

https://github.com/warpdotdev/Warp/assets/16809145/f9e80257-95ee-435b-973b-cefd0d02bbcf

Finally, note that Warp only supports bash, zsh and fish, not tcsh.