Deal with shellcheck warnings in 1988/fanf/try.sh
This commit is contained in:
1 parent
2a1623b5c1
commit
a576f1e45c
1 file changed
+58
-1
+58
-1
@@ -17,9 +17,26 @@ clear
|
|||||||
|
|
||||||
read -r -n 1 -p "Press any key to run: echo '((\a(\b(\c(d)))) e)' | ./fanf: "
|
read -r -n 1 -p "Press any key to run: echo '((\a(\b(\c(d)))) e)' | ./fanf: "
|
||||||
echo 1>&2
|
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 '((\a(\b(\c(d)))) e)' | ./fanf
|
||||||
echo 1>&2
|
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 '
|
echo "$ echo '
|
||||||
(\f\g\x
|
(\f\g\x
|
||||||
(
|
(
|
||||||
@@ -28,6 +45,15 @@ echo "$ echo '
|
|||||||
)'|./fanf" 1>&2
|
)'|./fanf" 1>&2
|
||||||
read -r -n 1 -p "Press any key to continue: "
|
read -r -n 1 -p "Press any key to continue: "
|
||||||
echo 1>&2
|
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
|
(\f\g\x
|
||||||
(
|
(
|
||||||
@@ -36,13 +62,36 @@ echo '
|
|||||||
)'|./fanf
|
)'|./fanf
|
||||||
echo 1>&2
|
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
|
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: "
|
read -r -n 1 -p "Press any key to continue: "
|
||||||
echo 1>&2
|
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 '(\f(\f\g\x( (f((\a(g(b))) e)) (g x) ) K K z))' | ./fanf
|
||||||
echo 1>&2
|
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 '
|
echo "$ echo '
|
||||||
(Y\f\n
|
(Y\f\n
|
||||||
((= n 0)
|
((= n 0)
|
||||||
@@ -53,6 +102,14 @@ echo "$ echo '
|
|||||||
read -r -n 1 -p "Press any key to continue: "
|
read -r -n 1 -p "Press any key to continue: "
|
||||||
echo 1>&2
|
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
|
echo '(Y\f\n
|
||||||
((= n 0)
|
((= n 0)
|
||||||
1
|
1
|
||||||
|
|||||||
Reference in new issue
Block a user