From 3c96d0b8e136735ae91bbd52b7dd84757899ca05 Mon Sep 17 00:00:00 2001 From: Eric Nielsen Date: Tue, 2 Jan 2018 20:30:45 -0500 Subject: [PATCH] Revert "Also zrecompile functions starting with _" This reverts commit 07d32caaae7d6a7928f24d280443fe14687c8d13. Now I get the intention of not zcompiling or autoloading functions whose names start with `_` or `.`: these are indented to be used by the com- pletion system and dumped into the `.zcompdump ` file. See http://zsh.sourceforge.net/Doc/Release/Completion-System.html#index-compinit --- init.zsh | 2 +- login_init.zsh | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/init.zsh b/init.zsh index 054da30..514d29d 100755 --- a/init.zsh +++ b/init.zsh @@ -22,7 +22,7 @@ fi # autoload searches fpath for function locations; add enabled module function paths fpath=(${ZIM_HOME}/functions.zwc ${ZIM_HOME}/modules/prompt/functions ${fpath}) - for mod_function in ${ZIM_HOME}/modules/${^zmodules}/functions/^(prompt_*_setup|README*|*.zwc|*.zwc.old)(-.N:t); do + for mod_function in ${ZIM_HOME}/modules/${^zmodules}/functions/^([_.]*|prompt_*_setup|README*|*.zwc|*.zwc.old)(-.N:t); do autoload -Uz ${mod_function} done } diff --git a/login_init.zsh b/login_init.zsh index c809d27..c9fb88b 100755 --- a/login_init.zsh +++ b/login_init.zsh @@ -20,7 +20,7 @@ zrecompile -pq ${ZDOTDIR:-${HOME}}/.zshrc # zcompile enabled module autoloaded functions - zrecompile -pq ${ZIM_HOME}/functions ${ZIM_HOME}/modules/${^zmodules}/functions/^(prompt_*_setup|README*|*.zwc|*.zwc.old)(-.N) + zrecompile -pq ${ZIM_HOME}/functions ${ZIM_HOME}/modules/${^zmodules}/functions/^([_.]*|prompt_*_setup|README*|*.zwc|*.zwc.old)(-.N) # zcompile enabled module init scripts for zmodule (${zmodules}); do