On 11/17/22 6:05 AM, Koichi Murase wrote:

Also, I have a suggestion of changes for more consistent handling of
incomplete bracket expressions.  Currently, incomplete bracket
expressions sometimes fail unconditionally (#26..#31) and sometimes
fall back to a literal `[' plus remaining pattern (#18..#25).  I
attach another patch for this:
[r0037.brackmatch5.incomplete-bracket.patch.txt].

"If a pattern ends with an unescaped <backslash>, it is unspecified whether
the pattern does not match anything or the pattern is treated as invalid."

Bash uses the former interpretation. If "the pattern is treated as invalid"
means trying to literally match the open bracket and going on from there,
your interpretation is valid as well. The standard doesn't use that
language in other places it specifies to treat the bracket as an ordinary
character to be matched literally, however.


--
``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/


Reply via email to