Fix repository status in prompt

This commit is contained in:
Andrey Grigorev 2021-04-22 08:56:33 +00:00
parent 16da917cbb
commit 9e0a918635

View file

@ -1,5 +1,5 @@
# Include the current git branch in the prompt
if type __git_ps1 &>/dev/null; then
export PS1="$(echo -n "$PS1" | sed "s|\\\W\]|\\\W\$(type __git_ps1 \&>/dev/null \&\& __git_ps1 \" (%s)\")\]|")"
export PS1="$(echo -n "$PS1" | sed "s| \\\w| \\\w\$(type __git_ps1 \&>/dev/null \&\& __git_ps1 \" (%s)\")|")"
fi