diff options
Diffstat (limited to 'mingling_core')
| -rw-r--r-- | mingling_core/tmpls/comps/zsh.zsh | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/mingling_core/tmpls/comps/zsh.zsh b/mingling_core/tmpls/comps/zsh.zsh index f665133..7cf5f7b 100644 --- a/mingling_core/tmpls/comps/zsh.zsh +++ b/mingling_core/tmpls/comps/zsh.zsh @@ -61,8 +61,11 @@ _<<<bin_name>>>_completion() { fi } -compdef _<<<bin_name>>>_completion <<<bin_name>>> - -if [[ $? -ne 0 ]]; then +if (( $+functions[compdef] )); then + compdef _<<<bin_name>>>_completion <<<bin_name>>> + if [[ $? -ne 0 ]]; then + compctl -K _<<<bin_name>>>_completion <<<bin_name>>> + fi +else compctl -K _<<<bin_name>>>_completion <<<bin_name>>> fi |
