Re: bash: igncr shell option breaks my PS1 prompt

2016-08-27 Thread Andrey Repin
Greetings, Gene Pavlovsky! > # PS1='\e[1;30m\D{%T}\e[m$(test \j -ne 0 && echo "\e[1;37mj:\j\e[m")${STY:+ > \e[1;32m${STY%%.*}\e[m} \e[1;33m\w\e[m\n# ' > 14:32:22 /usr/local/bin > # set -o igncr > bash: command substitution: line 1: syntax error near unexpected token `)' > bash: command substituti

Re: bash: igncr shell option breaks my PS1 prompt

2016-08-28 Thread Gene Pavlovsky
Re-posting a reply I got from Henri (aka Houder) hou...@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 (

Re: bash: igncr shell option breaks my PS1 prompt

2016-08-29 Thread Eric Blake
On 08/28/2016 03:20 PM, Gene Pavlovsky wrote: > Re-posting a reply I got from Henri (aka Houder) hou...@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 o

Re: bash: igncr shell option breaks my PS1 prompt

2016-08-29 Thread Andrey Repin
Greetings, Eric Blake! > But it seems like \n handling in PS1 is independent of any change in > handing in the 'read' builtin. As evidence, I ran the following test > using the older bash-4.3.42-4 build: > $ bash-4.3.42-4 > $ set -o igncr > $ PS1='$(date)\n# ' > bash: command substitution: line

Re: bash: igncr shell option breaks my PS1 prompt

2016-08-30 Thread Houder
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) hou...@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

RE: bash: igncr shell option breaks my PS1 prompt

2016-08-30 Thread Nellis, Kenneth
From: Andrey Repin > > Greetings, Eric Blake! > > > But it seems like \n handling in PS1 is independent of any change in > > handing in the 'read' builtin. As evidence, I ran the following test > > using the older bash-4.3.42-4 build: > > > $ bash-4.3.42-4 > > $ set -o igncr > > $ PS1='$(date)

Re: bash: igncr shell option breaks my PS1 prompt

2016-08-30 Thread Eric Blake
On 08/30/2016 02:49 AM, Houder wrote: > ... uhm ... what about the explanation in the help? > > -o option-name > Set the variable corresponding to option-name: > ... > igncron cygwin, ignore \r in line endings >^^^

RE: bash: igncr shell option breaks my PS1 prompt

2016-08-30 Thread Houder
On 2016-08-30 15:34, Nellis, Kenneth wrote: [snip] But, get this: $ PS1='$(date)\n\$ ' Tue Aug 30 09:30:37 EDT 2016 $ set -o igncr -bash: command substitution: line 1: syntax error near unexpected token `)' -bash: command substitution: line 1: `date)' $ PS1='`date`\n\$ ' Tue Aug 30 09:31:01

Re: bash: igncr shell option breaks my PS1 prompt

2016-08-30 Thread Houder
On 2016-08-30 15:40, Eric Blake wrote: On 08/30/2016 02:49 AM, Houder wrote: ... uhm ... what about the explanation in the help? -o option-name Set the variable corresponding to option-name: ... igncron cygwin, ignore \r in line endings

Re: bash: igncr shell option breaks my PS1 prompt

2016-09-02 Thread Gene Pavlovsky
Dear Eric Blake, I understand there were issues with read handling of \r. But is the resulting solution/bugfix ideal? Or does it introduce new problems? Basically, I don't want to set `igncr` as system-wide shell option (e.g. through SHELLOPTS). I want to require scripts to use LF newlines - if t

Re: bash: igncr shell option breaks my PS1 prompt

2016-09-02 Thread Eric Blake
On 09/02/2016 06:52 AM, Gene Pavlovsky wrote: > Dear Eric Blake, > > I understand there were issues with read handling of \r. But is the > resulting solution/bugfix ideal? Yes. The recent change to 'read' was a bugfix, and as far as I'm concerned, it is the ideal fix (you get binary behavior by

Re: bash: igncr shell option breaks my PS1 prompt

2016-09-04 Thread Gene Pavlovsky
On 2 September 2016 at 16:32, Eric Blake wrote: > On 09/02/2016 06:52 AM, Gene Pavlovsky wrote: >> Dear Eric Blake, >> >> Basically, I don't want to set `igncr` as system-wide shell option >> (e.g. through SHELLOPTS). > > Don't use it, then. I highly recommend avoiding 'igncr', because it > exist