mirror of
https://github.com/koalaman/shellcheck.git
synced 2025-10-03 19:29:44 +08:00
Updated SC1026 (markdown)
@@ -19,7 +19,7 @@
|
||||
|
||||
For `[[ .. ]]`, use regular parentheses.
|
||||
|
||||
For `[ .. ]`, either use escaped parentheses, or preferably rewrite the expression into multiple `[ .. ]` joined with `&&`, `||` and `{ ..; }` groups.
|
||||
For `[ .. ]`, either use escaped parentheses, or preferably rewrite the expression into multiple `[ .. ]` joined with `&&`, `||` and `{ ..; }` groups. The latter is preferred because `[ .. ]` is undefined for more than 4 arguments in POSIX.
|
||||
|
||||
### Exceptions:
|
||||
|
||||
@@ -27,4 +27,5 @@ None
|
||||
|
||||
### Related resources:
|
||||
|
||||
* [Bash Pitfalls: `if [ [ a = b ] && [ c = d ] ]; then ...`](https://mywiki.wooledge.org/BashPitfalls#pf11)
|
||||
* [Bash Pitfalls: `if [ [ a = b ] && [ c = d ] ]; then ...`](https://mywiki.wooledge.org/BashPitfalls#pf11)
|
||||
* [POSIX `test`](http://pubs.opengroup.org/onlinepubs/9699919799/utilities/test.html)
|
Reference in New Issue
Block a user