mirror of https://github.com/octoleo/hosts.git
Use { ..; } instead of (..) to avoid subshell overhead.
ShellCheck SC2235: https://github.com/koalaman/shellcheck/wiki/SC2235
This commit is contained in:
parent
6b72e51651
commit
060306f28b
4
hosts
4
hosts
|
@ -271,11 +271,11 @@ _load_commands() {
|
||||||
# Add the function name to the $_DEFINED_COMMANDS array unless it starts
|
# Add the function name to the $_DEFINED_COMMANDS array unless it starts
|
||||||
# with an underscore or is one of the desc(), debug(), or die() functions,
|
# with an underscore or is one of the desc(), debug(), or die() functions,
|
||||||
# since these are treated as having 'private' visibility.
|
# since these are treated as having 'private' visibility.
|
||||||
if ! ( [[ "${_function_name}" =~ ^_(.*) ]] || \
|
if ! { [[ "${_function_name}" =~ ^_(.*) ]] || \
|
||||||
[[ "${_function_name}" == "desc" ]] || \
|
[[ "${_function_name}" == "desc" ]] || \
|
||||||
[[ "${_function_name}" == "debug" ]] || \
|
[[ "${_function_name}" == "debug" ]] || \
|
||||||
[[ "${_function_name}" == "die" ]]
|
[[ "${_function_name}" == "die" ]]
|
||||||
)
|
}
|
||||||
then
|
then
|
||||||
_DEFINED_COMMANDS+=("${_function_name}")
|
_DEFINED_COMMANDS+=("${_function_name}")
|
||||||
fi
|
fi
|
||||||
|
|
Loading…
Reference in New Issue