[Top][All Lists]

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

Re: Multi-line bash strings that end in ! improperly treated as event de

From: Chet Ramey
Subject: Re: Multi-line bash strings that end in ! improperly treated as event designator
Date: Mon, 24 Aug 2015 10:53:06 -0400
User-agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0

On 8/24/15 10:16 AM, Lane Schwartz wrote:

> In light of your comments, might I suggest two additions to the manual?
> * History expansion takes place before quote removal. (This could be added
> to the bullet list in Section 3.5)

I would think that the following sentence from the HISTORY EXPANSION
section of the man page would be more relevant:

History expansion is performed immediately after a complete line
is read, before the shell breaks it into words.

I will see whether that sentence needs to be added to the history
texinfo manual.

> * Beginning with Bash version X.Y.Z, history expansion is suppressed within
> double-quoted strings, but only when the opening and closing quotes are on
> the same line. (This could be added to Section and/or Section 9.3)

In bash-4.3, this is restricted to the case where the exclamation point
immediately precedes the closing double quote.  In effect, an open double
quote temporarily adds double quote to the set of characters that inhibit
history expansion when found immediately after the history expansion

``The lyf so short, the craft so long to lerne.'' - Chaucer
                 ``Ars longa, vita brevis'' - Hippocrates
Chet Ramey, ITS, CWRU    address@hidden    http://cnswww.cns.cwru.edu/~chet/

reply via email to

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