From d6adbfde787a46e2d61dc96ffdf8c9a6f800390e Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Sun, 3 May 2020 21:46:16 -0700 Subject: [PATCH] Improve SC2259/60/61 messages --- src/ShellCheck/Analytics.hs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ShellCheck/Analytics.hs b/src/ShellCheck/Analytics.hs index 4281ace..9c9a86d 100644 --- a/src/ShellCheck/Analytics.hs +++ b/src/ShellCheck/Analytics.hs @@ -3336,7 +3336,7 @@ checkPipeToNowhere params t = guard $ input /= NoPipe && not hasConsumers (override:_) <- Map.lookup 0 fdMap return $ err (getOpId override) 2259 $ - "This redirection overrides piped input. To use both, merge or pass filename." + "This redirection overrides piped input. To use both, merge or pass filenames." -- Only produce output warnings for regular pipes, since these are -- way more common, and `foo > out 2> err |& foo` can still write @@ -3354,7 +3354,7 @@ checkPipeToNowhere params t = warnAboutDupes (n, list@(_:_:_)) = forM_ list $ \c -> err (getOpId c) 2261 $ - "Multiple redirections compete for " ++ str n ++ ". Combine, or use " ++ alternative ++ "." + "Multiple redirections compete for " ++ str n ++ ". Use cat, tee, or pass filenames instead." warnAboutDupes _ = return () alternative =