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 c...@case.edu http://cnswww.cns.cwru.edu/~chet/