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.23k stars 335 forks source link

Command hangs after finishing when terminal is not in focus #1542

Open bestickley opened 2 years ago

bestickley commented 2 years ago

Discord username (optional)

No response

Describe the bug

Command hangs after finishing when terminal is not in focus

To Reproduce

Steps to reproduce:

  1. Run a command that takes a few seconds
  2. Hide the screen
  3. See warp icon jiggle notifying you that it's complete
  4. Go back to terminal and try and type new command and see that you cannot.
  5. Hit CTRL+C twice to fix

Expected behaviour

User should be able to type new command after previous command finishes without typing CTRL+C

Screenshots

Before CTRL+C:

image

After CTRL+C twice:

image

Operating System

MacOS

OS Version

12.3.1

Shell Version

zsh 5.8 (x86_64-apple-darwin21.0)

Warp Version

v0.2022.06.20.09.15.stable_02

Additional context

No response

Warp Internal (ignore): linear-label:24888f54-df93-45d5-9bdd-e38f740cac19

No response

guotingchao commented 2 years ago

I have the same problem

elviskahoro commented 1 year ago

Thanks for reporting! It's likely something in your dotfiles regarding prompt or a OMZ plugin. Can you try the steps in these docs: https://docs.warp.dev/help/known-issues#configuring-and-debugging-your-rc-files

bestickley commented 1 year ago

@elviskahoro, I'm no longer using warp, but I'll leave open for @guotingchaopr.

elviskahoro commented 1 year ago

Do you normally use ZSH-Syntax?

dylang commented 1 year ago

I'm getting this in Fish.

In my config.fish:

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

### STARSHIP PROMPT
### https://github.com/starship/starship
starship init fish | source

test -e {$HOME}/.iterm2_shell_integration.fish ; and source {$HOME}/.iterm2_shell_integration.fish

# tabtab source for packages
# uninstall by removing these lines
[ -f ~/.config/tabtab/fish/__tabtab.fish ]; and . ~/.config/tabtab/fish/__tabtab.fish; or true

##### WHAT YOU WANT TO DISABLE FOR WARP - ABOVE
fi
dylang commented 1 year ago

weirdly, I get the notification and new prompt for sleep 4 && echo done (and other sleep values less than 4) - but but the hanging behavior for sleep 5 && echo done (and other sleep values higher than 5)!

So it only works with tasks that are less than 5 seconds?

dylang commented 1 year ago

I've updated to v0.2022.10.04.08.05.stable_00 and still see the problem. It seems to only work correctly if the task running takes 4 seconds or less to complete.

dylang commented 1 year ago

Still broken in v0.2022.10.11.08.13.stable_01.

rubas commented 1 year ago

weirdly, I get the notification and new prompt for sleep 4 && echo done (and other sleep values less than 4) - but but the hanging behavior for sleep 5 && echo done (and other sleep values higher than 5)!

Same here. If the warp is not in focus, I get not new prompt, if the commands runs for 5+ second.

sdrush-mw commented 1 year ago

I also just started using warp and have this same issue. I am using Starship as my prompt, but on long running commands, the prompt never returns when the command terminates.

rafagan commented 1 year ago

Same here, I'm using zsh with oh-my-zsh and powerlevel10k

telmen commented 1 year ago

same here, using fish.

telmen commented 1 year ago

hey @dannyneira, are you guys aware of this issue? thanks!

dannyneira commented 1 year ago

@rafagan p10k is not currently supported, along with some oh-my-zsh plugins. My guess is that you normally have a custom prompt, theme, or plugin and Warp is unable to parse it.

You can check whether it’s something in your dotfiles by setting up clean configs: Run echo 'ZDOTDIR=/' > ~/.zshenv This forces Zsh to run with zero configs.

You can disable parts of your dotfiles just for Warp by using this conditional statement:

# Bash and Zsh
if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
# > What you want to disable here <
fi
# Fish
if test "$TERM_PROGRAM" != "WarpTerminal"
# > What you want to disable here <
end

We have a list of incompatible tools here: https://docs.warp.dev/help/known-issues#list-of-incompatible-tools And more info on custom prompts here: https://docs.warp.dev/features/prompt