PhpStorm Terminal : bash: __git_ps1: command not found

Hello,

Using PhpStorm 2018.3.3 on Mac OSX 10.14.2 (through jetBrains Toolbox).

With no apparent reason I got the message "bash: __git_ps1: command not found"

I am using the very same configuration on a other Appel computer with no issue.

I looked around an tried some solution given one year ago but nothing is working for me.

How can I get back my path configuration?

Thanx for helping.

Kitcat711

0

Please attach a screenshot of the error + screenshot of Preferences | Tools | Terminal

0

Here are the screenshots you asked for.

Thanks for taking care of my problem.

 

0

Try to disable "Python Terminal" plugin.

0

Where do I do that: I tied to go to the plugin section but cannot find any "Python Terminal" there.

 

0

Sorry, posted this without checking on my end. There's indeed no python terminal in PhpStorm.

I'll check possible workarounds with a team & post here a solution once I have an update.

0

Michel, are you using any bash profile files (~/.profile, ~/.bash_profile and ~/.bashrc)? If you do - could you please share them?

0

Dimitri,

here are my configuration files (found a reference to python there):

Thanks for helping

Michel

---------------------------------

~/.profile :

alias php='/Applications/MAMP/bin/php/php7.1.22/bin/php -c "/Library/Application Support/appsolute/MAMP PRO/conf/php7.1.22.ini"'

alias pear='/Applications/MAMP/bin/php/php7.1.22/bin/pear'

alias pecl='/Applications/MAMP/bin/php/php7.1.22/bin/pecl'

---------------------------------

~/.bash_profile :

source ~/.profile

source /usr/local/etc/bash_completion.d/git-completion.bash

# Setting PATH for Python 2.7

# The original version is saved in .bash_profile.pysave

PATH="/Library/Frameworks/Python.framework/Versions/2.7/bin:${PATH}"

alias add='git add --all :/'

alias status='git status'

alias mbail='cd Sites/mbail'

alias dvl='git checkout development'

alias pushd='git push origin development'

alias stg='git checkout staging'

alias pushs='git push origin staging'

alias mst='git checkout master'

alias pushm='git push origin master'

alias gmd='git merge development'

export PATH

---------------------------------

~/.bashrc :

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

GIT_PS1_SHOWDIRTYSTATE=true

export PS1='[\u@mbp \w$(__git_ps1)]\$ '

 

 

1

It seems that it has something to do with Git Bash completion you installed. Did you install it from master?
Please try removing that and install it back using `brew install git bash-completion`, would it be better?

https://stackoverflow.com/a/12871094/8018879

1

Hello Eugene,

Sorry for the delay of answering.

Using your last answer, I managed this out this way:

brew install bash bash-completion git

curl -L https://raw.github.com/git/git/master/contrib/completion/git-prompt.sh > ~/.bash_git

vim ~/.bashrc

where I put:

source ~/.bash_git
export PS1='\[\033[01;32m\]os \[\033[01;34m\]\w $(__git_ps1 "[%s]")\$\[\033[00m\] '
export GIT_PS1_SHOWDIRTYSTATE=1
export GIT_PS1_SHOWUPSTREAM="auto"

It worked, although some my autocompletion seems not working : autocompletion of aliases I put in my ~/.bash_profile .

But the error message is now fixed.
Thank you again for this.

Michel

0

请先登录再写评论。