Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug with spaceship prompt theme. #1973

Closed
namirinz opened this issue Oct 18, 2022 · 17 comments
Closed

Bug with spaceship prompt theme. #1973

namirinz opened this issue Oct 18, 2022 · 17 comments
Labels
Bugs Bugs, Hangs, Crash, and Freezes

Comments

@namirinz
Copy link

namirinz commented Oct 18, 2022

Discord username (optional)

No response

Describe the bug

It produce the prefix text from default spaceship-prompt theme

~
->

Screen.Recording.2565-10-18.at.15.19.19.mov

To Reproduce

  1. Start the warp terminal
  2. Bug appear

Expected behaviour

Test on default terminal app for Mac
image

Screenshots

No response

Operating System

MacOS

OS Version

12.6

Shell Version

zsh 5.8.1 (x86_64-apple-darwin21.0)

Warp Version

v0.2022.10.11.08.13.stable_01

Additional context

No response

Does this block you from using Warp daily?

Yes

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

No response

@dannyneira
Copy link
Member

dannyneira commented Oct 18, 2022

Hi @namirinz, Sorry to hear about this, although we generally support OMZ, we don't support multi or right-sided prompts at this time, which spaceship theme appears to have. Please see more here

Can you please confirm you're not using a multi/right-sided prompt if not, let us know your configuration so we can attempt to reproduce.

@danilopolani
Copy link

Same issue here. There's nothing special needed to reproduce it: just install Warp and the Spaceship theme for Oh My Zsh.
The only thing I can do right now is to disable Spaceship for Warp and use it in VSCode and somewhere else when needed:

if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
    ZSH_THEME="spaceship"
fi

@enavarrocu
Copy link

enavarrocu commented Oct 26, 2022

This was working in a previous version of spaceship I upgraded today to the version 4 of spaceship and started failing in warp.

Update: Looks like is a combination between spaceship and warp. If you set SPACESHIP_PROMPT_ASYNC=false it works fine.

@danilopolani
Copy link

This was working in a previous version of spaceship I upgraded today to the version 4 of spaceship and started failing in warp.

Update: Looks like is a combination between spaceship and warp. If you set SPACESHIP_PROMPT_ASYNC=false it works fine.

Can confirm that SPACESHIP_PROMPT_ASYNC=false works. Or, at least, it does not create a wrong output in the shell.
It still does not show the Spaceship data (e.g. current k8s environment), but that's okay I guess.

Standard terminal:

image

Warp:

image

@enavarrocu
Copy link

For me, it shows correctly. I'm not using k8s.

image

@danilopolani
Copy link

For me, it shows correctly. I'm not using k8s.

image

Oh right, I had to enable the Honor user's custom prompt (PS1) Feature flag, now it works perfectly, thank you!

@dannyneira
Copy link
Member

@namirinz are you still seeing this issue after recent updates?

@bfaulk96
Copy link

bfaulk96 commented Dec 6, 2022

@dannyneira I am seeing it with the most updated version

@dannyneira
Copy link
Member

dannyneira commented Dec 6, 2022

@namirinz @bfaulk96
Run echo "SPACESHIP_PROMPT_ASYNC=FALSE" >>! ~/.zshrc, then open a new Tab CMD-T and let us know if the issue persists.

@dannyneira
Copy link
Member

dannyneira commented Dec 6, 2022

Opened a bug report with the Spaceship team here to track this issue: spaceship-prompt/spaceship-prompt#1311

@bfaulk96
Copy link

@dannyneira that did indeed work, sorry for not reading the thread more completely before commenting!

@warpdotdev-devx warpdotdev-devx bot added the Bugs Bugs, Hangs, Crash, and Freezes label Jan 10, 2023
@maurelian
Copy link

Same issue, but the suggested fix does not work.
i.e. After adding SPACESHIP_PROMPT_ASYNC=FALSE to my .zshrc file and opening a new tab (with "honor custom prompt" enabled), I have a blank prompt.

Manually running source .zshrc again properly activates my prompt, but I'd rather not have to do this everytime I open a new tabl.

@dannyneira
Copy link
Member

dannyneira commented Feb 6, 2023

@maurelian I wonder if there is anything else in your rc file causing this. Opening new tabs/windows/panes should automatically "source" the .zshrc file. Please see: https://docs.warp.dev/help/known-issues#configuring-and-debugging-your-rc-files

@mrwolny
Copy link

mrwolny commented Feb 8, 2023

Hey @maurelian, try following this instructions to create spaceship config.

Adding SPACESHIP_PROMPT_ASYNC=FALSE in ~/.spaceshiprc.zsh fixed the issue for me.

@maurelian
Copy link

@mrwolny ty, I gave it a shot but no luck.

@dannyneira Thank you. I have definitely verified that:

  1. .zshrc is run on startup
  2. SPACESHIP_PROMPT_ASYNC=FALSE is set.
  3. manually running source ~/.zshrc fixes the prompt

image

So, it's really quite confusing to me. I'll try working through your debug instructions when I get a chance.

@dannyneira
Copy link
Member

dannyneira commented Feb 10, 2023

@maurelian Also make note of the following:
To activate Spaceship, add the following line to ~/.zshrc:

source "/opt/homebrew/opt/spaceship/spaceship.zsh"
SPACESHIP_PROMPT_ASYNC=FALSE  

If your .zshrc sets ZSH_THEME, remove that line and also make sure that that your echo $SHELL reads /bin/zsh

Here is my example below, installed with brew install spaceship, then set the following in my .zshrc file.

CleanShot 2023-02-10 at 09 48 55

@viandwi24
Copy link

viandwi24 commented Jul 1, 2023

For me, it shows correctly. I'm not using k8s.
image

Oh right, I had to enable the Honor user's custom prompt (PS1) Feature flag, now it works perfectly, thank you!

i follow your step and now is work, but look in yours why "arrow" in one line with spachips data. in me this right arrow keep in new line.

Screenshot 2023-07-02 at 04 31 59

[EDITED]
sorry, i had fixed this with litle tweak on spaceship vars in .zshrc :
Screenshot 2023-07-02 at 08 31 50

and now my warp terminal look like this :
Screenshot 2023-07-02 at 08 33 17

thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Bugs Bugs, Hangs, Crash, and Freezes
Projects
None yet
Development

No branches or pull requests

9 participants