From 539f4fd26f22b0a77a02c33791c5157323fc1993 Mon Sep 17 00:00:00 2001 From: Mingye Wang Date: Mon, 12 Apr 2021 19:10:13 +0800 Subject: [PATCH] Updated SC2268 (markdown) --- SC2268.md | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) diff --git a/SC2268.md b/SC2268.md index e46d08f..61dc2ba 100644 --- a/SC2268.md +++ b/SC2268.md @@ -26,13 +26,17 @@ POSIX ensures [this is not necessary](https://pubs.opengroup.org/onlinepubs/9699 Bash 1.14 from 1992 incorrectly fails this test. This was fixed for Bash 2.0 in 1996: - var='!' - [ "$var" = "!" ] +```sh +var='!' +[ "$var" = "!" ] +``` Dash 0.5.4 from 2007 incorrectly passes this test. This was fixed for Dash 0.5.5 in 2008: - x='(' y=')' - [ "$x" = "$y" ] +```sh +x='(' y=')' +[ "$x" = "$y" ] +``` Zsh (while not supported by ShellCheck) fixed the same problem in 2015.