For bugs with existing features
Here's a snippet or screenshot that shows the problem:
#!/bin/sh
geeqie_exe="$1"
completions_file="$2"
# Make sure input files exist.
if [ \! \( -x "$geeqie_exe" -a -e "$completions_file" \) ]; then
echo "Missing input files"
exit 2
fi
Here's what shellcheck currently says:
In ./build-aux/test-bash-completions.sh line 15:
if [ \! \( -x "$geeqie_exe" -a -e "$completions_file" \) ]; then
^-- SC1009 (info): The mentioned syntax error was in this if expression.
^-- SC1073 (error): Couldn't parse this test expression. Fix to allow more checks.
^-- SC1072 (error): Expected comparison operator (don't wrap commands in []/[[]]). Fix any mentioned problems and try again.
For more information:
https://www.shellcheck.net/wiki/SC1072 -- Expected comparison operator (don...
https://www.shellcheck.net/wiki/SC1073 -- Couldn't parse this test expressi...
https://www.shellcheck.net/wiki/SC1009 -- The mentioned syntax error was in...
Here's what I wanted or expected to see:
This code runs as expected, and seems to be trivially correct
$(export geeqie_exe="/bin/ls"; export completions_file="/etc/passwd"; [ \! \( -x "$geeqie_exe" -a -e "$completions_file" \) ] && echo failcase || echo bypass)
bypass
$(export geeqie_exe="/bin/noexist"; export completions_file="/etc/passwd"; [ \! \( -x "$geeqie_exe" -a -e "$completions_file" \) ] && echo failcase || echo bypass)
failcase
$(export geeqie_exe="/bin/ls"; export completions_file="/etc/noexist"; [ \! \( -x "$geeqie_exe" -a -e "$completions_file" \) ] && echo failcase || echo bypass)
failcase
$(export geeqie_exe="/bin/noexist"; export completions_file="/etc/noexist"; [ \! \( -x "$geeqie_exe" -a -e "$completions_file" \) ] && echo failcase || echo bypass)
failcase
For bugs with existing features
shellcheck --versionor "online"): version: 0.11.0Here's a snippet or screenshot that shows the problem:
Here's what shellcheck currently says:
Here's what I wanted or expected to see:
This code runs as expected, and seems to be trivially correct