mirror of
https://github.com/octoleo/hosts.git
synced 2024-11-24 21:57:35 +00:00
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
|
||||
# with an underscore or is one of the desc(), debug(), or die() functions,
|
||||
# since these are treated as having 'private' visibility.
|
||||
if ! ( [[ "${_function_name}" =~ ^_(.*) ]] || \
|
||||
if ! { [[ "${_function_name}" =~ ^_(.*) ]] || \
|
||||
[[ "${_function_name}" == "desc" ]] || \
|
||||
[[ "${_function_name}" == "debug" ]] || \
|
||||
[[ "${_function_name}" == "die" ]]
|
||||
)
|
||||
}
|
||||
then
|
||||
_DEFINED_COMMANDS+=("${_function_name}")
|
||||
fi
|
||||
|
Loading…
Reference in New Issue
Block a user