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.2k stars 333 forks source link

Invisible `Starship` prompt in `Fish` shell #3362

Open danulqua opened 11 months ago

danulqua commented 11 months ago

Discord username (optional)

danulqua

Describe the bug

I use Starship prompt with Fish shell, and I noticed that my prompt is totally invisible. It becomes visible if I enter new subshells using fish or zsh commands, and as soon as I exit from them to my main shell, it keeps being invisible.

Demo:

https://github.com/warpdotdev/Warp/assets/38916225/f7272d06-86c2-4fdc-ad7e-c95a72be3541

This problem exists in Warp terminal only. In any other terminal everything works fine. My Starship and Fish configurations are in the "Additional context" section.

To reproduce

  1. Set up the same environment (Starship and Fish)
  2. Go to Warp settings and turn Honor user's custom prompt (PS1) on, or right-click the prompt and select Use my own prompt
  3. Prompt becomes invisible
  4. Enter subshell using fish command
  5. Prompt in the subshell is visible
  6. Write exit to exit the subshell
  7. Prompt in main shell is still invisible

Expected behavior

Starship prompt obviously should be visible all the time.

Screenshots

CleanShot 2023-07-13 at 09 35 05@2x

CleanShot 2023-07-13 at 09 43 31@2x

Operating system

MacOS

Operating system and version

macOS Ventura 13.4.1

Shell Version

fish 3.6.1

Current Warp version

v0.2023.07.04.08.03.stable_02

Regression

No, this bug or issue has existed throughout my experience using Warp

Recent working Warp date

No response

Additional context

My starship.toml:

[aws]
style = "bold #FFCA80"

[character]
error_symbol = "[❯](bold #FF9580)"
success_symbol = "[❯](bold #8AFF80)"

[cmd_duration]
style = "bold #FFFF80"

[directory]
style = "bold #8AFF80"

[git_branch]
style = "bold #FF80BF"

[git_status]
style = "bold #FF9580"

[hostname]
style = "bold #9580FF"

[username]
format = "[$user]($style) on "
style_user = "bold #80FFEA"

My fish.config:

if status is-interactive
    # Commands to run in interactive sessions can go here
end

set -x PATH /opt/homebrew/bin $PATH
set -Ux HOMEBREW_CASK_OPTS "--no-quarantine"
set -Ux NULLCMD bat

# The Fuck
thefuck --alias | source

# Starship
starship init fish | source

Does this block you from using Warp daily?

Yes, this issue prevents me from using Warp daily.

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:b8107fdf-ba31-488d-b103-d271c89cac3e

None

dannyneira commented 11 months ago

Hey @danulqua thanks for submitting this detailed bug report! So sorry about this blocker. I tried but wasn't able to reproduce this issue, but I have a few things you can try to fix.

  1. Confirm your starship prompt is on the latest starship --version (1.15.0), it no the latest brew update starship and try again.

  2. run echo $SHELL and put the result into your Warp > Settings > Features > Sessions > Startup shell for new sessions > Custom (my example below) to see if that helps!

CleanShot 2023-07-13 at 14 51 02

  1. If none of the above works, As a possible stopgap measure, you can try using the default fish prompt and it should work.

  2. Please provide a redacted copy of the logs. https://docs.warp.dev/help/sending-us-feedback#exporting-logs-from-terminal

danulqua commented 11 months ago

@dannyneira I've updated my starship to version 1.15.0 and written a path to custom shell - nothing helped, my starship prompt is still invisible.

Of course I can use default prompt, that's what I do, but obviously it's a problem since starship should work and it always was my main prompt.

Here is the logs file: warp.log

dannyneira commented 11 months ago

Thanks for this, I'll let the team know. It's a bit challenging to reproduce on my end so for the time I recommend you try and comment out lines in your configs (fish and starship) to see if one is the culprit. I'd also try adding the following to your starship file to see if that helps. Thanks for your patience and working with us to try and debug.

[fill]
disabled = true

[line_break]
disabled = true
danulqua commented 11 months ago

@dannyneira thanks for suggesting me to play both with starship and fish configs. Adding these lines in starship.toml didn't help.

But I ended up commenting whole config.fish file, and it looks like that even the default fish prompt is invisible.

I changed my shell from fish to zsh in Warp settings (it has starship too), and it works fine.

Seems like it's a problem between fish and Warp.

dannyneira commented 11 months ago

Thanks for confirming and your patience, yeah we should support fish afaik your in the latest version so I'll let the team know and we'll post any further updates or questions on this thread.

tembra commented 6 months ago

Same problem here. But the issue is not with Starship neither with Fish itself.

I managed to get it working by renaming the 00_fig_pre.fish and 99_fig_post.fish files inside ~/.config/fish/conf.d/ directory. I only added an .old suffix to them.

So in my case the problem was with Fig, that is listed as an incompatible tool on Warp documentation.

hvckdev commented 5 months ago

Same problem here. But the issue is not with Starship neither with Fish itself.

I managed to get it working by renaming the 00_fig_pre.fish and 99_fig_post.fish files inside ~/.config/fish/conf.d/ directory. I only added an .old suffix to them.

So in my case the problem was with Fig, that is listed as an incompatible tool on Warp documentation.

fixed by executing this command (cw same as fig)

cw integrations uninstall all

consider uninstall only integrations, that affect warp shell prompt.

jonashelgemo commented 5 months ago

I had the same problem, did a

brew remove fig

and now everything works again 👍

MasaHirano commented 5 months ago

@tembra I was in the exactly same situation. Thank you so much for the hint!

txtyash commented 4 months ago

Facing the same issue but I don't even use fig.

txtyash commented 4 months ago

Also checked incompatible tool docs on warp and cofigured starship they way they said. I also removed fzf plugin for fish. I still face the same problem.