Idiomatic way to test if no positional params are given?

bash, command-line-arguments, conditional-statements, idioms, parameters

Solution

For me, the classical way is:

[[ $# -eq 0 ]]

Problem

What is the most idiomatic way in Bash to test if no positional parameters are given? There are so many ways to check this, I wonder if there is one preferred way. Some ways are: ``` ((! $# )) # check if $# is 'not true' (($# == 0)) # $# is 0 [[ ! $@ ]] # $@ is unset or null ```

Original source