On 11/25/24 2:18 PM, marcel.plch wrote:
On Monday, November 25th, 2024 at 5:49 PM, Chet Ramey <chet.ra...@case.edu> wrote:On 11/23/24 9:29 PM, marcel.plch via Bug reports for the GNU Bourne Again SHell wrote:Thank you for clarifictaion.Maybe adding an extra clarification to the bash manpage in the Pattern Matching section would be a good idea?I can add some clarifying text, but I figure that the since this text appears in the section describing [...] bracket expressions that it would have been reasonable to infer that it describes how pattern matching treats characters between those brackets, and that if the description of, say, character classes includes additional brackets, then those are required.Not in one place the pattern "[[:space:]]" is mentioned.
Is it reasonable to assume that multiple paragraphs of text with identical indentation following a tag all apply to that tag? That's a pretty entrenched man page idiom.
I understand that the current formulation of the manpage sounds rather obvious to you (it does to me as well now that I get it), but when reading it for the first time, I thought that the "between [ and ]" part is speaking of the brackets already contained within the "[:space:]" expression and that the check of whether or not this is a class is based on the fact that the expression has the first brace followed by a colon and the second brace lead by a colon.
In a tagged paragraph describing bracket expressions, which are enclosed in [ and ], though. I think that's the key here.
This small assumption lead me to losing a whole evening pulling my hair out and 3 (three!) points of reputation on Stackoverflow [0].
Sorry, I don't read Stackoverflow.
If adding just one sentence containing "[[:space:]]" to clarify the section a tiny bit more, I think that it is well worth it.
I think I'll add something a bit more general. -- ``The lyf so short, the craft so long to lerne.'' - Chaucer ``Ars longa, vita brevis'' - Hippocrates Chet Ramey, UTech, CWRU c...@case.edu http://tiswww.cwru.edu/~chet/
OpenPGP_signature.asc
Description: OpenPGP digital signature