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.26k stars 337 forks source link

Oh my bash and Warps Prompt are shown simultaneously #4883

Open NITHESH2303 opened 2 months ago

NITHESH2303 commented 2 months ago

Dupe Check

Describe the bug

image

Both prompts oh my bash and warps prompt are shown even If I turn of warps prompt this does not work, I don't want to remove oh my bash prompt, which I need in terminal

To reproduce

Install Oh my bash and open bash and make default terminal as bash

Expected behavior

Only one prompt must be shown each time

Screenshots

image

Operating system

MacOS

Operating system and version

Sonoma 14.4.1

Shell Version

bash

Current Warp version

v0.2024.04.30.08.02.stable_01

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

dannyneira commented 2 months ago

Hi @NITHESH2303 thanks for letting us know. Although oh-my-bash isn't specifically supported, it seems to be working on my end with a default install. I noticed the default configuration includes the time user and pwd, similar to your screenshot.

CleanShot 2024-05-07 at 14 25 19

I know in oh-my-zsh certain themes may cause issues, so it may be a similar case for oh-my-bash. If the issue persists, as a workaround please try one of our supported prompts and please share your ~/.bashrc and/or oh-my-bash configuration files so that we can try and reproduce this (please make sure to remove any important information you may have on there like IP, Keys, etc. if any).

dannyneira commented 1 month ago

@NITHESH2303 any luck with the above? My guess is that you normally have a custom prompt, theme, or bash/zsh/fish plugin and Warp is unable to parse it.

You can disable parts of your dotfiles just for Warp by using this conditional statement:

# Bash and Zsh
if [[ $TERM_PROGRAM != "WarpTerminal" ]]; then
# > What you want to disable here <
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

NITHESH2303 commented 1 month ago

Apology for my delayed response, Seems I missed some important emails, Here I have attached my bashrc, hope it helps, If you need further information, please let me know, Happy fixing.

My Bashrc

Enable the subsequent settings only in interactive sessions

case $- in i) ;; *) return;; esac

Path to your oh-my-bash installation.

export OSH='/Users/nithesh-pt7363/.oh-my-bash'

Set name of the theme to load. Optionally, if you set this to "random"

it'll load a random theme each time that oh-my-bash is loaded.

OSH_THEME="luan"

If you set OSH_THEME to "random", you can ignore themes you don't like.

OMB_THEME_RANDOM_IGNORED=("powerbash10k" "wanelo")

Uncomment the following line to use case-sensitive completion.

OMB_CASE_SENSITIVE="true"

Uncomment the following line to use hyphen-insensitive completion. Case

sensitive completion must be off. _ and - will be interchangeable.

OMB_HYPHEN_SENSITIVE="false"

Uncomment the following line to disable bi-weekly auto-update checks.

DISABLE_AUTO_UPDATE="true"

Uncomment the following line to change how often to auto-update (in days).

export UPDATE_OSH_DAYS=13

Uncomment the following line to disable colors in ls.

DISABLE_LS_COLORS="true"

Uncomment the following line to disable auto-setting terminal title.

DISABLE_AUTO_TITLE="true"

Uncomment the following line to enable command auto-correction.

ENABLE_CORRECTION="true"

Uncomment the following line to display red dots whilst waiting for completion.

COMPLETION_WAITING_DOTS="true"

Uncomment the following line if you want to disable marking untracked files

under VCS as dirty. This makes repository status check for large repositories

much, much faster.

DISABLE_UNTRACKED_FILES_DIRTY="true"

Uncomment the following line if you don't want the repository to be considered dirty

if there are untracked files.

SCM_GIT_DISABLE_UNTRACKED_DIRTY="true"

Uncomment the following line if you want to completely ignore the presence

of untracked files in the repository.

SCM_GIT_IGNORE_UNTRACKED="true"

Uncomment the following line if you want to change the command execution time

stamp shown in the history command output. One of the following values can

be used to specify the timestamp format.

* 'mm/dd/yyyy' # mm/dd/yyyy + time

* 'dd.mm.yyyy' # dd.mm.yyyy + time

* 'yyyy-mm-dd' # yyyy-mm-dd + time

* '[mm/dd/yyyy]' # [mm/dd/yyyy] + [time] with colors

* '[dd.mm.yyyy]' # [dd.mm.yyyy] + [time] with colors

* '[yyyy-mm-dd]' # [yyyy-mm-dd] + [time] with colors

If not set, the default value is 'yyyy-mm-dd'.

HIST_STAMPS='yyyy-mm-dd'

Uncomment the following line if you do not want OMB to overwrite the existing

aliases by the default OMB aliases defined in lib/*.sh

OMB_DEFAULT_ALIASES="check"

Would you like to use another custom folder than $OSH/custom?

OSH_CUSTOM=/path/to/new-custom-folder

To disable the uses of "sudo" by oh-my-bash, please set "false" to

this variable. The default behavior for the empty value is "true".

OMB_USE_SUDO=true

To enable/disable display of Python virtualenv and condaenv

OMB_PROMPT_SHOW_PYTHON_VENV=true # enable

OMB_PROMPT_SHOW_PYTHON_VENV=false # disable

Which completions would you like to load? (completions can be found in ~/.oh-my-bash/completions/*)

Custom completions may be added to ~/.oh-my-bash/custom/completions/

Example format: completions=(ssh git bundler gem pip pip3)

Add wisely, as too many completions slow down shell startup.

completions=( git composer ssh )

Which aliases would you like to load? (aliases can be found in ~/.oh-my-bash/aliases/*)

Custom aliases may be added to ~/.oh-my-bash/custom/aliases/

Example format: aliases=(vagrant composer git-avh)

Add wisely, as too many aliases slow down shell startup.

aliases=( general )

Which plugins would you like to load? (plugins can be found in ~/.oh-my-bash/plugins/*)

Custom plugins may be added to ~/.oh-my-bash/custom/plugins/

Example format: plugins=(rails git textmate ruby lighthouse)

Add wisely, as too many plugins slow down shell startup.

plugins=( git bashmarks )

Which plugins would you like to conditionally load? (plugins can be found in ~/.oh-my-bash/plugins/*)

Custom plugins may be added to ~/.oh-my-bash/custom/plugins/

Example format:

if [ "$DISPLAY" ] || [ "$SSH" ]; then

plugins+=(tmux-autoattach)

fi

source "$OSH"/oh-my-bash.sh

User configuration

export MANPATH="/usr/local/man:$MANPATH"

You may need to manually set your language environment

export LANG=en_US.UTF-8

Preferred editor for local and remote sessions

if [[ -n $SSH_CONNECTION ]]; then

export EDITOR='vim'

else

export EDITOR='mvim'

fi

Compilation flags

export ARCHFLAGS="-arch x86_64"

ssh

export SSH_KEY_PATH="~/.ssh/rsa_id"

Set personal aliases, overriding those provided by oh-my-bash libs,

plugins, and themes. Aliases can be placed here, though oh-my-bash

users are encouraged to define aliases within the OSH_CUSTOM folder.

For a full list of active aliases, run alias.

#

Example aliases

alias bashconfig="mate ~/.bashrc"

alias ohmybash="mate ~/.oh-my-bash"

enable bash completion

if [ -f /etc/bash_completion ]; then . /etc/bash_completion fi

cd map fzf

fcd() { local dir dir=$(find ${1:-.} -type d 2>/dev/null | fzf +m) && cd "$dir" }

autocompletion with fzf

_fcd() { local dirs dirs=$(find "${1:-.}" -type d 2>/dev/null) COMPREPLY=($(compgen -W "${dirs}" -- "${COMP_WORDS[COMP_CWORD]}")) } complete -o default -F _fcd fcd


Thanks & Regards Nithesh Kanna S

On Fri, May 24, 2024 at 4:07 AM Danny Neira @.***> wrote:

@NITHESH2303 https://github.com/NITHESH2303 any luck with the above? My guess is that you normally have a custom prompt, theme, or bash/zsh/fish plugin and Warp is unable to parse it. https://docs.warp.dev/features/prompt#custom-prompt-compatibility-table

You can disable parts of your dotfiles just for Warp by using this conditional statement:

Bash and Zshif [[ $TERM_PROGRAM != "WarpTerminal" ]]; then# > What you want to disable here <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

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