diff --git a/src/stage1/50_zimfw_compile.zsh.erb b/src/stage1/50_zimfw_compile.zsh.erb index 5da66fa..b9ba0f6 100644 --- a/src/stage1/50_zimfw_compile.zsh.erb +++ b/src/stage1/50_zimfw_compile.zsh.erb @@ -12,12 +12,13 @@ _zimfw_compile() { # Compile .zshrc zrecompile -p ${1} <%= home %>/.zshrc || return 1 - # Compile autoloaded functions + # Compile autoloaded functions, taken from zrecompile doc in zshcontrib(1) for zdir in ${fpath}; do [[ ${zdir} == (.|..) || ${zdir} == (.|..)/* ]] && continue zfile=(${zdir}/^(*.*)(N-.)) if [[ -w ${zdir:h} && -n ${zfile} ]]; then - zrecompile -p ${1} ${zdir}.zwc ${zfile} || return 1 + zfile=(${${(M)zfile%/*/*}#/}) + (cd ${zdir:h} && zrecompile -p ${1} ${zdir:t}.zwc ${zfile}) || return 1 fi done diff --git a/zimfw.zsh b/zimfw.zsh index 40b0a96..80679b7 100644 --- a/zimfw.zsh +++ b/zimfw.zsh @@ -46,12 +46,13 @@ _zimfw_compile() { # Compile .zshrc zrecompile -p ${1} ${ZDOTDIR:-${HOME}}/.zshrc || return 1 - # Compile autoloaded functions + # Compile autoloaded functions, taken from zrecompile doc in zshcontrib(1) for zdir in ${fpath}; do [[ ${zdir} == (.|..) || ${zdir} == (.|..)/* ]] && continue zfile=(${zdir}/^(*.*)(N-.)) if [[ -w ${zdir:h} && -n ${zfile} ]]; then - zrecompile -p ${1} ${zdir}.zwc ${zfile} || return 1 + zfile=(${${(M)zfile%/*/*}#/}) + (cd ${zdir:h} && zrecompile -p ${1} ${zdir:t}.zwc ${zfile}) || return 1 fi done @@ -264,7 +265,7 @@ _zimfw_clean_dumpfile() { } _zimfw_info() { - print 'Zim version: 1.0.0-SNAPSHOT (previous commit is 69d609d)' + print 'Zim version: 1.0.0-SNAPSHOT (previous commit is 660b8cd)' print -R 'ZIM_HOME: '${ZIM_HOME} print -R 'Zsh version: '${ZSH_VERSION} print -R 'System info: '$(command uname -a)