Bash command __git_ps1 not found

I am starting to try to set up the developer environment on my new Mac using the steps from this link: http://vanderveer.be/setting-up-my-perfect-developer-environment-on-osx-10-8-mountain-lion-10- 8-2-final-edition / .

After executing the files from git, my terminal window now shows:

rbenv: version `1.9.3-p194' not installed -bash: __git_ps1: command not found 

The first line shows only when I open a new terminal window, and the second shows every time I press return, regardless of what I enter into the terminal.

I read a lot of stackoverflow questions and tried to simulate their solutions to no avail. I think I was mistaken in installing the package from git, because I am not so experienced, and now I think that I may have messed up the settings, and I was also wondering if there is a way to return to the default settings for bash?

Thank you very much! Allen

+6
source share
1 answer

If you have not installed a newer version of Git on your Mac, start with this. You can download here: http://git-scm.com/download

After installing it, you must specify git-completion.sh and git-prompt.sh from ~/.profile (or ~ / .bashrc, if any):

 source /usr/local/git/contrib/completion/git-completion.bash source /usr/local/git/contrib/completion/git-prompt.sh 

This should fix the __git_ps1 error.

I'm not a hack, but the rbenv error comes from the fact that the dotfiles setting that you use is trying to set the default Ruby version to "1.9.3-p194". The rbenv tool is designed to create several different versions of Ruby, but you need to install them first. In your case, I think you need to run this:

 rbenv install 1.9.3-p194 

After that, the version will be available and you will no longer see a warning.

+13
source

Source: https://habr.com/ru/post/955333/


All Articles