Deal with shellcheck warnings in 1988/dale
In these scripts, try.sh and try.alt.sh, the warning triggered is entirely incorrect and not a problem so they are now disabled. The comments explain why this is.
This commit is contained in:
1 parent
37d43c8e18
commit
e73b084d20
1 file changed
+16
@@ -32,6 +32,14 @@ echo "Why do they differ in the format from the above command? Finally how can y
|
||||
echo "get the more likely desired behaviour?" 1>&2
|
||||
echo 1>&2
|
||||
echo 1>&2
|
||||
# This warning from ShellCheck is incorrect:
|
||||
#
|
||||
# SC2028 (info): echo may not expand escape sequences. Use printf.
|
||||
#
|
||||
# because we deliberately have \\n to show that there will be a newline printed
|
||||
# WITH printf(1). Thus this does show correct output.
|
||||
#
|
||||
# shellcheck disable=SC2028
|
||||
echo "$ ./dale \$(printf "the following files exist in this directory:\\n%s\\n" *)"
|
||||
read -r -n 1 -p "Press any key to continue: "
|
||||
echo 1>&2
|
||||
@@ -40,6 +48,14 @@ echo 1>&2
|
||||
./dale $(printf "the following files exist in this directory:\n%s\n" *)
|
||||
echo 1>&2
|
||||
|
||||
# This warning from ShellCheck is incorrect:
|
||||
#
|
||||
# SC2028 (info): echo may not expand escape sequences. Use printf.
|
||||
#
|
||||
# because we deliberately have \\n to show that there will be a newline printed
|
||||
# WITH printf(1). Thus this does show correct output.
|
||||
#
|
||||
# shellcheck disable=SC2028
|
||||
echo "$ ./dale \"\$(printf \"the following files exist in this directory:\\n%s\\n\" *)\""
|
||||
read -r -n 1 -p "Press any key to continue: "
|
||||
echo 1>&2
|
||||
|
||||
Reference in new issue
Block a user