From: Junio C Hamano Date: Wed, 30 Apr 2014 21:45:06 GMT Subject: [PATCH 2/8] CodingGuidelines: give an example for case/esac statement Message-ID: <1398894312-30763-3-git-send-email-gitster@pobox.com> In-Reply-To: <1398894312-30763-1-git-send-email-gitster@pobox.com> Signed-off-by: Junio C Hamano --- Documentation/CodingGuidelines | 12 +++++++++++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/Documentation/CodingGuidelines b/Documentation/CodingGuidelines index fdf6269..9b103cb 100644 --- a/Documentation/CodingGuidelines +++ b/Documentation/CodingGuidelines @@ -34,7 +34,17 @@ For shell scripts specifically (not exhaustive): - We use tabs for indentation. - - Case arms are indented at the same depth as case and esac lines. + - Case arms are indented at the same depth as case and esac lines, + like this: + + case "$variable" in + pattern1) + do this + ;; + pattern2) + do that + ;; + esac - Redirection operators should be written with space before, but no space after them. In other words, write 'echo test >"$file"' -- 2.0.0-rc1-355-gd6d6511