1
0
mirror of https://github.com/octoleo/hosts.git synced 2024-12-28 04:05:00 +00:00

Rename global variable to $HOSTS_DEFAULT_SUBCOMMAND.

This commit is contained in:
William Melody 2020-06-07 14:39:18 -07:00
parent bf65fbcad8
commit 28fea3a599

8
hosts
View File

@ -59,10 +59,12 @@ _VERSION="3.5.1"
# This program's basename.
_ME="$(basename "${0}")"
# $HOSTS_DEFAULT_COMMAND
# $HOSTS_DEFAULT_SUBCOMMAND
#
# The command to be run by default, when no command name is specified.
HOSTS_DEFAULT_COMMAND="${HOSTS_DEFAULT_COMMAND:-list}"
[[ -n "${HOSTS_DEFAULT_COMMAND:-}" ]] &&
HOSTS_DEFAULT_SUBCOMMAND="${HOSTS_DEFAULT_COMMAND}"
HOSTS_DEFAULT_SUBCOMMAND="${HOSTS_DEFAULT_SUBCOMMAND:-list}"
# $HOSTS_PATH
#
@ -1650,7 +1652,7 @@ _main() {
if [[ -z "${_SUBCOMMAND}" ]]
then
_SUBCOMMAND="${HOSTS_DEFAULT_COMMAND}"
_SUBCOMMAND="${HOSTS_DEFAULT_SUBCOMMAND}"
fi
_load_commands