Warp icon indicating copy to clipboard operation
Warp copied to clipboard

Newline added to end of PS1 prompt

Open MathewBlanc opened this issue 1 year ago • 0 comments

Discord username (optional)

No response

Describe the bug

I have my cursor inset from the side of the terminal window, following an emoji (makes it easier to see where commands are). In Warp, it looks like a newline is being added after my PS1, so the cursor is on a new line. I've tried compact mode, but no change.

This is what the prompt looks like in Alacritty (and Terminal, and VSCode terminal), note the cursor after the 🔶: image

This is what it looks like in Warp, with the cursor on the line below: Screenshot 2024-02-24 at 8 54 01 pm

This is the prompt config:

PROMPT=''$'\n''%B%F{white}· · · · · · · ·%b%f'$'\n'$'\n''%B%F{white}💎: %n%b%f'$'\n''%B%F{white}📁: %4~%b%f'$'\n''${()dir_status}'$'\n''%B%F{white} 🔶 %b%f'

To reproduce

  1. Use this prompt code to replace your current PS1 (tested):

PS1=''$'\n''%B%F{white}· · · · · · · ·%b%f'$'\n''%B%F{white} 🔶 %b%f' 2. The cursor should be on the line below where it's meant to be.

Expected behavior

The cursor should appear right after the end of the prompt, without a newline/carriage return.

Screenshots

No response

Operating system

MacOS

Operating system and version

Ventura 13.2.1

Shell Version

zsh 5.8.1

Current Warp version

v0.2024.02.13.08.02.stable_00

Regression

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

Recent working Warp date

No response

Additional context

No response

Does this block you from using Warp daily?

No

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:b9d78064-c89e-4973-b153-5178a31ee54e

None

MathewBlanc avatar Feb 24 '24 10:02 MathewBlanc