warp icon indicating copy to clipboard operation
warp copied to clipboard

SSH with custom prompt (PS1) returns "exit" prompt

Open wesleylether opened this issue 4 years ago • 8 comments

Describe the bug

When you change the feature to custom prompt (PS1), then when you ssh in a server the prompt wil always be 'exit'. See screenshots.

I use a custom prompt for color, git status information and have always the edit field on start of line.

This is my custom prompt:

PROMPT='${ret_status}%{$fg[white]%}%n%{$fg[magenta]%}@%{$fg[cyan]%}%M%{$fg[white]%}: %{$fg[magenta]%}%~%{$reset_color%} $(git_prompt_info)
%{$fg[red]%}%{$reset_color%}'

To Reproduce

Steps to reproduce:

  1. Go to settings and go to features
  2. Enable "Honor user's custom prompt (PS1) setting"
  3. Open new warp window and ssh in a server
  4. See prompt returning 'exit'

Expected behavior

In the images I have a screenshot without my custom prompt, and then it shows it correctly

Screenshots

When I have custom prompt disabled: default prompt

And when I have a custom prompt enabled: custom prompt

Operating System

MacOS

OS Version

12.1

wesleylether avatar Mar 08 '22 20:03 wesleylether

You can fix temporarily this by disabling PS1 feature in the setting. Please check the screenshot.

Screenshot 2022-03-11 at 14 00 04

hhemied avatar Mar 11 '22 13:03 hhemied

@wesleylether Hey Wesley, we just pushed out a new release yesterday containing a lot of SSH fixes, including some for custom prompts - are you still running into this issue (when the PS1 feature is enabled)?

vorporeal avatar Mar 25 '22 14:03 vorporeal

@vorporeal I have updated to the latest version, and tried again. Sadly to say, but I have still the exit problem with my custom prompt.

wesleylether avatar Mar 25 '22 20:03 wesleylether

@wesleylether That's unfortunate; would you mind sharing your .zshrc (and any other relevant shell startup files) with me? If you don't feel comfortable sharing it here, you can email it to me at [email protected] (and absolutely remove any sensitive information/secrets)

vorporeal avatar Mar 25 '22 20:03 vorporeal

@vorporeal Done! Send you an email 👍🏽

wesleylether avatar Mar 25 '22 21:03 wesleylether

@vorporeal after the updates until now the exit message is gone, but I don't see the PS1 form the server. Wanted you to know 👍🏽

wesleylether avatar Apr 08 '22 07:04 wesleylether

Thanks for the update! We think we figured out what's going wrong; the prospective fix is going out in this week's release. I'll let you know when it's live. :)

On Fri, Apr 8, 2022 at 3:03 AM Wesley Lether @.***> wrote:

@vorporeal https://github.com/vorporeal after the updates until now the exit message is gone, but I don't see the PS1 form the server. Wanted you to know 👍🏽

— Reply to this email directly, view it on GitHub https://github.com/warpdotdev/Warp/issues/793#issuecomment-1092509990, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABTR6QRIF5K3W5TGHFGGX3VD7K5BANCNFSM5QHNRIDQ . You are receiving this because you were mentioned.Message ID: @.***>

vorporeal avatar Apr 11 '22 15:04 vorporeal

Fix is out! v0.2022.04.11.09.09.stable_02

elviskahoro avatar Apr 16 '22 17:04 elviskahoro