Warp icon indicating copy to clipboard operation
Warp copied to clipboard

Standard output is interpreted as standard input for shell

Open KucharskiPiotr opened this issue 3 years ago • 3 comments

Discord username (optional)

No response

Describe the bug

When the shell is returned and any application writes output to the standard output, that output is printed to the shell and is interpreted as standard input for shell. See the video attached - vim is started in the background and output is a new input for the next command.

https://user-images.githubusercontent.com/29356216/186113984-de4f5ee6-ee42-4a92-8702-b9e11fb5ad21.mov

To Reproduce

  1. Run any application with & at the end.
  2. Standard output is written into the next shell input. You can edit the text or just hit enter.

Expected behaviour

The standard output is not a part of the next command standard input - just like it is done in a regular zsh shell.

Screenshots

No response

Operating System

MacOS

OS Version

12.5

Shell Version

zsh 5.8.1

Warp Version

v0.2022.08.16.10.16.stable_02

Additional context

No response

Does this block you from using Warp daily?

No

Warp Internal (ignore): linear-label:b8107fdf-ba31-488d-b103-d271c89cac3e

No response

KucharskiPiotr avatar Aug 23 '22 08:08 KucharskiPiotr

Can you send a video of what your regular terminal does? Do you normally have a custom prompt?

elviskahoro avatar Aug 30 '22 19:08 elviskahoro

I use a default prompt that comes with Oh My Zsh. Here is a video of what happens in regular MacOs terminal:

https://user-images.githubusercontent.com/29356216/188069069-71f52e1a-7e3c-4e4f-bd4d-4837e461a70d.mov

KucharskiPiotr avatar Sep 02 '22 06:09 KucharskiPiotr

It seem's like Warp isn't able unable to parse your custom prompt. At the moment the best workaround is to disable the prompt JUST for Warp by using this conditional statement:



if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
##### WHAT YOU WANT TO DISABLE FOR WARP - BELOW


# Whatever you want to disable


##### WHAT YOU WANT TO DISABLE FOR WARP - ABOVE
fi


We have a list of incompatible tools in our documentation: https://docs.warp.dev/help/known-issues#list-of-incompatible-tools

warpdotdev-devx avatar Sep 07 '22 02:09 warpdotdev-devx

Please try running the following command in the Warp terminal and you will be able to reproduce the bug:

sleep 1 &

This bug is not related to the custom prompt.

shpasser avatar Oct 12 '22 19:10 shpasser