# \[PATCH v2 18/45\] completion: zsh: fix for undefined completions

- From: Felipe Contreras \<hidden\>
- Date: 2021-06-18 18:26:03 
- List: git
- Page: https://ratatoskr.run/git/2021/06/7892625
- Thread: https://ratatoskr.run/git/2021/06/7892607/t.md

```text
The parseopt helper can generate the completions even if the function is
unspecified.

  git version --<tab>

Signed-off-by: Felipe Contreras <redacted>
---
 contrib/completion/git-completion.zsh | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/contrib/completion/git-completion.zsh b/contrib/completion/git-completion.zsh
index f60801741a..5cfbcfe7a2 100644
--- a/contrib/completion/git-completion.zsh
+++ b/contrib/completion/git-completion.zsh
@@ -141,6 +141,9 @@ __git_complete_command ()
 	if (( $+functions[$completion_func] )); then
 		emulate ksh -c $completion_func
 		return 0
+	elif emulate ksh -c "__git_support_parseopt_helper $command"; then
+		emulate ksh -c "__git_complete_common $command"
+		return 0
 	else
 		return 1
 	fi
-- 
2.32.0

```
