GNU bug report logs -
#61128
[PATCH] Use complementation correctly in shell globs
Previous Next
Full log
View this message in rfc822 format
This looks good to me. While shells often accept both ! and ^
(https://www.gnu.org/savannah-checkouts/gnu/bash/manual/bash.html#Pattern-Matching:
"3.5.8.1 Pattern Matching ... "[…]" Matches any one of the enclosed
characters. ...
If the first character following the ‘[’ is a ‘!’ or a ‘^’ then any
character not enclosed is matched.")
it is not portable.
https://www.linux.com/news/patterns-and-string-processing-shell-scripts/:
"Many users have the habit of using a caret (^) instead of ! in shell
character classes.
This is not portable, but it is a common extension some shells offer
because habitual
users of regular expressions may be more used to it. This can create
an occasional
surprise if you have never seen it used, and want to match a caret in a class."
On Sun, 29 Jan 2023 at 00:43, Kerin Millar <kfm <at> plushkava.net> wrote:
>
> Hello,
>
> The attached patch rectifies a spurious test failure reported at https://bugs.gentoo.org/890869. As explained by the commit message, the exclamation mark character should be used to perform negations within bracket expressions, not the circumflex character.
>
> --
> Kerin Millar
This bug report was last modified 2 years and 193 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.