From 0044c3dd6e7706d9cbb1eeaddd746f39a1a94f27 Mon Sep 17 00:00:00 2001 From: David Haguenauer Date: Fri, 4 Dec 2015 10:57:54 -0500 Subject: [PATCH] Make use of --color with no argument equivalent to --color=always --- shellcheck.hs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/shellcheck.hs b/shellcheck.hs index a11d8f4..9bebd34 100644 --- a/shellcheck.hs +++ b/shellcheck.hs @@ -75,7 +75,8 @@ options = [ Option "f" ["format"] (ReqArg (Flag "format") "FORMAT") "output format", Option "C" ["color"] - (ReqArg (Flag "color") "WHEN") "Set use of color (auto, always, never)", + (OptArg (maybe (Flag "color" "always") (Flag "color")) "WHEN") + "Set use of color (auto, always, never)", Option "s" ["shell"] (ReqArg (Flag "shell") "SHELLNAME") "Specify dialect (sh,bash,dash,ksh)", Option "x" ["external-sources"]