Re: [EXT] Re: manual page missing ${parameter-replacement}
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. The operator is in boldface, as is the corresponding short name for or description of the operator. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRUc...@case.eduhttp://tiswww.cwru.edu/~chet/
Re: [EXT] Re: manual page missing ${parameter-replacement}
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 arguments, > vertical bars (|) separate choices, and ellipses (...) can be repeated. > (...)" Again, you have omitted relevant context. That excerpt is from a section of man-pages(7) that discusses synopses. We are not talking about a man page synopsis. 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. Setting every "${" / "}" in boldface too would dilute that emphasis significantly. -- vq
Antw: Re: [EXT] Re: manual page missing ${parameter-replacement}
>>> 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 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 arguments, vertical bars (|) separate choices, and ellipses (...) can be repeated. (...)" > > -- > vq
Re: [EXT] Re: manual page missing ${parameter-replacement}
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 extremely confusing. But I think something like this has been suggested before (I don't remember by whom): ${parameter-word} ${parameter:-word} Use Default Values. [...] ${parameter=word} ${parameter:=word} Assign Default Values. [...] ${parameter?word} ${parameter:?word} Display Error if Null or Unset. [...] ${parameter+word} ${parameter:+word} Use Alternate Value. [...] > 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. -- vq