diff --git a/bash_completion b/bash_completion index 9564c2c5f0c..0e5552fbefe 100644 --- a/bash_completion +++ b/bash_completion @@ -972,7 +972,7 @@ _comp_finalize() fi # Call general finalizers - if ((${#BASH_COMPLETION_FINALIZE_HOOKS[@]})); then + if [[ ${BASH_COMPLETION_FINALIZE_HOOKS[*]+set} ]]; then for _comp_local_hook in "${BASH_COMPLETION_FINALIZE_HOOKS[@]}"; do eval -- "$_comp_local_hook" done