From db7ac727f14bb3e65e52892c5818f899d411faaf Mon Sep 17 00:00:00 2001 From: William Melody Date: Wed, 1 Mar 2017 20:21:06 -0800 Subject: [PATCH] Rename `$DEFAULT_COMMAND` to `$HOSTS_DEFAULT_COMMAND`. --- hosts | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/hosts b/hosts index 5a80737..aec082e 100755 --- a/hosts +++ b/hosts @@ -38,11 +38,12 @@ IFS=$'\n\t' _VERSION="2.3.1" -# DEFAULT_COMMAND +# $HOSTS_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}" +# environment has an existing `$HOSTS_DEFAULT_COMMAND` set, then that value is +# used. +HOSTS_DEFAULT_COMMAND="${HOSTS_DEFAULT_COMMAND:-list}" # HOSTS_PATH # @@ -358,10 +359,10 @@ _main() { _debug printf "main(): entering...\n" _debug printf "main() \${_CMD} (upon entering): %s\n" "${_CMD}" - # If $_CMD is blank, then set to `$DEFAULT_COMMAND` + # If $_CMD is blank, then set to `$HOSTS_DEFAULT_COMMAND` if [[ -z ${_CMD} ]] then - _CMD="${DEFAULT_COMMAND}" + _CMD="${HOSTS_DEFAULT_COMMAND}" fi # Load all of the commands. @@ -377,7 +378,7 @@ _main() { _parameters+=("${_CMD}") _parameters+=(${_COMMAND_PARAMETERS[@]:-}) - "${DEFAULT_COMMAND}" "${_parameters[@]:-}" + "${HOSTS_DEFAULT_COMMAND}" "${_parameters[@]:-}" fi }