Improve code formatting.

This commit is contained in:
William Melody 2020-05-17 11:10:12 -07:00
parent 16a95406fe
commit 16a672d52a
1 changed files with 47 additions and 45 deletions

8
hosts
View File

@ -881,7 +881,7 @@ backups() {
set +f
for __filename in $(cd "${_hosts_dirname}" && ls -1 hosts* 2> /dev/null)
do
if [[ "${__filename:-}" != "hosts" ]] && \
if [[ "${__filename:-}" != "hosts" ]] &&
[[ ! "${__filename:-}" =~ ^hosts_test..{6}$ ]]
then
_filenames+=("${__filename:-}")
@ -1367,7 +1367,8 @@ show() {
grep --invert-match "^#" "${HOSTS_PATH}" | grep "${1}" || true
)"
if [[ -z "${_disabled_records}" ]] && [[ -z "${_enabled_records}" ]]
if [[ -z "${_disabled_records}" ]] &&
[[ -z "${_enabled_records}" ]]
then
_return_1 printf "No matching entries.\\n"
fi
@ -1500,7 +1501,8 @@ do
*)
# The first non-option argument is assumed to be the command name.
# All subsequent arguments are added to $_COMMAND_ARGV.
if [[ -z "${_CMD:-}" ]] && [[ "${__opt:-}" =~ ${_SUBCOMMANDS_PATTERN} ]]
if [[ -z "${_CMD:-}" ]] &&
[[ "${__opt:-}" =~ ${_SUBCOMMANDS_PATTERN} ]]
then
_CMD="${__opt}"
else