mirror of
https://github.com/octoleo/hosts.git
synced 2025-01-01 13:41:50 +00:00
Improve code formatting.
This commit is contained in:
parent
16a95406fe
commit
16a672d52a
8
hosts
8
hosts
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user