Skip to content

Commit d615051

Browse files
author
skywind3000
committed
improve compinit handling
1 parent f448f2a commit d615051

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

z.lua

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2205,7 +2205,9 @@ _zlua_zsh_tab_completion() {
22052205
local -a tmp=(${(f)"$(_zlua --complete "${words/_zlua/z}")"})
22062206
_describe "directory" tmp -U
22072207
}
2208-
compdef _zlua_zsh_tab_completion _zlua 2> /dev/null
2208+
if [ "${+functions[compdef]}" -ne 0 ]; then
2209+
compdef _zlua_zsh_tab_completion _zlua 2> /dev/null
2210+
fi
22092211
]]
22102212

22112213

0 commit comments

Comments
 (0)