refactring: conditions of if statement unify [[ expression ]] and collect local variable declaration
add: missing subcommand, print error message