You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
This is mandatory because POSIX allows implementations to extend pattern matching in these situations (C.2.14.1 in the current Issue 8 draft specifically mentions the Korn shell extglob extension of *(…) in pattern matching).
Unfortunately, both GNU bash and dash allow this (and so mksh’s lksh binary on Debian when in sh mode does), so this mistake is very widespread. It would be good for shellcheck to flag this as error.
Here's a snippet or screenshot that shows the problem:
source
Here's what shellcheck currently says:
No issues detected!
Here's what I wanted or expected to see:
A warning about failure to quote the two parenthesēs with a backslash each:
This is mandatory because POSIX allows implementations to extend pattern matching in these situations (C.2.14.1 in the current Issue 8 draft specifically mentions the Korn shell extglob extension of
*(…)
in pattern matching).Unfortunately, both GNU bash and dash allow this (and so mksh’s lksh binary on Debian when in sh mode does), so this mistake is very widespread. It would be good for shellcheck to flag this as error.
Thanks @lanodan for noting.
The text was updated successfully, but these errors were encountered: