On 11/22/22 2:43 AM, Lawrence Velázquez wrote:
The "Parameter Expansion" section of bash(1) simply does not use
boldface for "${" / "}". I don't know if that is intentional, but
I would guess that only the unique portions of each expansion form
are emphasized with boldface.
This is correct.
On Tue, Nov 22, 2022, at 2:20 AM, Ulrich Windl wrote:
> AFAIK, bold means "literal" and non-bold or specifically italics means
> "placeholder".
> From man-pages(7):
>
> "(...) boldface is used for as-is text and italics are used to indicate
> replaceable arguments. Brackets ([]) surround optional
>>> Lawrence Velázquez schrieb am 22.11.2022 um 05:06 in
Nachricht
:
[...]
>> Despite of that only ":-" is typeset in bold; shouldn't "${" and "}" be
>> typeset in bold, too?
>
> I don't know. It seems like boldface is used to highlight the parts
> that are unique to each form.
AFAIK, bold mea
On Mon, Nov 21, 2022, at 4:38 AM, Ulrich Windl wrote:
> But from the syntax "${parameter:-word}" it's not really obvious that the
> colon may be omitted.
You're not wrong.
> Should it be "${parameter[:]-word}" (with non-bold square brackets) instead
> (as for "name=[value]")?
No, that would be e
Sorry, I actually miussed it, as the typical usage pattern for lengthy manual
pages is like searching for ":-" and looking what is standing there:
${parameter:-word}
Use Default Values. If parameter is unset or null, the
expan-
sion of word is substituted. Ot
On Mon, Nov 21, 2022, at 2:20 AM, Ulrich Windl wrote:
> I think the bash manual page lacks some important detail of parameter
> substitution, namely:
> "Bash tests for a parameter that is unset or null. Omitting the colon
> results in a test only for a parameter that is unset."
>
> (found in
> h
I think the bash manual page lacks some important detail of parameter
substitution, namely:
"Bash tests for a parameter that is unset or null. Omitting the colon results
in a test only for a parameter that is unset."
(found in
https://www.gnu.org/software/bash/manual/html_node/Shell-Parameter-E