From 8e9438d7159c677ef4b7691c6842bc6bdbb164ac Mon Sep 17 00:00:00 2001 From: John D Pell Date: Sun, 19 Sep 2021 21:30:35 -0700 Subject: [PATCH] completion/hub: use `_command_exists` --- completion/available/hub.completion.bash | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/completion/available/hub.completion.bash b/completion/available/hub.completion.bash index 74c530a8..67a5e29b 100644 --- a/completion/available/hub.completion.bash +++ b/completion/available/hub.completion.bash @@ -23,12 +23,12 @@ # WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. # If there is no git tab completion, but we have the _completion loader try to load it -if ! declare -F _git > /dev/null && declare -F _completion_loader > /dev/null; then +if ! _is_function _git && _is_function _completion_loader; then _completion_loader git fi # Check that git tab completion is available and we haven't already set up completion -if declare -F _git > /dev/null && ! declare -F __git_list_all_commands_without_hub > /dev/null; then +if _is_function _git && ! _is_function __git_list_all_commands_without_hub; then # Duplicate and rename the 'list_all_commands' function eval "$(declare -f __git_list_all_commands | \ sed 's/__git_list_all_commands/__git_list_all_commands_without_hub/')"