This is the mail archive of the cygwin mailing list for the Cygwin project.

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: shopt igncr not working


"Daniel P. Kionka" wrote:

> I cannot track down every
> bash script and add "shopt -s igncr", and no one should ever have to.

Of course not.  That is a silly way to deal with the issue.  One of the
points of this whole conflagration is to get people to realize that if
they are dealing with files with CRLF line endings then they need to be
using textmode mounts.  If you do this then everything should work fine
without having to modify any scripts.

If anything it should be considered a good thing that these changes
alerted you to the fact that you were mixing binmode and CRLF line
endings, much like coal miners were happy when their canary died because
it signaled to them that they need to GTFO ASAP.

And even if textmode for some reason is not an option, you could have
used the BASH_ENV environtment variable as Eric pointed out in
<>.  This causes a
site-wide enabling of igncr without having to individually edit

> If a new version of a program is incompatible, it should be renamed as a
> new program, like baash (bourne again again shell).

It's not incompatible.  It just is not as tolerant of incorrect
operating parameters.  Don't interpret this as meaning "Cygwin doesn't
support CRLF", it means "Cygwin does not support CRLF when textmode is
not used".  By the way this was done because it resulted in a
significant performance increase in an area that has traditionally been
painfully slow in Cygwin, running large configure scripts.

> I am disappointed with the developer response.  They insist that the
> "right" solution is to remove CRs.  Cygwin is not just a project for
> Unix nerds anymore!  I love Unix, too, but I accept that Windows uses
> CR/LF.  Bash scripts are text files; you must be able to edit them with
> notepad, and when you check them into source control, they get checked
> out with CR/LF like all text files.

Again, "remove CRs" is one option but not the only one.  This is
precisely what textmode was designed for, and it should work fine when
used correctly.


Unsubscribe info:
Problem reports:

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]