Skip to content

Commit

Permalink
fixed bash/prompt.bash for mingw
Browse files Browse the repository at this point in the history
  • Loading branch information
prabirshrestha committed Mar 5, 2012
1 parent 71377a3 commit e7ff663
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion bash/prompt.bash
@@ -1 +1,11 @@
export PS1="\n\[\033[38m\]\u@\h\[\033[01;34m\] \w \[\033[31m\]\`ruby -e \"print (%x{git branch 2> /dev/null}.grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1) ')\"\`\[\033[37m\]\n$\[\033[00m\] "
if [ -z "$MSYSTEM" ]; then
MSYSTEM=MINGW32
fi

if [ $MSYSTEM == MINGW32 ]; then
export PS1='\[\033]0;$MSYSTEM:\w\007
\033[32m\]\u@\h \[\033[33m\w$(__git_ps1)\033[0m\]
$ '
else
export PS1="\n\[\033[38m\]\u@\h\[\033[01;34m\] \w \[\033[31m\]\`ruby -e \"print (%x{git branch 2> /dev/null}.grep(/^\*/).first || '').gsub(/^\* (.+)$/, '(\1) ')\"\`\[\033[37m\]\n$\[\033[00m\] "
fi

0 comments on commit e7ff663

Please sign in to comment.