diff --git a/init.zsh b/init.zsh index 6fa7a5f..0249117 100644 --- a/init.zsh +++ b/init.zsh @@ -37,10 +37,3 @@ zstyle -a ':omz:load' omodule 'omodules' omodload "$omodules[@]" unset omodules -# Compile the completion dump to increase startup speed. -dump_file="$HOME/.zcompdump" -if [[ "$dump_file" -nt "${dump_file}.zwc" || ! -s "${dump_file}.zwc" ]]; then - zcompile "$dump_file" -fi -unset dump_file - diff --git a/templates/zlogin b/templates/zlogin index 4697dee..8de491d 100644 --- a/templates/zlogin +++ b/templates/zlogin @@ -5,6 +5,13 @@ # Sorin Ionescu # +# Compile the completion dump to increase startup speed. +dump_file="$HOME/.zcompdump" +if [[ "$dump_file" -nt "${dump_file}.zwc" || ! -s "${dump_file}.zwc" ]]; then + zcompile "$dump_file" +fi +unset dump_file + # Set environment variables for launchd processes. if [[ "$OSTYPE" == darwin* ]]; then for env_var in PATH MANPATH; do