diff --git a/hosts b/hosts index 259d8c0..dac89f2 100755 --- a/hosts +++ b/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