I'm running shellcheck on my scripts and often get this warning (which in this case is correct, because cd foo bar baz
makes no sense):
cd ${SOME_DIR} || exit 1
^-- SC2046: Quote this to prevent word splitting.
This warning is mostly a good one. One exception when the variable contains multiple arguments:
gcc ${OPTIONS} ...
^-- SC2046: Quote this to prevent word splitting.
Is there a convention for being more explicit about intentional word splitting, possibly avoiding this shellcheck warning?