mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Behavior of dash changed
@@ -16,7 +16,7 @@ echo foo-[!0]*.jpg
|
|||||||
|
|
||||||
`[^c]` is frequently used in most regular expression variants to mean "any character except `c`". Ksh and Bash adopted it for globs as well.
|
`[^c]` is frequently used in most regular expression variants to mean "any character except `c`". Ksh and Bash adopted it for globs as well.
|
||||||
|
|
||||||
However, strictly speaking, the only range complement syntax guaranteed to be supported across shells is `[!c]`. Dash only supports it when using `fnmatch` and `glob` from glibc.
|
However, strictly speaking, the only range complement syntax guaranteed to be supported across shells is `[!c]`. Dash used to support `[^c]` when compiled with `fnmatch` and `glob` from glibc, but it was considered as a [bug](https://lore.kernel.org/dash/09fd70edcf08c75b4f9f2e158e3e6c0832d35d90.camel@scientia.org/t/#u) and fixed in version 0.5.12. Busybox has a similar [bug 14516](https://bugs.busybox.net/show_bug.cgi?id=14516).
|
||||||
|
|
||||||
### Exceptions:
|
### Exceptions:
|
||||||
|
|
||||||
|
Reference in New Issue
Block a user