[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: String substitution bug
From: |
marcel.plch |
Subject: |
Re: String substitution bug |
Date: |
Mon, 25 Nov 2024 19:18:25 +0000 |
On Monday, November 25th, 2024 at 5:49 PM, Chet Ramey <chet.ramey@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.
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.
This small assumption lead me to losing a whole evening
pulling my hair out and 3 (three!) points of reputation
on Stackoverflow [0].
If adding just one sentence containing "[[:space:]]" to
clarify the section a tiny bit more, I think that
it is well worth it.
[0] - https://stackoverflow.com/questions/79219041/bash-string-substitution-bug
--
Dormouse
publickey - marcel.plch@proton.me - 0x1094A451.asc
Description: application/pgp-keys
signature.asc
Description: OpenPGP digital signature
- Re: String substitution bug, (continued)
- Re: String substitution bug, Greg Wooledge, 2024/11/24
- Re: String substitution bug, Andreas Kähäri, 2024/11/24
- Re: String substitution bug, Lawrence Velázquez, 2024/11/24
- Re: String substitution bug, Andreas Kähäri, 2024/11/25
- Re: String substitution bug, Martin D Kealey, 2024/11/25
- Re: String substitution bug, Zachary Santer, 2024/11/24
- Re: String substitution bug, Andreas Kähäri, 2024/11/25
- Re: String substitution bug, Chet Ramey, 2024/11/25
- Re: String substitution bug,
marcel.plch <=
- Re: String substitution bug, Lawrence Velázquez, 2024/11/25
- Re: String substitution bug, Lawrence Velázquez, 2024/11/25
- Re: String substitution bug, Chet Ramey, 2024/11/25
- Re: String substitution bug, Chet Ramey, 2024/11/25
Re: String substitution bug, Wiley Young, 2024/11/26