From 1bc882d822626236e51267b6a539858e37d16071 Mon Sep 17 00:00:00 2001 From: koalaman Date: Sat, 16 Sep 2017 15:48:18 -0700 Subject: [PATCH] Updated SC2221 (markdown) --- SC2221.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/SC2221.md b/SC2221.md index a0bf01d..ad33e26 100644 --- a/SC2221.md +++ b/SC2221.md @@ -21,7 +21,7 @@ esac ``` ### Rationale: -You have specified multiple patterns in a `case` statement, where one will always override the other. +You have specified multiple patterns in a `case` statement, where one will always override the other. The pattern being overridden is indicated with a [[SC2222]] warning. In the example, `-?` actually matches a dash followed by any character, such as `-n`. This means that the later `-n` branch will never trigger. In this case, the correct solution is to escape the `-\?` so that it doesn't match `-n`.