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

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!news.glorb.com!usenet.stanford.edu!not-for-mail
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 Mon, 24 Aug 2015 10:53:06 -0400
Lines 31
Approved bug-bash@gnu.org
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>
Reply-To chet.ramey@case.edu
NNTP-Posting-Host lists.gnu.org
Mime-Version 1.0
Content-Type text/plain; charset=utf-8
Content-Transfer-Encoding 7bit
X-Trace usenet.stanford.edu 1440428002 17502 208.118.235.17 (24 Aug 2015 14:53:22 GMT)
X-Complaints-To action@cs.stanford.edu
Cc bug-bash@gnu.org, chet.ramey@case.edu
To Lane Schwartz <dowobeha@gmail.com>
Envelope-to bug-bash@gnu.org
X-Enigmail-Draft-Status N1110
User-Agent Mozilla/5.0 (Macintosh; Intel Mac OS X 10.10; rv:38.0) Gecko/20100101 Thunderbird/38.2.0
In-Reply-To <CABv3vZ=EU=PA=GZS29KKrm2kSncJqb+E59s58H_nj1-KRE7CCQ@mail.gmail.com>
X-Junkmail-Status score=10/50, host=mpv5.cwru.edu
X-Junkmail-Whitelist YES (by domain whitelist at mpv2.tis.cwru.edu)
X-detected-operating-system by eggs.gnu.org: GNU/Linux 2.4.x-2.6.x [generic]
X-Received-From 129.22.105.37
X-BeenThere bug-bash@gnu.org
X-Mailman-Version 2.1.14
Precedence list
List-Id Bug reports for the GNU Bourne Again SHell <bug-bash.gnu.org>
List-Unsubscribe <https://lists.gnu.org/mailman/options/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=unsubscribe>
List-Archive <http://lists.gnu.org/archive/html/bug-bash>
List-Post <mailto:bug-bash@gnu.org>
List-Help <mailto:bug-bash-request@gnu.org?subject=help>
List-Subscribe <https://lists.gnu.org/mailman/listinfo/bug-bash>, <mailto:bug-bash-request@gnu.org?subject=subscribe>
Xref csiph.com gnu.bash.bug:11433

Show key headers only | 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