shellcheck
shellcheck copied to clipboard
`is-macos() [[ $OSTYPE == darwin* ]]` is valid Bash
I just realized that:
is-macos() [[ $OSTYPE == darwin* ]]
Is a valid Bash (3.2+) function definition.
A cleaner alternative to:
is-macos() ( [[ $OSTYPE == darwin* ]] )
or:
is-macos() { [[ $OSTYPE == darwin* ]]; }
shellcheck 0.8.0 gives:
is-macos() [[ $OSTYPE == darwin* ]]
^-- SC1064 (error): Expected a { to open the function definition.
^-- SC1072 (error): Fix any mentioned problems and try again.
Also valid Bash (3.2+):
big-num() (( $1 > 9 ))
Fortunately I can disable these for now.