When viewing the bash man page with 'man bash' in a locale that supports UTF-8 (for example), the single-quote character "'" doesn't necessarily display as we want. For a literal single-quote character, "\(aq" is needed in the groff input.
Original bug report: https://bugzilla.redhat.com/bugzilla/show_bug.cgi?id=177051 This patch is necessary in order to enable cut-and-pasting of examples etc. Tim. */ --- bash-3.1/doc/bash.1.aq 2006-01-06 16:40:40.000000000 +0000 +++ bash-3.1/doc/bash.1 2006-01-06 16:46:36.000000000 +0000 @@ -977,7 +977,7 @@ .B PARAMETERS below). .PP -Words of the form \fB$\fP'\fIstring\fP' are treated specially. The +Words of the form \fB$\fP\(aq\fIstring\fP\(aq are treated specially. The word expands to \fIstring\fP, with backslash-escaped characters replaced as specified by the ANSI C standard. Backslash escape sequences, if present, are decoded as follows: @@ -1011,7 +1011,7 @@ .B \e\e backslash .TP -.B \e' +.B \e\(aq single quote .TP .B \e\fInnn\fP @@ -1845,7 +1845,7 @@ Example: .RS .PP -\fBMAILPATH\fP='/var/mail/bfox?"You have mail":~/shell\-mail?"$_ has mail!"' +\fBMAILPATH\fP=\(aq/var/mail/bfox?"You have mail":~/shell\-mail?"$_ has mail!"\(aq .PP .B Bash supplies a default value for this variable, but the location of the user @@ -1979,7 +1979,7 @@ included. .IP If this variable is not set, \fBbash\fP acts as if it had the -value \fB$'\enreal\et%3lR\enuser\et%3lU\ensys\t%3lS'\fP. +value \fB$\(aq\enreal\et%3lR\enuser\et%3lU\ensys\t%3lS\(aq\fP. If the value is null, no timing information is displayed. A trailing newline is added when the format string is displayed. .TP @@ -2708,7 +2708,7 @@ .B IFS is null, no word splitting occurs. .PP -Explicit null arguments (\^\f3"\^"\fP or \^\f3'\^'\fP\^) are retained. +Explicit null arguments (\^\f3"\^"\fP or \^\f3\(aq\^\(aq\fP\^) are retained. Unquoted implicit null arguments, resulting from the expansion of parameters that have no values, are removed. If a parameter with no value is expanded within double quotes, a @@ -2930,7 +2930,7 @@ After the preceding expansions, all unquoted occurrences of the characters .BR \e , -.BR ' , +.BR \(aq , and \^\f3"\fP\^ that did not result from one of the above expansions are removed. .SH REDIRECTION @@ -4495,8 +4495,8 @@ .B \e" literal " .TP -.B \e' -literal ' +.B \e\(aq +literal \(aq .RE .PD .PP @@ -4544,7 +4544,7 @@ Unquoted text is assumed to be a function name. In the macro body, the backslash escapes described above are expanded. Backslash will quote any other character in the macro text, -including " and '. +including " and \(aq. .PP .B Bash allows the current readline key bindings to be displayed or modified @@ -7320,7 +7320,7 @@ In addition to the standard \fIprintf\fP(1) formats, \fB%b\fP causes \fBprintf\fP to expand backslash escape sequences in the corresponding \fIargument\fP (except that \fB\ec\fP terminates output, backslashes in -\fB\e'\fP, \fB\e"\fP, and \fB\e?\fP are not removed, and octal escapes +\fB\e\(aq\fP, \fB\e"\fP, and \fB\e?\fP are not removed, and octal escapes beginning with \fB\e0\fP may contain up to four digits), and \fB%q\fP causes \fBprintf\fP to output the corresponding \fIargument\fP in a format that can be reused as shell input. @@ -8037,7 +8037,7 @@ \fBPathname Expansion\fP are enabled. .TP 8 .B extquote -If set, \fB$\fP'\fIstring\fP' and \fB$\fP"\fIstring\fP" quoting is +If set, \fB$\fP\(aq\fIstring\fP\(aq and \fB$\fP"\fIstring\fP" quoting is performed within \fB${\fP\fIparameter\fP\fB}\fP expansions enclosed in double quotes. This option is enabled by default. .TP 8 _______________________________________________ Bug-bash mailing list Bug-bash@gnu.org http://lists.gnu.org/mailman/listinfo/bug-bash