Error handling for git prompt
This commit is contained in:
parent
4eb338bc82
commit
2c8ed2d6a2
4
.bashrc
4
.bashrc
|
@ -37,10 +37,10 @@ PATH="${PATH}:/nfs/homes/tischmid/.local/bin"
|
|||
|
||||
GIT_PROMPT="1"
|
||||
if [ ! -f ~/git-prompt.sh ] && [ "${GIT_PROMPT}" = "1" ] ; then
|
||||
curl --silent --location 'https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh' -o "/nfs/homes/tischmid/git-prompt.sh"
|
||||
curl --silent --location 'https://raw.githubusercontent.com/git/git/master/contrib/completion/git-prompt.sh' -o "~/git-prompt.sh"
|
||||
fi
|
||||
|
||||
if [ "${GIT_PROMPT}" = "1" ] ; then
|
||||
if [ ! -f ~/git-prompt.sh ] && [ "${GIT_PROMPT}" = "1" ] ; then
|
||||
. ~/git-prompt.sh
|
||||
export GIT_PS1_SHOWDIRTYSTATE=1
|
||||
PS1='\[\033[31m\]\u\[\033[m\]@\[\033[32m\]\h\[\033[m\] \[\033[33m\][\w]\[\033[m\]\[\033[36m\]$(__git_ps1 " (%s)")\[\033[m\]\n\[\033[35m\]~>\[\033[m\] '
|
||||
|
|
Loading…
Reference in New Issue