[Resolved] Missing path and git branch from embedded Terminal (PyCharm Pro 2018.3.2)

Resolved: see comments


I am on macOS 10.14.2, with an activated PyCharm Pro installation. Python 3.6.5 installed via Homebrew. (I need that specific version)

I'm not sure whether there has been a change recently or whether I have done something silly (probably!), but before I stopped working for the Christmas break last year, my embedded PyCharm Terminal showed the virtual env at the start of the embedded Terminal prompt, then the user, then the path, then finally the git branch at the end of the prompt.

From memory, something like this:

(venv2) jean-yves@mac0001:/path/to/app (feature-1234)$

Coming back to work on this Mac today, I still have the virtual env name, but the user, path and git branch is missing.  Also, git autocompletion no longer works.

I just get something like this:

(venv2) bash-3.2$

The PyCharm git version is still shown correctly in the bottom right hand corner of the IDE, and when I open a standard Mac Terminal, I also get the git branch, as I have ~/.bash_profile set to show it:

source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-completion.bash

source /Applications/Xcode.app/Contents/Developer/usr/share/git-core/git-prompt.sh


export PS1='\u@\h:\w$(__git_ps1)$ '

So - should PyCharm be reading off this .bash_profile file, and if not is there a setting somewhere in PyCharm for me to display the info as it used to?

Is this a new bug or have I done something daft, as I suspect is more likely? :)

Comment actions Permalink

Same thing is happening to me

Comment actions Permalink

I'm encountering the same issue under OSX 10.13.6

I was able to "fix" this issue by updating the Shell path value to indicate a login shell should be used by adding the -l (lowercase L) option to the bash call under the Tools | Terminal  preference setting in PyCharm.

PyCharm | Preferences | Tools | Terminal

Shell path /bin/bash -l

Comment actions Permalink

Thanks, works a charm :)

Comment actions Permalink

Thank you! It works on me!


Please sign in to leave a comment.