On 14/04/2023 09:36, Greg Wooledge wrote:
On Fri, Apr 14, 2023 at 09:08:08AM +0700, Max Nikulin wrote:
https://www.shellcheck.net/wiki/SC3026
Help by adding links to BashFAQ, StackOverflow, man pages, POSIX, etc
Well, it's not clear how to actually add such a link.  I guess you're
supposed to do it through github or something?

Thank you, Greg. I edited https://github.com/koalaman/shellcheck/wiki/SC3026 (the link below the page header) and the shellcheck.net page was updated in several hours. Sorry, web interface assumes brief commit message, so I did not added credits to you there.

I think, shellcheck is not known well enough while it may help to avoid a lot of troubles with shell scripts. It can provide some hints when unexpected behavior is observed and prevent it if used regularly.

As to [^c] vs. [!c], unfortunately the latter can not be always used as portable variant. It is treated as history expansion in the case of interactive bash session. From my point of view it is an argument to support [^c]. The enhancement request was rejected however, see

Stephane Chazelas. Re: [v2 PATCH] expand: Always quote caret when using fnmatch. Sun, 20 Feb 2022 07:15:44 +0000
https://lore.kernel.org/dash/20220220071544.7odyx5urgcwjs...@chazelas.org/

and

https://www.austingroupbugs.net/view.php?id=1558
0001558: require [^...] in addition to [!...] for bracket expression negation

Reply via email to