wez / wezterm

A GPU-accelerated cross-platform terminal emulator and multiplexer written by @wez and implemented in Rust
https://wezfurlong.org/wezterm/
Other
17.72k stars 793 forks source link

[WSL2 + ZSH + Starship Prompt] - Shell command output sometimes being swallowed #2678

Closed sgoudham closed 1 year ago

sgoudham commented 2 years ago

What Operating System(s) are you seeing this problem on?

Windows

Which Wayland compositor or X11 Window manager(s) are you using?

No response

WezTerm version

20221023-205047-43f2265e

Did you try the latest nightly build to see if the issue is better (or worse!) than your current version?

Yes, and I updated the version box above to show the version of the nightly that I tried

Describe the bug

When using WezTerm on WSL2 + Starship Prompt with the zsh shell integration, the following behaviour is observed: starship-bug It is important to note that the output is correctly shown after going into an editor such as lvim and exiting.

To Reproduce

  1. Add . "$HOME/.config/wezterm/wezterm.sh" to .zshrc (The content of this file is https://github.com/wez/wezterm/blob/main/assets/shell-integration/wezterm.sh)
  2. Install Starship.rs and include eval "$(starship init zsh)" at the bottom of .zshrc
  3. Run exec zsh
  4. Run normal commands and observe output being swallowed randomly

Configuration

no config

Expected Behavior

The output should not be swallowed by WezTerm

Logs

21:39:50.611 WARN wezterm_font > No fonts contain glyphs for these codepoints: \u{1f162}. Placeholder glyphs are being displayed instead. You may wish to install additional fonts, or adjust your configuration so that it can find them. https://wezfurlong.org/wezterm/config/fonts.html has more information about configuring fonts. Set warn_about_missing_glyphs=false to suppress this message. 22:07:56.691 INFO wezterm_gui::termwindow > clicking https://github.com/starship/starship/issues/new?template=Bug_report.md&body=%23%23%23%23+Current+Behavior%0A%3C%21--+A+clear+and+concise+description+of+the+behavior.+--%3E%0A%0A%23%23%23%23+Expected+Behavior%0A%3C%21--+A+clear+and+concise+description+of+what+you+expected+to+happen.+--%3E%0A%0A%23%23%23%23+Additional+context%2FScreenshots%0A%3C%21--+Add+any+other+context+about+the+problem+here.+If+applicable%2C+add+screenshots+to+help+explain.+--%3E%0A%0A%23%23%23%23+Possible+Solution%0A%3C%21---+Only+if+you+have+suggestions+on+a+fix+for+the+bug+--%3E%0A%0A%23%23%23%23+Environment%0A-+Starship+version%3A+1.11.0%0A-+zsh+version%3A+zsh+5.8+%28x86_64-ubuntu-linux-gnu%29%0A-+Operating+system%3A+Ubuntu+20.04%0A-+Terminal+emulator%3A+WezTerm+20220923-164403-61752504%0A-+Git+Commit+Hash%3A+%0A-+Branch%2FTag%3A+master%0

Anything else?

Without the . "$HOME/.config/wezterm/wezterm.sh" included within the .zshrc, Starship works properly

wez commented 2 years ago

Please capture a terminal recording:

*** Finished recording to /var/tmp/wezterm-recording-sF6B3u.cast.txt

The file is an asciicast (compatible with https://asciinema.org/) and can also be replayed using wezterm replay.

The terminal recording allows me to replicate what is being sent to the terminal without requiring me to install the same applications as you and replicate your configuration for everything.

sgoudham commented 2 years ago

Apologies! I didn't realise that command existed. I didn't have time today but will get this around to you when I can 👍

Thanks for the speedy response!

sgoudham commented 2 years ago

So I have been testing more and more with this issue, and I don't think the problem is with starship integrating with wezterm I was able to reproduce behaviour while customising my oh-my-posh prompt today which leads me to believe that it's not limited to one type of prompt.

I'm finding this issue hard to debug and record as the behaviour almost seems non-deterministic.

github-actions[bot] commented 1 year ago

This issue has been automatically closed because there has been no response to our request for more information from the original author. With only the information that is currently in the issue, we don't have enough information to take action. Please reach out if you have or find the answers we need so that we can investigate further.

github-actions[bot] commented 1 year ago

I'm going to lock this issue because it has been closed for 30 days ⏳. This helps our maintainers find and focus on the active issues. If you have found a problem that seems similar to this, please open a new issue and complete the issue template so we can capture all the details necessary to investigate further.