shellcheck.net
shellcheck.net copied to clipboard
Why is this "${varname}:?}" not flaged as an error
I stumbled upon this error introduced by my inapt fat fingers in a bash script:
function f { local v="${1}:?}" ... }
What I clearly meant was this:
function f { local v="${1:?}" ... }
But the extra, erroneous "}" in the local variable definition was not indicated by this otherwise excelent ShellCheck thingie.