mirror of
https://github.com/octoleo/hosts.git
synced 2025-01-17 02:55:12 +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
|
set +f
|
||||||
for __filename in $(cd "${_hosts_dirname}" && ls -1 hosts* 2> /dev/null)
|
for __filename in $(cd "${_hosts_dirname}" && ls -1 hosts* 2> /dev/null)
|
||||||
do
|
do
|
||||||
if [[ "${__filename:-}" != "hosts" ]] && \
|
if [[ "${__filename:-}" != "hosts" ]] &&
|
||||||
[[ ! "${__filename:-}" =~ ^hosts_test..{6}$ ]]
|
[[ ! "${__filename:-}" =~ ^hosts_test..{6}$ ]]
|
||||||
then
|
then
|
||||||
_filenames+=("${__filename:-}")
|
_filenames+=("${__filename:-}")
|
||||||
@ -1367,7 +1367,8 @@ show() {
|
|||||||
grep --invert-match "^#" "${HOSTS_PATH}" | grep "${1}" || true
|
grep --invert-match "^#" "${HOSTS_PATH}" | grep "${1}" || true
|
||||||
)"
|
)"
|
||||||
|
|
||||||
if [[ -z "${_disabled_records}" ]] && [[ -z "${_enabled_records}" ]]
|
if [[ -z "${_disabled_records}" ]] &&
|
||||||
|
[[ -z "${_enabled_records}" ]]
|
||||||
then
|
then
|
||||||
_return_1 printf "No matching entries.\\n"
|
_return_1 printf "No matching entries.\\n"
|
||||||
fi
|
fi
|
||||||
@ -1500,7 +1501,8 @@ do
|
|||||||
*)
|
*)
|
||||||
# The first non-option argument is assumed to be the command name.
|
# The first non-option argument is assumed to be the command name.
|
||||||
# All subsequent arguments are added to $_COMMAND_ARGV.
|
# All subsequent arguments are added to $_COMMAND_ARGV.
|
||||||
if [[ -z "${_CMD:-}" ]] && [[ "${__opt:-}" =~ ${_SUBCOMMANDS_PATTERN} ]]
|
if [[ -z "${_CMD:-}" ]] &&
|
||||||
|
[[ "${__opt:-}" =~ ${_SUBCOMMANDS_PATTERN} ]]
|
||||||
then
|
then
|
||||||
_CMD="${__opt}"
|
_CMD="${__opt}"
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user