_zimfw_check_dumpfile() { local zdumpfile zline local -r zpre=$'*\0' local -r zfpath=(${${_zfpaths#${~zpre}}:A} ${fpath:|_zim_fpath}) local -r zcomps=(${^zfpath}/^([^_]*|*~|*.zwc(|.old))(N:t)) zstyle -s ':zim:completion' dumpfile 'zdumpfile' || zdumpfile=<%= home %>/.zcompdump if [[ -e ${zdumpfile} ]]; then IFS=$' \t' read -rA zline < ${zdumpfile} || return 1 if [[ ${zline[2]} -eq ${#zcomps} && ${zline[4]} == ${ZSH_VERSION} ]]; then _zimfw_print -PR "<%= okay %>%B${zdumpfile}:%b Already up to date" else _zimfw_print -PR "<%= okay %>%B${zdumpfile}:%b New completion configuration needs to be dumped. Will do %Bclean-dumpfile%b." _zimfw_clean_dumpfile fi else _zimfw_print -PR "<%= okay %>%B${zdumpfile}:%b Not found" fi _zimfw_print 'Done with check-dumpfile.' }