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
21.39k stars 374 forks source link

Can't use my own shell prompt #2048

Closed azone closed 3 months ago

azone commented 2 years ago

Discord username (optional)

No response

Describe the bug

The shell prompt turns empty if I use my own prompt.

To Reproduce

  1. right click on prompt
  2. select "Use my own prompt"

Expected behaviour

No response

Screenshots

image image

prompt on iTerm

image

Operating System

No response

OS Version

12.6

Shell Version

fish, version 3.5.1

Warp Version

v0.2022.11.01.08.03.stable_00

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 commented 2 years ago

Hi @azone, Thanks for letting us know! We're sorry about this, this is not an ideal experience.

You can disable the part of your dotfiles ( custom 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 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 Compatible custom prompt tools: https://docs.warp.dev/features/prompt#custom-prompt-compatibility-table

azone commented 2 years ago

I'm using starship as my terminal prompt, here is the configuration of my starship.toml:

[cmd_duration]
show_milliseconds = true

[git_status]
ahead = "⇡${count}"
diverged = "⇕⇡${ahead_count}⇣${behind_count}"
behind = "⇣${count}"

[time]
disabled = false
format = "[$time]($style) "
time_format = "%T"
dannyneira commented 2 years ago

Thanks for the extra info, so I tried using the same config and had no issues on zsh, ( haven't tried fish, see my starship.toml and .zshrc and Warp prompt screenshots ). I also noticed in your screenshot you also have fig and fish, see more on known issues with the older version here ( you may need to disable fig as it can conflict with Warps autocompletion ): https://docs.warp.dev/help/known-issues#fish-and-fig

CleanShot 2022-11-07 at 15 59 55@2x CleanShot 2022-11-08 at 10 10 13

I recommend backup your fish config, then try with a completely clean fish config file with cp ~/.config/fish/config.fish ~/.config/fish/config.fish.backup ; echo 'starship init fish | source' > ~/.config/fish/config.fish ; source ~/.config/fish/config.fish and then enable the starship prompt config you sent me, if possible you may need to comment out some of the prompt components to narrow down which one is breaking the prompt.

dannyneira commented 1 year ago

@azone any comments/updates on the above observations?

azone commented 1 year ago

The almost same configuration, but different behavior between my Intel & M1 mac. Sorry, although Warp has many features and innovations, I'm still not used to using it in terms of some habits. Especially the auto-complete function of git and other commands.

e.g.: The autojump command:

image

The shell tips me to press <tab> to complete, but Wrap shows the other completions, Even if I press the <tab> key, nothing happened.

Here is the same situation on iTerm2:

image
dannyneira commented 7 months ago

Hey Folks, thanks for your patience, Warp does now support multi-line and right-side prompts https://docs.warp.dev/appearance/prompt#multi-line-and-right-sided-prompts

We're also working on same-line prompt support so that the input is in the same line with the prompt and tracking that here #2304

Advait-M commented 3 months ago

Hey folks - same line prompt has since been released, please see https://github.com/warpdotdev/Warp/issues/2304#issuecomment-2223352668 😄 . Closing out this issue!