mirror of
https://github.com/octoleo/hosts.git
synced 2024-06-10 18:22:22 +00:00
Rename $DEFAULT_COMMAND
to $HOSTS_DEFAULT_COMMAND
.
This commit is contained in:
parent
6c0254895f
commit
db7ac727f1
13
hosts
13
hosts
|
@ -38,11 +38,12 @@ IFS=$'\n\t'
|
||||||
|
|
||||||
_VERSION="2.3.1"
|
_VERSION="2.3.1"
|
||||||
|
|
||||||
# DEFAULT_COMMAND
|
# $HOSTS_DEFAULT_COMMAND
|
||||||
#
|
#
|
||||||
# The command to be run by default, when no command name is specified. If the
|
# 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.
|
# environment has an existing `$HOSTS_DEFAULT_COMMAND` set, then that value is
|
||||||
DEFAULT_COMMAND="${DEFAULT_COMMAND:-list}"
|
# used.
|
||||||
|
HOSTS_DEFAULT_COMMAND="${HOSTS_DEFAULT_COMMAND:-list}"
|
||||||
|
|
||||||
# HOSTS_PATH
|
# HOSTS_PATH
|
||||||
#
|
#
|
||||||
|
@ -358,10 +359,10 @@ _main() {
|
||||||
_debug printf "main(): entering...\n"
|
_debug printf "main(): entering...\n"
|
||||||
_debug printf "main() \${_CMD} (upon entering): %s\n" "${_CMD}"
|
_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} ]]
|
if [[ -z ${_CMD} ]]
|
||||||
then
|
then
|
||||||
_CMD="${DEFAULT_COMMAND}"
|
_CMD="${HOSTS_DEFAULT_COMMAND}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Load all of the commands.
|
# Load all of the commands.
|
||||||
|
@ -377,7 +378,7 @@ _main() {
|
||||||
_parameters+=("${_CMD}")
|
_parameters+=("${_CMD}")
|
||||||
_parameters+=(${_COMMAND_PARAMETERS[@]:-})
|
_parameters+=(${_COMMAND_PARAMETERS[@]:-})
|
||||||
|
|
||||||
"${DEFAULT_COMMAND}" "${_parameters[@]:-}"
|
"${HOSTS_DEFAULT_COMMAND}" "${_parameters[@]:-}"
|
||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user