Re: bug with multiline strings parsing and single-quoted !

2014-12-06 Thread Linda Walsh
Greg Wooledge wrote: On Wed, Dec 03, 2014 at 06:51:08PM +0400, Gennady Kupava wrote: That was quite unexpected for me as a user. I checked sed script like this: echo "a b"| sed '/a/!d' And that implementation detail were highly unexpected... What is the point of multiline edits if quotes are

Re: bug with multiline strings parsing and single-quoted !

2014-12-03 Thread Greg Wooledge
On Wed, Dec 03, 2014 at 06:51:08PM +0400, Gennady Kupava wrote: > That was quite unexpected for me as a user. I checked sed script like this: > echo "a > b"| sed '/a/!d' > > And that implementation detail were highly unexpected... What is the point > of multiline edits if quotes are unreliable for

Re: bug with multiline strings parsing and single-quoted !

2014-12-03 Thread Gennady Kupava
>Bash has always performed history expansion a line at a time, as soon as >the line is read from the current input source. One consequence of this, >as you noted, is that it doesn't have access to the current quoting state. >This is a limitation of the implementation. That was quite unexpected fo

Re: bug with multiline strings parsing and single-quoted !

2014-12-03 Thread Chet Ramey
On 12/3/14, 4:19 AM, Eduardo A. Bustamante López wrote: > On Wed, Dec 03, 2014 at 08:57:26AM +0100, Piotr Grzybowski wrote: >> Hey, >> >> I think in this case, history_expand lib/readline/histexpand.c:905 is >> invoked with hstring="b\" | echo '!'", and goes wrongly into history >> expansion. >>

Re: bug with multiline strings parsing and single-quoted !

2014-12-03 Thread Piotr Grzybowski
On Wed, Dec 3, 2014 at 10:19 AM, Eduardo A. Bustamante López wrote: > On Wed, Dec 03, 2014 at 08:57:26AM +0100, Piotr Grzybowski wrote: >> I think in this case, history_expand lib/readline/histexpand.c:905 is >> invoked with hstring="b\" | echo '!'", and goes wrongly into history >> expansion. [.

Re: bug with multiline strings parsing and single-quoted !

2014-12-03 Thread Eduardo A . Bustamante López
On Wed, Dec 03, 2014 at 08:57:26AM +0100, Piotr Grzybowski wrote: > Hey, > > I think in this case, history_expand lib/readline/histexpand.c:905 is > invoked with hstring="b\" | echo '!'", and goes wrongly into history > expansion. > Not that I know how to fix it ;-) Yes, the issue is tricky, bec

Re: bug with multiline strings parsing and single-quoted !

2014-12-02 Thread Piotr Grzybowski
Hey, I think in this case, history_expand lib/readline/histexpand.c:905 is invoked with hstring="b\" | echo '!'", and goes wrongly into history expansion. Not that I know how to fix it ;-) cheers, pg On Tue, Dec 2, 2014 at 10:02 PM, wrote: > This looks like a bug: > > gena@note2:~$ echo "a

Re: bug with multiline strings parsing and single-quoted !

2014-12-02 Thread Ángel González
gennady.kupava wrote: > This looks like a bug: > > gena@note2:~$ echo "a > > b" | echo '!' > bash: !': event not found > > ^C > gena@note2:~$ > > Is it? > > Gennady IMHO it is. Confirmed in 4.3.30