This way we can reorganize the rest of the function.
Signed-off-by: Felipe Contreras <redacted>
---
contrib/completion/git-completion.bash | 6 ++++--
contrib/completion/git-completion.zsh | 4 ++--
2 files changed, 6 insertions(+), 4 deletions(-)
diff --git a/contrib/completion/git-completion.bash b/contrib/completion/git-completion.bash
index 366f255dfc..ad67abff36 100644
--- a/contrib/completion/git-completion.bash
+++ b/contrib/completion/git-completion.bash
@@ -330,9 +330,11 @@ __gitcomp ()
{
local cur_="${3-$cur}"
+ if [[ "$cur_" == *= ]]; then
+ return
+ fi
+
case "$cur_" in
- *=)
- ;;
--no-*)
local c i=0 IFS=$' \t\n'
for c in $1; dodiff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index b9c2c75c79..4dd0a4d821 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -56,9 +56,9 @@ __gitcomp ()
local cur_="${3-$cur}"
+ [[ "$cur_" == *= ]] && return
+
case "$cur_" in
- *=)
- ;;
--no-*)
local c IFS=$' \t\n'
local -a array--
2.32.0