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.54k stars 379 forks source link

Warp and oh-my-zsh on MacOS is not allowing git commands or changing directories to work #4148

Open dheerajchand opened 10 months ago

dheerajchand commented 10 months ago

Discord username (optional)

No response

Describe the bug

  1. Picture 1 shows zsh loading.
  2. Picture 2 shows git status hanging.

Essentially, simple commands like cd ~ and git status are not working. I do not know why.

Screenshot 2024-02-06 at 3 35 07 PM Screenshot 2024-02-06 at 11 49 32 AM

I am including my .zshrc with certain variables blacked out.

# Path to your oh-my-zsh configuration.
export ZSH=$HOME/.dotfiles/oh-my-zsh
# if you want to use this, change your non-ascii font to Droid Sans Mono for Awesome
# POWERLEVEL9K_MODE='awesome-patched'
export ZSH_THEME="powerlevel9k/powerlevel9k"
# export ZSH_THEME="agnoster"
POWERLEVEL9K_SHORTEN_DIR_LENGTH=2
# https://github.com/bhilburn/powerlevel9k#customizing-prompt-segments
# https://github.com/bhilburn/powerlevel9k/wiki/Stylizing-Your-Prompt
POWERLEVEL9K_LEFT_PROMPT_ELEMENTS=(dir nvm vcs)
POWERLEVEL9K_RIGHT_PROMPT_ELEMENTS=(status history time)
# colorcode test
# for code ({000..255}) print -P -- "$code: %F{$code}This is how your text would look like%f"
POWERLEVEL9K_NVM_FOREGROUND='000'
POWERLEVEL9K_NVM_BACKGROUND='072'
POWERLEVEL9K_SHOW_CHANGESET=true
#export ZSH_THEME="random"

# Set to this to use case-sensitive completion
export CASE_SENSITIVE="true"

# disable weekly auto-update checks
# export DISABLE_AUTO_UPDATE="true"

# disable colors in ls
# export DISABLE_LS_COLORS="true"

# disable autosetting terminal title.
export DISABLE_AUTO_TITLE="true"

# Which plugins would you like to load? (plugins can be found in ~/.dotfiles/oh-my-zsh/plugins/*)
# Example format: plugins=(rails git textmate ruby lighthouse)
plugins=(colorize compleat dirpersist autojump git gulp history cp)

source $ZSH/oh-my-zsh.sh

source /usr/local/opt/nvm/nvm.sh --no-use

autoload -U add-zsh-hook
load-nvmrc() {
  if [[ -f .nvmrc && -r .nvmrc ]]; then
    nvm use &> /dev/null
  else
    nvm use stable
  fi
}
add-zsh-hook chpwd load-nvmrc
load-nvmrc

# Customize to your needs...
unsetopt correct

# run fortune on new terminal :)
fortune

# Python things
# Pipenv and PyEnv
# https://wilsonmar.github.io/pyenv/

# Set it so ~/.pyenv provides Python before others of the same name:

export PYENV_ROOT=$(pyenv root)
export PATH="$PYENV_ROOT/shims:$PATH"

# https://www.rootstrap.com/blog/how-to-manage-your-python-projects-with-pipenv-pyenv/

if command -v pyenv 1>/dev/null 2>&1; then
  eval "$(pyenv init -)"
fi

# getting poetry set up
export PATH=”$HOME/.poetry/bin:$PATH”

# upgrade all packages with pip
# https://dougie.io/answers/pip-update-all-packages/

alias pip-upgrade-venv="pip freeze | cut -d'=' -f1 | xargs -n1 pip install -U"

# General Mac things

# Show hidden files
# https://www.macworld.co.uk/how-to/show-hidden-files-mac-3520878/

defaults write com.apple.Finder AppleShowAllFiles true
killall Finder

# Useful paths

export SPATIAL="/Users/dheerajchand/Documents/Professional/Siege_Analytics/Spatial_Data/census_fetcher"
export JAZZ_EXPERIMENTS="/Users/dheerajchand/Documents/Personal/Music/experiments/python_jazz_guitar_experiments"
export SOCIAL="/Users/dheerajchand/Documents/Professional/Siege_Analytics/Code/socialwarehouse"

# ZSHRC things
# handle updates https://github.com/ohmyzsh/ohmyzsh/issues/10778#issuecomment-1074719012
cd "$ZSH" && git remote set-url origin "https://github.com/ohmyzsh/ohmyzsh.git" && omz update

# Useful Aliases

alias zshreboot="source ~/.zshrc"
alias zshconfig="atom ~/.zshrc"
alias startpyspark="$SPARK_HOME/bin/pyspark -c spark.driver.bindAddress=localhost"
alias startspark="$SPARK_HOME/bin/spark-shell -c spark.driver.bindAddress=localhost"

# Ephemera

cd $SPATIAL

# Exports

export CENSUS_API_KEY="SOMETHING_NOT_HERE"

# SDKMAN
# https://github.com/sdkman/homebrew-tap
export SDKMAN_DIR=$(brew --prefix sdkman-cli)/libexec
[[ -s "${SDKMAN_DIR}/bin/sdkman-init.sh" ]] && source "${SDKMAN_DIR}/bin/sdkman-init.sh"
[ -f ~/.fzf.zsh ] && source ~/.fzf.zsh

# Spark
export SPARK_HOME="/Users/dheerajchand/spark/spark-3.5.0-bin-hadoop3-scala2.13"
# export PYTHONPATH=$(ZIPS=("$SPARK_HOME"/python/lib/.zip); IFS=:; echo "${ZIPS[]}"):$PYTHONPATH

To reproduce

  1. Install Warp from website
  2. Install oh-my-zsh from Automatic's Dotfiles
  3. Try to change directories or issue git status on path.

Expected behavior

I expect to be able to change directories and to be able to issue git commands with returned results.

Screenshots

No response

Operating system

MacOS

Operating system and version

Sonoma 14.2.1

Shell Version

zsh 5.9 (x86_64-apple-darwin21.3.0)

Current Warp version

v0.2024.01.30.16.52.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?

Yes, this issue prevents me from using Warp daily.

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 9 months ago

hey @dheerajchand sorry to hear about this blocker. From what I understand, powerlevel9k prompt isn't supported so that may be causing the issue. Please install powerlevel10k from the method described in our docs and let us know that helps with the issues. https://docs.warp.dev/appearance/prompt#powerlevel10k

From what I know the configuration files should be backwards compatible and work with p10k.

dheerajchand commented 9 months ago

10K works!