diff --git a/hosts b/hosts index d66f796..41c70e0 100755 --- a/hosts +++ b/hosts @@ -131,6 +131,12 @@ IFS="$SAFER_IFS" _VERSION="0.1.0-alpha" +# DEFAULT_COMMAND +# +# The command to be run by default, when no command name is specified. If the +# environment has an existing $DEFAULT_COMMAND set, then that value is used. +DEFAULT_COMMAND="${DEFAULT_COMMAND:-list}" + ############################################################################### # Debug ############################################################################### @@ -401,7 +407,7 @@ _main() { # If $cmd is blank, then set to help if [[ -z $cmd ]]; then - cmd="list" + cmd="$DEFAULT_COMMAND" fi # Load all of the commands.