Rename to make life easier in install script
This rename allows the install script to do a simple copy instead of having to rename the files first. This improves install script reliability (KISS).
This commit is contained in:
parent
f818b1c787
commit
aca4951ea3
4 changed files with 34 additions and 38 deletions
|
@ -1,4 +1,4 @@
|
||||||
|
# .zimrc
|
||||||
|
|
||||||
#################
|
#################
|
||||||
# CORE SETTINGS #
|
# CORE SETTINGS #
|
|
@ -1,5 +1,4 @@
|
||||||
|
# .zlogin
|
||||||
|
|
||||||
#
|
#
|
||||||
# startup file read in interactive login shells
|
# startup file read in interactive login shells
|
||||||
#
|
#
|
||||||
|
@ -7,53 +6,53 @@
|
||||||
# This includes zcompile, zcompdump, etc.
|
# This includes zcompile, zcompdump, etc.
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# # # old settings go here
|
||||||
|
|
||||||
(
|
(
|
||||||
# Function to determine the need of a zcompile. If the .zwc file
|
# Function to determine the need of a zcompile. If the .zwc file
|
||||||
# does not exist, or the base file is newer, we need to compile.
|
# does not exist, or the base file is newer, we need to compile.
|
||||||
# These jobs are asynchronous, and will not impact the interactive shell
|
# These jobs are asynchronous, and will not impact the interactive shell
|
||||||
zcompare() {
|
zcompare() {
|
||||||
if [[ -s ${1} && ( ! -s ${1}.zwc || ${1} -nt ${1}.zwc) ]]; then
|
if [[ -s ${1} && ( ! -s ${1}.zwc || ${1} -nt ${1}.zwc) ]]; then
|
||||||
zcompile ${1}
|
zcompile ${1};
|
||||||
fi
|
fi;
|
||||||
}
|
}
|
||||||
|
|
||||||
zim_mods=${ZDOTDIR:-${HOME}}/.zim/modules
|
ZIM_MODS=${ZDOTDIR:-${HOME}}/.zim/modules
|
||||||
setopt EXTENDED_GLOB
|
setopt EXTENDED_GLOB
|
||||||
|
|
||||||
# zcompile the completion cache; siginificant speedup.
|
# zcompile the completion cache; siginificant speedup.
|
||||||
for file in ${ZDOTDIR:-${HOME}}/.zcomp^(*.zwc)(.); do
|
for file in ${ZDOTDIR:-${HOME}}/.zcomp^(*.zwc)(.); do
|
||||||
zcompare ${file}
|
zcompare ${file};
|
||||||
done
|
done;
|
||||||
|
|
||||||
# zcompile .zshrc
|
# zcompile .zshrc
|
||||||
zcompare ${ZDOTDIR:-${HOME}}/.zshrc
|
zcompare ${ZDOTDIR:-${HOME}}/.zshrc
|
||||||
|
|
||||||
# zcompile some light module init scripts
|
# zcompile some light module init scripts
|
||||||
zcompare ${zim_mods}/git/init.zsh
|
zcompare ${ZIM_MODS}/git/init.zsh
|
||||||
zcompare ${zim_mods}/utility/init.zsh
|
zcompare ${ZIM_MODS}/utility/init.zsh
|
||||||
zcompare ${zim_mods}/pacman/init.zsh
|
zcompare ${ZIM_MODS}/pacman/init.zsh
|
||||||
zcompare ${zim_mods}/spectrum/init.zsh
|
zcompare ${ZIM_MODS}/spectrum/init.zsh
|
||||||
zcompare ${zim_mods}/completion/init.zsh
|
zcompare ${ZIM_MODS}/completion/init.zsh
|
||||||
zcompare ${zim_mods}/fasd/init.zsh
|
zcompare ${ZIM_MODS}/fasd/init.zsh
|
||||||
|
|
||||||
# zcompile all .zsh files in the custom module
|
# zcompile all .zsh files in the custom module
|
||||||
for file in ${zim_mods}/custom/**/^(README.md|*.zwc)(.); do
|
for file in ${ZIM_MODS}/custom/**/^(README.md|*.zwc)(.); do
|
||||||
zcompare ${file}
|
zcompare ${file};
|
||||||
done
|
done;
|
||||||
|
|
||||||
# zcompile all autoloaded functions
|
# zcompile all autoloaded functions
|
||||||
for file in ${zim_mods}/**/functions/^(*.zwc)(.); do
|
for file in ${ZIM_MODS}/**/functions/^(*.zwc)(.); do
|
||||||
zcompare ${file}
|
zcompare ${file};
|
||||||
done
|
done;
|
||||||
|
|
||||||
# syntax-highlighting
|
# syntax-highlighting
|
||||||
for file in ${zim_mods}/syntax-highlighting/external/highlighters/**/*.zsh; do
|
for file in ${ZIM_MODS}/syntax-highlighting/external/highlighters/**/*.zsh; do
|
||||||
zcompare ${file}
|
zcompare ${file};
|
||||||
done
|
done;
|
||||||
zcompare ${zim_mods}/syntax-highlighting/external/zsh-syntax-highlighting.zsh
|
zcompare ${ZIM_MODS}/syntax-highlighting/external/zsh-syntax-highlighting.zsh
|
||||||
|
|
||||||
# zsh-histery-substring-search
|
# zsh-histery-substring-search
|
||||||
zcompare ${zim_mods}/history-substring-search/external/zsh-history-substring-search.zsh
|
zcompare ${ZIM_MODS}/history-substring-search/external/zsh-history-substring-search.zsh
|
||||||
|
|
||||||
|
|
||||||
) &!
|
) &!
|
8
templates/.zshrc
Normal file
8
templates/.zshrc
Normal file
|
@ -0,0 +1,8 @@
|
||||||
|
# .zshrc
|
||||||
|
|
||||||
|
# # # old settings go here # # #
|
||||||
|
|
||||||
|
# # # load Zim # # #
|
||||||
|
if [[ -s ${ZDOTDIR:-${HOME}}/.zim/init.zsh ]]; then
|
||||||
|
source ${ZDOTDIR:-${HOME}}/.zim/init.zsh;
|
||||||
|
fi;
|
|
@ -1,11 +0,0 @@
|
||||||
|
|
||||||
|
|
||||||
#
|
|
||||||
# User configuration sourced by interactive shells
|
|
||||||
#
|
|
||||||
|
|
||||||
# Source zim
|
|
||||||
if [[ -s ${ZDOTDIR:-${HOME}}/.zim/init.zsh ]]; then
|
|
||||||
source ${ZDOTDIR:-${HOME}}/.zim/init.zsh
|
|
||||||
fi
|
|
||||||
|
|
Loading…
Reference in a new issue