[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH 18/18] doc/bash.1: work around limitation of AT&T troff
From: |
G. Branden Robinson |
Subject: |
[PATCH 18/18] doc/bash.1: work around limitation of AT&T troff |
Date: |
Wed, 31 Jan 2024 02:43:52 -0600 |
Diff of rendering (DWB):
- parameter expands to a separate word. That is, $@ is
- equivalent to $1 "$2" ... If the double-quoted expan-
- sion occurs within a word, the expansion of the first
- parameter is joined with the beginning part of the
- original word, and the expansion of the last parameter
- is joined with the last part of the original word.
- When there are no positional parameters, $@ and $@
+ parameter expands to a separate word. That is, "$@" is
+ equivalent to "$1" "$2" ... If the double-quoted
+ expansion occurs within a word, the expansion of the
+ first parameter is joined with the beginning part of
+ the original word, and the expansion of the last param-
+ eter is joined with the last part of the original word.
+ When there are no positional parameters, "$@" and $@
- exceptions to this are the expansions of $@ and ${name[@]},
- and, in most cases, $* and ${name[*]} as explained above
- (see PARAMETERS).
+ exceptions to this are the expansions of "$@" and
+ "${name[@]}", and, in most cases, $* and ${name[*]} as
+ explained above (see PARAMETERS).
---
doc/bash.1 | 11 ++++++-----
1 file changed, 6 insertions(+), 5 deletions(-)
diff --git a/doc/bash.1 b/doc/bash.1
index 2ee6c119..2eb76d7c 100644
--- a/doc/bash.1
+++ b/doc/bash.1
@@ -1476,16 +1476,16 @@ .SS Special Parameters
When the expansion occurs within double quotes,
each parameter expands to a separate word.
That is,
-.B \*"$@\*"
+.B \&\*"$@\*" \" keep leading \& for AT&T troff
is equivalent to
-.B \*"$1\*"\ \*"$2\*"
+.B \&\*"\&$1\&\*"\ \*"$2\*" \" keep leading \& for AT&T troff
\&.\|.\|.
If the double-quoted expansion occurs within a word, the expansion of
the first parameter is joined with the beginning part of the original
word, and the expansion of the last parameter is joined with the last
part of the original word.
When there are no positional parameters,
-.B \*"$@\*"
+.B \&\*"$@\*" \" keep leading \& for AT&T troff
and
.B $@
expand to nothing (i.e., they are removed).
@@ -3053,9 +3053,10 @@ .SH EXPANSION
can increase the number of words of the expansion; other expansions
expand a single word to a single word.
The only exceptions to this are the expansions of
-.B \*"$@\*"
+.B \&\*"$@\*" \" keep leading \& for AT&T troff
and
-.BR \*"${\fIname\fP[@]}\*" ,
+.B \&\*"${\fIname\fP[@]}\*"\c \" keep leading \& for AT&T troff
+.BR \& , \" .BR + \& + \*" doesn't work with AT&T troff
and, in most cases, \fB$*\fP and \fB${\fP\fIname\fP\fB[*]}\fP
as explained above (see
.SM
--
2.30.2
signature.asc
Description: PGP signature
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [PATCH 18/18] doc/bash.1: work around limitation of AT&T troff,
G. Branden Robinson <=