多年来,我一直在终端上使用相同的 bash_profile,其中包括 posh-git。 https://github.com/lyze/posh-git-sh
但是,当我开始使用 Pycharm 时,编辑器的终端并没有呈现我的 posh-git,而是给了我错误:
bash: __git_ps1: command not found
这是我的 bash_profile:
source ~/develop/git-prompt.sh
PROMPT_COMMAND='__posh_git_ps1 "\u@\h:\w" "\\\$ ";'$PROMPT_COMMAND
PATH=$PATH:/usr/local/sbin
我尝试PS1="\u@\h:\w\n$ "
按照一些人的建议添加,但无济于事。
我怎样才能让我的 posh-git 在 pycharm 中工作并且没有这个错误?