(Mac) -bash: __git_ps1: command not found

后端 未结 19 2057
感动是毒
感动是毒 2020-11-30 16:20

I\'m trying to change my command promt in terminal. I keep getting the error:

-bash: __git_ps1: command not found

I\'ve tried it just by typing

19条回答
  •  旧时难觅i
    2020-11-30 17:03

    this works in OS 10.8 in the .bash_profile

    if [ -f ~/.git-prompt.sh ]; then
      source ~/.git-prompt.sh
      export PS1='YOURNAME[\W]$(__git_ps1 "(%s)"): '
    fi
    

提交回复
热议问题