This is what I came up with. Thanks for this post Vlastimil.
blu='\[\033[01;34m\]'pur='\[\033[01;35m\]'blu='\[\033[01;36m\]'wht='\[\033[01;37m\]'ylw='\[\033[01;33m\]'grn='\[\033[01;32m\]'red='\[\033[01;31m\]'blk='\[\033[01;30m\]'clr='\[\033[01;00m\]'# Run git branch if there is a .git directory present.# Display current status of the git repository.function git_branch(){if[-d .git ];then
GITSTATUS=$(git status | awk'
/^Changes not staged/{printf("+")}
/^Untracked files/{printf("*")}
/^Changes not staged/{printf("?")}
/^Your branch is ahead of/{printf("^")}')printf"%s""($(git branch 2> /dev/null | awk'/\*/{print $2}'))${GITSTATUS}";fi}PS1='${debian_chroot:+($debian_chroot)}'${blu}'$(git_branch)'${pur}' \W'${grn}' \$ '${clr}
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Thank you for this, I have just updated my bashrc from this:
to this:
Could you possibly share the color/syntax styling ? :P
Check my dotfiles: github.com/mmphego/dot-files
This is what I came up with. Thanks for this post Vlastimil.