bash: igncr shell option breaks my PS1 prompt

Houder houder@xs4all.nl
Tue Aug 30 13:16:00 GMT 2016


On 2016-08-29 19:43, Eric Blake wrote:
> On 08/28/2016 03:20 PM, Gene Pavlovsky wrote:
>> Re-posting a reply I got from Henri (aka Houder) houder@xs4all.nl
>> His letter follows:
>> 
>> Hi Gene,
>> 
>> Reread your entry to the mailing list ...
>> 
>>> Apparently the latest bash in Cygwin modified the read builtin to use
>>> Cygwin-specific shell option igncr to control ignoring \r characters
>>> in the input (still not clear if that ignores \r\n sequences, or \r
>>> followed by anything else will be also ignored).
>> 
> 
> If the igncr shell option (currently Cygwin-specific, but Chet says 
> that
> he is amenable to reviewing it for upstream inclusion in 4.5 once 4.4 
> is
> released any day now) is enabled, then it eats ALL \r, regardless of
> context.  In other words, it ignores all carriage returns, as per the 
> name.

... uhm ... what about the explanation in the help?

64-@@ bash --version
GNU bash, version 4.3.46(6)-release (x86_64-unknown-cygwin)
...

64-@@ help set
set: set [-abefhkmnptuvxBCHP] [-o option-name] [--] [arg ...]
     Set or unset values of shell options and positional parameters.

     Change the value of shell attributes and positional parameters, or
     display the names and values of shell variables.

     Options:
       ...
       -o option-name
           Set the variable corresponding to option-name:
               ...
               igncr        on cygwin, ignore \r in line endings
                            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

... this help message should be 'upgraded', should it not?

igncr: removes ALL \r's from value (Cygwin) ?

Henri

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple



More information about the Cygwin mailing list