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.29k stars 371 forks source link

two line propt #4338

Closed twodogsdave closed 2 months ago

twodogsdave commented 8 months ago

Discord username (optional)

No response

Describe the bug

Two line prompt doest look right. Warp took the major parts and made it one line.

To reproduce

This is my prompt.. (I'm on Arch, not Kali, btw)

The following block is surrounded by two delimiters.

These delimiters must not be modified. Thanks.

START KALI CONFIG VARIABLES

PROMPT_ALTERNATIVE=twoline NEWLINE_BEFORE_PROMPT=yes

STOP KALI CONFIG VARIABLES

if [ "$color_prompt" = yes ]; then

override default virtualenv indicator in prompt

VIRTUAL_ENV_DISABLE_PROMPT=1

prompt_color='\[\033[;32m\]'
info_color='\[\033[1;34m\]'
prompt_symbol=@
if [ "$EUID" -eq 0 ]; then # Change prompt colors for root user
    prompt_color='\[\033[;94m\]'
    info_color='\[\033[1;31m\]'
    # Skull emoji for root terminal
    prompt_symbol=💀
fi
case "$PROMPT_ALTERNATIVE" in
    twoline)
        PS1=$prompt_color'┌──${arch_chroot:+($arch_chroot)──}${VIRTUAL_ENV:+(\[\033[0;1m\]$(basename $VIRTUAL_ENV)'$prompt_color')}('$info_color'\u'$prompt_symbol'\h'$prompt_color')-[\[\033[0;1m\]\w'$prompt_color']\n'$prompt_color'└─'$info_color'\$\[\033[0m\] ';;
    oneline)
        PS1='${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV)) }${arch_chroot:+($arch_chroot)}'$info_color'\u@\h\[\033[00m\]:'$prompt_color'\[\033[01m\]\w\[\033[00m\]\$ ';;
    backtrack)
        PS1='${VIRTUAL_ENV:+($(basename $VIRTUAL_ENV)) }${arch_chroot:+($arch_chroot)}\[\033[01;31m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ ';;
esac
unset prompt_color
unset info_color
unset prompt_symbol

else PS1='${arch_chroot:+($arch_chroot)}\u@\h:\w\$ ' fi

Expected behavior

┌──(dave@archcraft)-[~] └─$

Screenshots

Screenshot_2024-02-25-22-23-12_1920x1080

Operating system

Linux

Operating system and version

Linux archcraft 6.7.6-zen1-1-zen

Shell Version

GNU bash, version 5.2.26(1)-release1

Current Warp version

v0.2024.02.20.08.01.stable_02

Regression

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

Recent working Warp date

na, first time user

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

Advait-M commented 6 months ago

Hey there! I believe #2304 will help resolve this issue - please follow along there for updates (I'm actively working on it)!

Advait-M commented 2 months ago

I believe this is fixed with the release of Same Line Prompt 😄 - check out https://github.com/warpdotdev/Warp/issues/2304#issuecomment-2223352668 for details. Closing out this issue!