From e886442e7307d0f1bda8f353eb36d899045a9986 Mon Sep 17 00:00:00 2001 From: Price Hiller Date: Sat, 1 Jan 2022 02:32:01 -0600 Subject: [PATCH] Do not repeat completion --- Scripts/7D2D-Manage-Completion.bash | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/Scripts/7D2D-Manage-Completion.bash b/Scripts/7D2D-Manage-Completion.bash index 1c8a9c1..37d1ce0 100644 --- a/Scripts/7D2D-Manage-Completion.bash +++ b/Scripts/7D2D-Manage-Completion.bash @@ -1,9 +1,11 @@ #!/bin/bash -_7D2D_manage_completions() -{ - COMPREPLY=($(compgen -W "backup install kill list start update" "${COMP_WORDS[1]}")) +_7D2D_manage_completions() { + if [ "${#COMP_WORDS[@]}" != "2" ]; then + return + fi + + COMPREPLY=($(compgen -W "backup install kill list start update" "${COMP_WORDS[1]}")) } complete -F _7D2D_manage_completions 7D2D-Manage -