Created
January 29, 2020 17:43
-
-
Save vesh95/14bc353767e214ce7fdf62659692b115 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#показ ветки в командной строке | |
parse_git_branch() { | |
if ! git rev-parse --git-dir > /dev/null 2>&1; then | |
return 0 | |
fi | |
git_branch=$(git branch 2>/dev/null| sed -n '/^\*/s/^\* //p') | |
echo "$git_branch" | |
} | |
PS1="${debian_chroot:+($debian_chroot)}\e[01;94mbranch:[\$(parse_git_branch)]\e[00m \e[02;31;01mjobs:\j\e[00m \e[01;32m\w\e[00m\n$: " |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment