If you are using a recent Cygwin (e.g. 1.7), you can also start both your .bashrc
and .bash_profile
with the following line, on the first non commented line:
# ~/.bashrc: executed by bash(1) for non-login shells.
# see /usr/share/doc/bash/examples/startup-files (in the package bash-doc)
# for examples
(set -o igncr) 2>/dev/null && set -o igncr; # this comment is needed
This will force bash to ignore carriage return (\r
) characters used in Windows line separators.
See http://cygwin.com/ml/cygwin-announce/2010-08/msg00015.html.