1
0
mirror of https://github.com/skywind3000/z.lua synced 2026-06-29 01:18:50 +00:00

improve compinit handling

This commit is contained in:
skywind3000
2020-03-08 00:14:04 +08:00
parent f448f2ab1f
commit d615051a10
+3 -1
View File
@@ -2205,7 +2205,9 @@ _zlua_zsh_tab_completion() {
local -a tmp=(${(f)"$(_zlua --complete "${words/_zlua/z}")"})
_describe "directory" tmp -U
}
compdef _zlua_zsh_tab_completion _zlua 2> /dev/null
if [ "${+functions[compdef]}" -ne 0 ]; then
compdef _zlua_zsh_tab_completion _zlua 2> /dev/null
fi
]]