dd84c41ae5
Changes: * Reduce the Zim "core" to a single file * Simplify installation with an installation script (Closes #182) * Put the configuration into .zshrc instead of a separate .zimrc (Closes #288) * Do not support themes that require promptinit (See #325) * Generate a static script that does autoload the functions and source the modules This version is not backwards-compatible with previous versions, so a new installation of Zim is required.
14 lines
502 B
Plaintext
14 lines
502 B
Plaintext
_zimfw_build_init() {
|
|
local -r ztarget=${ZIM_HOME}/init.zsh
|
|
# Force update of init.zsh if it's older than .zimrc
|
|
if [[ ${ztarget} -ot <%= home %>/.zimrc ]]; then
|
|
command mv -f ${ztarget}{,.old} || return 1
|
|
fi
|
|
_zimfw_mv =(
|
|
print -R "zimfw() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }"
|
|
(( ${#_zfpaths} )) && print -R 'fpath=('${_zfpaths:P}' ${fpath})'
|
|
(( ${#_zfunctions} )) && print -R 'autoload -Uz '${_zfunctions}
|
|
print -Rn ${(F):-source ${^_zscripts:P}}
|
|
) ${ztarget}
|
|
}
|