1
0
mirror of https://github.com/koalaman/shellcheck.git synced 2025-03-12 12:35:25 -07:00

Updated SC2160 (markdown)

Mingye Wang 2015-10-04 01:46:53 -04:00
parent 36d91384bd
commit d9f397107d

@ -24,11 +24,11 @@ This is a stylistic suggestion to use `true` instead of `[ true ]`.
`[ true ]` seems to suggest that the value "true" is somehow relevant to the statement. This is not the case, it doesn't matter. You can replace it with `[ false ]` or `[ wombat ]`, and it will still always be true:
String | In brackets | Outside brackets
--------+--------------+-----------------
true | true | true
false | true | false
wombat | true | unknown command
String | In brackets | Outside brackets
--------+--------------+-----------------
true | true | true
false | true | false
wombat | true | unknown command
It's therefore better to use it without brackets, so that the "true" actually matters.