Cool Guy Yo
Cool Guy Yo

Reputation: 6110

"__git ps1: command not found" from bashrc

When I try and go to the .ssh directory with cd ~/.ssh it correctly navigates to that directory but I get a __git ps1: command not found. Not sure why this is happening and how to resolve the issue.

here is my bashrc file

#Git tab completion
source ~/git-completion.bash
# Show branch in status line
PS1='[\W$(__git_ps1 " (%s)")]\$ '
export PROMPT_COMMAND='echo -ne "\033]0;${PWD/#$HOME/~}\007"'

Upvotes: 3

Views: 1401

Answers (1)

Wes Hardaker
Wes Hardaker

Reputation: 22252

The problem is that your prompt contains the __git_ps1 function call, but it isn't defined. Newer versions of the git-completion file define this function but it's not in your copy. EG, on Fedora, its defined in /etc/bash_completion.d/git

Upvotes: 5

Related Questions