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
21k stars 358 forks source link

In Docker, using the "warpify subshell" command does not take effect when pressing the Enter key. #3996

Open PetrichorWandering opened 9 months ago

PetrichorWandering commented 9 months ago

Discord username (optional)

No response

Describe the bug

When I use the warpify subshell in Docker, I cannot submit any command by pressing the enter key.

To reproduce

  1. Input docker exec -it <container name> bash to enter the docke.
  2. Press ^ + I to enter warpify subshell.
  3. Now you will find that any command you input cannot be submitted by pressing enter.

Before discovering this issue, I replaced Docker Desktop with Obrstack, and I'm not sure if it's caused by incompatibility between Warp and Obrstack. However, the problem still exists even after I switched back to Docker Desktop. And I'm quite certain that everything was fine in the previous version.

Expected behavior

No response

Screenshots

No response

Operating system

MacOS

Operating system and version

Sonoma 14.2.1

Shell Version

No response

Current Warp version

v0.2023.12.19.08.02.stable_00

Regression

Yes, this bug started recently or with an X Warp version

Recent working Warp date

No response

Additional context

No response

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 9 months ago

Hey @PetrichorWandering Sorry to hear about this issue. There are a couple of things you can try to fix this.

  1. Add the following to your docker container's ~/.bashrc file To always Warpify the subshell:
    printf '\eP$f{"hook": "SourcedRcFileForWarp", "value": { "shell": "bash" }}\x9c'
  2. Use Docker Desktop, plus the new Warp Docker extension to help with connecting to docker containers. Download here.

https://github.com/warpdotdev/Warp/assets/16809145/beaf4a1f-f1f2-4fd1-9038-da20acc7dd5f

Please let us know if any of these help with the issue.