From 5c96a638d0cb43766344622012b9903cb02a312b Mon Sep 17 00:00:00 2001 From: Chet Ramey Date: Sat, 3 Dec 2011 13:41:35 -0500 Subject: [PATCH] commit bash-20041222 snapshot --- CWRU/CWRU.chlog | 7 +++++++ doc/bash.1 | 23 ++++++++++++++++------- doc/bashref.texi | 11 +++++++---- doc/version.texi | 4 ++-- tests/RUN-ONE-TEST | 2 +- 5 files changed, 33 insertions(+), 14 deletions(-) diff --git a/CWRU/CWRU.chlog b/CWRU/CWRU.chlog index 95620aa3c..efd09ec0b 100644 --- a/CWRU/CWRU.chlog +++ b/CWRU/CWRU.chlog @@ -10719,3 +10719,10 @@ subst.c subst.c - in string_list_dollar_star, make sure to null-terminate the separator if the character is longer than one byte + + 12/22 + ----- +doc/{bash.1,bashref.texi} + - changed text in quoting section explaining that double quotes do + not prevent history expansion from taking place, and that backslashes + escaping ! are not removed diff --git a/doc/bash.1 b/doc/bash.1 index 544b85c5a..95c5fc842 100644 --- a/doc/bash.1 +++ b/doc/bash.1 @@ -6,12 +6,12 @@ .\" Case Western Reserve University .\" chet@po.CWRU.Edu .\" -.\" Last Change: Wed Dec 1 15:39:20 EST 2004 +.\" Last Change: Wed Dec 22 15:43:06 EST 2004 .\" .\" bash_builtins, strip all but Built-Ins section .if \n(zZ=1 .ig zZ .if \n(zY=1 .ig zY -.TH BASH 1 "2004 Dec 1" "GNU Bash-3.1-devel" +.TH BASH 1 "2004 Dec 22" "GNU Bash-3.1-devel" .\" .\" There's some problem with having a `@' .\" in a tagged paragraph with the BSD man macros. @@ -895,7 +895,11 @@ Each of the \fImetacharacters\fP listed above under has special meaning to the shell and must be quoted if it is to represent itself. .PP -When the command history expansion facilities are being used, the +When the command history expansion facilities are being used +(see +.SM +.B HISTORY EXPANSION +below), the \fIhistory expansion\fP character, usually \fB!\fP, must be quoted to prevent history expansion. .PP @@ -919,8 +923,9 @@ Enclosing characters in double quotes preserves the literal value of all characters within the quotes, with the exception of .BR $ , .BR ` , -and -.BR \e . +.BR \e , +and, when history expansion is enabled, +.BR ! . The characters .B $ and @@ -936,8 +941,12 @@ or .BR . A double quote may be quoted within double quotes by preceding it with a backslash. -When command history is being used, the double quote may not be used to -quote the history expansion character. +If enabled, history expansion will be performed unless an +.B ! +appearing in double quotes is escaped using a backslash. +The backslash preceding the +.B ! +is not removed. .PP The special parameters .B * diff --git a/doc/bashref.texi b/doc/bashref.texi index 81dd4945f..8b4c2b4ca 100644 --- a/doc/bashref.texi +++ b/doc/bashref.texi @@ -457,7 +457,8 @@ parameter expansion. Each of the shell metacharacters (@pxref{Definitions}) has special meaning to the shell and must be quoted if it is to represent itself. -When the command history expansion facilities are being used, the +When the command history expansion facilities are being used +(@pxref{History Interaction}), the @var{history expansion} character, usually @samp{!}, must be quoted to prevent history expansion. @xref{Bash History Facilities}, for more details concerning history expansion. @@ -486,7 +487,8 @@ between single quotes, even when preceded by a backslash. Enclosing characters in double quotes (@samp{"}) preserves the literal value of all characters within the quotes, with the exception of -@samp{$}, @samp{`}, and @samp{\}. +@samp{$}, @samp{`}, @samp{\}, +and, when history expansion is enabled, @samp{!}. The characters @samp{$} and @samp{`} retain their special meaning within double quotes (@pxref{Shell Expansions}). The backslash retains its special meaning only when followed by one of @@ -497,8 +499,9 @@ characters are removed. Backslashes preceding characters without a special meaning are left unmodified. A double quote may be quoted within double quotes by preceding it with a backslash. -When command history is being used, the double quote may not be used to -quote the history expansion character. +If enabled, history expansion will be performed unless an @samp{!} +appearing in double quotes is escaped using a backslash. +The backslash preceding the @samp{!} is not removed. The special parameters @samp{*} and @samp{@@} have special meaning when in double quotes (@pxref{Shell Parameter Expansion}). diff --git a/doc/version.texi b/doc/version.texi index 804df1f11..1d1053779 100644 --- a/doc/version.texi +++ b/doc/version.texi @@ -2,9 +2,9 @@ Copyright (C) 1988-2004 Free Software Foundation, Inc. @end ignore -@set LASTCHANGE Wed Dec 1 15:39:35 EST 2004 +@set LASTCHANGE Wed Dec 22 15:49:31 EST 2004 @set EDITION 3.1-devel @set VERSION 3.1-devel -@set UPDATED 1 December 2004 +@set UPDATED 22 December 2004 @set UPDATED-MONTH December 2004 diff --git a/tests/RUN-ONE-TEST b/tests/RUN-ONE-TEST index 72ec06a2c..3efcf32d6 100755 --- a/tests/RUN-ONE-TEST +++ b/tests/RUN-ONE-TEST @@ -1,4 +1,4 @@ -BUILD_DIR=/usr/local/build/bash/bash-current +BUILD_DIR=/usr/local/build/chet/bash/bash-current THIS_SH=$BUILD_DIR/bash PATH=$PATH:$BUILD_DIR -- 2.47.3