Deal with shellcheck warnings in 1988/fanf/try.sh

This commit is contained in:
Cody Boone Ferguson committed 2024-01-21 05:18:30 -08:00
1 parent 2a1623b5c1
commit a576f1e45c
1 file changed
+58 -1
+58 -1
View File
@@ -17,9 +17,26 @@ clear
read -r -n 1 -p "Press any key to run: echo '((\a(\b(\c(d)))) e)' | ./fanf: "
echo 1>&2
# This warning from ShellCheck is incorrect:
#
# SC2028 (info): echo may not expand escape sequences. Use printf.
#
# because we don't want to expand escape sequences. Thus this does show correct
# output.
#
# shellcheck disable=SC2028
echo '((\a(\b(\c(d)))) e)' | ./fanf
echo 1>&2
# This warning from ShellCheck is incorrect:
#
# SC2028 (info): echo may not expand escape sequences. Use printf.
#
# because we don't want to expand escape sequences. Thus this does show correct
# output.
#
# shellcheck disable=SC2028
echo "$ echo '
(\f\g\x
(
@@ -28,6 +45,15 @@ echo "$ echo '
)'|./fanf" 1>&2
read -r -n 1 -p "Press any key to continue: "
echo 1>&2
# This warning from ShellCheck is incorrect:
#
# SC2028 (info): echo may not expand escape sequences. Use printf.
#
# because we don't want to expand escape sequences. Thus this does show correct
# output.
#
# shellcheck disable=SC2028
echo '
(\f\g\x
(
@@ -36,13 +62,36 @@ echo '
)'|./fanf
echo 1>&2
# This warning from ShellCheck is incorrect:
#
# SC2028 (info): echo may not expand escape sequences. Use printf.
#
# because we don't want to expand escape sequences. Thus this does show correct
# output.
#
# shellcheck disable=SC2028
echo "$ echo '(\f(\f\g\x( (f((\a(g(b))) e)) (g x) ) K K z))' | ./fanf" 1>&2
read -r -n 1 -p "Press any key to continue: "
echo 1>&2
# This warning from ShellCheck is incorrect:
#
# SC2028 (info): echo may not expand escape sequences. Use printf.
#
# because we don't want to expand escape sequences. Thus this does show correct
# output.
#
# shellcheck disable=SC2028
echo '(\f(\f\g\x( (f((\a(g(b))) e)) (g x) ) K K z))' | ./fanf
echo 1>&2
# This warning from ShellCheck is incorrect:
#
# SC2028 (info): echo may not expand escape sequences. Use printf.
#
# because we don't want to expand escape sequences. Thus this does show correct
# output.
#
# shellcheck disable=SC2028
echo "$ echo '
(Y\f\n
((= n 0)
@@ -53,6 +102,14 @@ echo "$ echo '
read -r -n 1 -p "Press any key to continue: "
echo 1>&2
# This warning from ShellCheck is incorrect:
#
# SC2028 (info): echo may not expand escape sequences. Use printf.
#
# because we don't want to expand escape sequences. Thus this does show correct
# output.
#
# shellcheck disable=SC2028
echo '(Y\f\n
((= n 0)
1