Skip to content

Instantly share code, notes, and snippets.

@beli-sk
Created August 2, 2021 21:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save beli-sk/2340519b3372d41554ec36bea527d456 to your computer and use it in GitHub Desktop.
Save beli-sk/2340519b3372d41554ec36bea527d456 to your computer and use it in GitHub Desktop.
git prompt on Gentoo
# /etc/bash/bashrc.d/git-prompt.sh
. /usr/share/git/git-prompt.sh
export GIT_PS1_SHOWDIRTYSTATE=1
if ${use_color} ; then
PS1=`echo "$PS1" | sed -r 's| \\\\\\$|\\\[\\\\033[01;31m\\\]$(__git_ps1)\\\[\\\\033[01;34m\\\] \\\\$|'`
else
PS1=`echo "$PS1" | sed -r 's| \\\\\\$|$(__git_ps1) \\\\$|'`
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment