bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: History expansion quoting problem


From: Sasse, Dr. Philipp (TNE, Testo Visual Systems)
Subject: Re: History expansion quoting problem
Date: Mon, 11 Sep 2017 07:51:55 +0000

Chet Ramey wrote:

> On 9/8/17 4:18 AM, Philipp Sasse wrote:

> >   Executing something like
> >     echo "foo
> >     bar" | sed '/foo/!d'
> >   results in an error. Apparently the history expansion considers only 
> > quoting characters on the same input line, so the closing double quote is 
> > taken as opening double quote, escaping the following single quotes, thus 
> > these don't escape the ! anymore.

> History expansion is explicitly line-oriented, and always has been.

If you say so. But it is nevertheless a highly unexpected and annoying behavior.

> There's
> not a clean way to make it aware of the shell's current quoting state

I didn't look at the code, I just know it works in zsh. At least, the man page
Should reflect this behavior, don't you think so?

Should I write a patch for the man page?

Best regards, Philipp. 


Testo Visual Systems GmbH, Sitz Titisee,
Celsiusstraße 2, 79822 Titisee-Neustadt
Handelsregister Freiburg HRB 712427
USt.IdNr. DE 297941089
Geschäftsführer: Dr. Rolf Merte, Patrick Zahn




reply via email to

[Prev in Thread] Current Thread [Next in Thread]