Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > gnu.bash.bug > #11433

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

From Chet Ramey <chet.ramey@case.edu>
Newsgroups gnu.bash.bug
Subject Re: Multi-line bash strings that end in ! improperly treated as event designator
Date 2015-08-24 10:53 -0400
Message-ID <mailman.3.1440428002.19573.bug-bash@gnu.org> (permalink)
References <CABv3vZktFnhJwVy3Uq2o7SNNAeEh0ibBGha1MF-OyEQ=oL4z_Q@mail.gmail.com> <55DB19F9.6040309@case.edu> <CABv3vZ=EU=PA=GZS29KKrm2kSncJqb+E59s58H_nj1-KRE7CCQ@mail.gmail.com>

Show all headers | View raw


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 3.1.2.3 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
character.

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

Back to gnu.bash.bug | Previous | Next | Find similar


Thread

Re: Multi-line bash strings that end in ! improperly treated as event designator Chet Ramey <chet.ramey@case.edu> - 2015-08-24 10:53 -0400

csiph-web