--- profile.mingw	Sun Jul 12 03:34:34 2009
+++ profile	Thu Jun 10 18:54:31 2010
@@ -5,6 +5,7 @@
 #         File:	profile
 #  Description:	Shell environment initialization script
 # Last Revised:	2002.05.04
+#     Modified:	2010.06.10 merge with msysgit by felidlabo
 
 if [ -z "$MSYSTEM" ]; then
   MSYSTEM=MINGW32
@@ -37,10 +38,23 @@
   cp /etc/inputrc.default "$HOME"/.inputrc
 fi
 
+# from msysgit
+export PATH="$PATH"
+export GNUPGHOME=~/.gnupg
+# end
+
 if [ "x$HISTFILE" == "x/.bash_history" ]; then
   HISTFILE=$HOME/.bash_history
 fi
 
+# from msysgit
+if [ -e ~/.inputrc ]; then
+    export INPUTRC=~/.inputrc
+else
+    export INPUTRC=/etc/inputrc
+fi
+# end
+
 export HOME LOGNAME MSYSTEM HISTFILE
 
 for i in /etc/profile.d/*.sh ; do
@@ -50,10 +64,31 @@
 done
 
 export MAKE_MODE=unix
-export PS1='\[\033]0;$MSYSTEM:\w\007
-\033[32m\]\u@\h \[\033[33m\w\033[0m\]
+
+# from msysgit
+. /etc/git-completion.bash
+PS1='\[\033]0;$MSYSTEM:\w\007
+\033[32m\]\u@\h \[\033[33m\w$(__git_ps1)\033[0m\]
 $ '
 
+# set default options for 'less'
+export LESS=-FRSX
+# set default protocol for 'plink'
+export PLINK_PROTOCOL=ssh
+
+# read user-specific settings, possibly overriding anything above
+if [ -e ~/.bashrc ]; then
+    . ~/.bashrc
+elif [ -e ~/.bash_profile ]; then
+    . ~/.bash_profile
+elif [ -e /etc/bash_profile ]; then
+    . /etc/bash_profile
+fi
+# original msys's
+#export PS1='\[\033]0;$MSYSTEM:\w\007
+#\033[32m\]\u@\h \[\033[33m\w\033[0m\]
+#$ '
+
 alias clear=clsb
 
 cd "$HOME"
