From eb0b1b7a2df4b967f684e25491d1772b34872ad6 Mon Sep 17 00:00:00 2001 From: Vidar Holen Date: Thu, 26 Aug 2021 19:45:04 -0700 Subject: [PATCH] Updated SC2034 (markdown) --- SC2034.md | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/SC2034.md b/SC2034.md index 60263f2..ce8b777 100644 --- a/SC2034.md +++ b/SC2034.md @@ -53,10 +53,17 @@ read _ last _ zip _ _ <<< "$str" echo "$last, $zip" ``` -or if you prefer to keep the names, use a directive to disable the warning: +Or optionally as a prefix for dummy variables (ShellCheck >0.7.2). + +``` ​ +read _first last _email zip _lat _lng <<< "$str" +echo "$last, $zip" +``` + +For versions <= 0.7.2, the message can optionally be [[ignore]]d with a directive: ```sh # shellcheck disable=SC2034 # Unused variables left for readability read first last email zip lat lng <<< "$str" echo "$last, $zip" -``` \ No newline at end of file +`` \ No newline at end of file