Skip to content

Commit

Permalink
bashrc
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Jasina committed Sep 25, 2018
1 parent 41c3d78 commit cd4a587
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion .bashrc
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
parse_git_branch(){
git branch 2> /dev/null | sed -e '/^[^*]/d' -e 's/* \(.*\)/(\1)/'
}

# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
Expand Down Expand Up @@ -57,7 +61,7 @@ if [ -n "$force_color_prompt" ]; then
fi

if [ "$color_prompt" = yes ]; then
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[00m\]\$ '
PS1='${debian_chroot:+($debian_chroot)}\[\033[01;32m\]\u@\h\[\033[00m\]:\[\033[01;34m\]\w\[\033[01;32m\] $(parse_git_branch)\[\033[00m\]\$ '
else
PS1='${debian_chroot:+($debian_chroot)}\u@\h:\w\$ '
fi
Expand Down

0 comments on commit cd4a587

Please sign in to comment.