prezto prompt shows ~RVM_PROJECT_PATH instead of current working directory

365 views Asked by At

I installed prezto following this guide: http://codurance.com/2015/03/16/installing-zprezto-a-quick-guide/

If I start in a regular folder that's not in git, I see the current working directory as expected in the prompt.

~/Documents/projects/

As soon as I change to directory that's managed in git, the prompt changes to:

~RVM_PROJECT_PATH [feature/awesome]

where feature/awesome is my branch name.

No matter which prompt I configure to use, as soon as I navigate to a git repo, RVM_PROJECT_PATH shows up. How do I fix this?

2

There are 2 answers

2
Rohanthewiz On

Put this in your ~/.zshrc

unsetopt auto_name_dirs

Thanks to mcornella in this response: https://github.com/rvm/rvm/issues/3091#issuecomment-60083194

Tested in zsh 5.2 (x86_64-unknown-linux-gnu)

0
ZedTuX On

I was having this issue too and I was having an old version of prezto. Updating prezto (cd to ~/.zprezto && git pull && git submodule update --init --recursive) solved the issue thanks to this update in the ~/.zprezto/modules/ruby/init.zsh:

# Load RVM into the shell session.
if [[ -s "$HOME/.rvm/scripts/rvm" ]]; then
  # Unset AUTO_NAME_DIRS since auto adding variable-stored paths to ~ list
  # conflicts with RVM.
  unsetopt AUTO_NAME_DIRS

  # Source RVM.
  source "$HOME/.rvm/scripts/rvm"

  ...

# Prepend local gems bin directories to PATH.
else
  path=($HOME/.gem/ruby/*/bin(N) $path)
fi