kubeshop / testkube

☸️ Kubernetes-native testing framework for test execution and orchestration
https://testkube.io
Other
1.32k stars 129 forks source link

Zsh completion script is not working #964

Open aabedraba opened 2 years ago

aabedraba commented 2 years ago

Describe the bug When generating the completion scripts and installing it in zsh, the installed completion script does not work.

When I updated the file to reference the actual command, it worked.

Working changes can be seen below:

-#compdef _testkube testkube
+#compdef _kubectl-testkube kubectl-testkube

# zsh completion for testkube                             -*- shell-script -*-
...
-_testkube()
+_kubectl-testkube()
...
-if [ "$funcstack[1]" = "_testkube" ]; then
-        _testkube
+if [ "$funcstack[1]" = "_kubectl-testkube" ]; then
+        _kubectl-testkube
fi

To Reproduce On MacOS

Steps to reproduce the behavior:

  1. kubectl-testkube completion zsh > $fpath[1]
  2. exec zsh to reset terminal
  3. kubectl-testkube's completion not working

Expected behavior kubectl-testkube working

Version / Cluster

Screenshots If applicable, add CLI commands/output to help explain your problem.

Additional context Add any other context about the problem here.

TheBrunoLopes commented 2 years ago

Related to https://github.com/kubeshop/testkube/issues/1422