I am getting command not found from my bashrc

When I try to navigate to the .ssh directory using cd ~ / .ssh, it navigates to that directory correctly, but I get the __git ps1: not found command. Not sure why this is happening or how to fix the problem.

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"'



source to share

1 answer

The problem is that the prompt contains a function call __git_ps1

, but it is undefined. Newer versions of the git -completion file define this functionality, but it's not in your copy. EG, on Fedora, defined in/etc/bash_completion.d/git



All Articles