click-contrib / click-completion

Add or enhance bash, fish, zsh and powershell completion in Click
MIT License
288 stars 32 forks source link

Fix context check in `zsh` completion template #42

Closed marlonrichert closed 2 years ago

marlonrichert commented 3 years ago

The old check worked correctly only when evaling the template output. If the old template output was redirected to file and then sourced or added to $fpath and picked up by compinit, completion would fail to start. This commit fixes that.

Konubinix commented 2 years ago

I don't use zsh, but the use case sounds legit to me. Accepting by default :-).