Skip to content

Commit

Permalink
Added informative prompt.
Browse files Browse the repository at this point in the history
Vijay committed Aug 17, 2017
1 parent ed1e511 commit 2e452ed
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions bashrc
Original file line number Diff line number Diff line change
@@ -4,5 +4,17 @@ alias cp='cp -iv'
alias mv='mv -iv'
alias rm='rm -iv'

gitinfo() {
BRANCH=`git branch 2>/dev/null | sed -s -e 's/^* //g'`
if [ "${BRANCH}" = "" ]
## if [ -z $BRANCH ] ## This also works.
then
echo ""
else
echo "[branch: $BRANCH]"
fi
}

export PS1='\u@\h [jobs: \j]$(gitinfo): \w\n\$ '
export VROOT=$HOME/VROOT
export PATH=$PATH:$VROOT/bin

0 comments on commit 2e452ed

Please sign in to comment.