Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

3
  • 2
    This dis the trick! and if you don't care about the user@username: stuff you can just remove everything before that exact : , like so export PS1='\[\033[01;34m\]\w\[\033[00m\]$(__git_ps1 "(%s)")\$ ' This response should be the selected! Commented Jan 22, 2023 at 20:51
  • 1
    I do get "__git_ps1(%s): command not found". Commented Sep 13, 2023 at 9:18
  • For me, it appears it's defined by /etc/bash_completion.d/git-prompt which calls /usr/lib/git-core/git-sh-prompt Commented Jul 5, 2024 at 7:47