Updated Plugin Loading
This commit is contained in:
parent
56b61e211d
commit
6c0f899c16
2 changed files with 28 additions and 9 deletions
18
init.zsh
18
init.zsh
|
@ -30,12 +30,20 @@ fi
|
||||||
# Initialize modules
|
# Initialize modules
|
||||||
() {
|
() {
|
||||||
local zmodule
|
local zmodule
|
||||||
|
|
||||||
for zmodule (${zmodules}); do
|
for zmodule (${zmodules}); do
|
||||||
if [[ -s ${ZIM_HOME}/modules/${zmodule}/init.zsh ]]; then
|
local zmodule_dir=${ZIM_HOME}/modules/${zmodule}
|
||||||
source ${ZIM_HOME}/modules/${zmodule}/init.zsh
|
if [[ ! -d ${zmodule_dir} ]]; then
|
||||||
elif [[ ! -d ${ZIM_HOME}/modules/${zmodule} ]]; then
|
|
||||||
print "No such module \"${zmodule}\"." >&2
|
print "No such module \"${zmodule}\"." >&2
|
||||||
|
else
|
||||||
|
for zmodule_file (${zmodule_dir}/{,zsh-}${zmodule}.zsh-theme \
|
||||||
|
${zmodule_dir}/init.zsh \
|
||||||
|
${zmodule_dir}/{,zsh-}${zmodule}.plugin.zsh \
|
||||||
|
${zmodule_dir}/{,zsh-}${zmodule}.{z,}sh); do
|
||||||
|
if [[ -f ${zmodule_file} ]]; then
|
||||||
|
source ${zmodule_file}
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
}
|
}
|
||||||
|
@ -78,4 +86,4 @@ Actions:
|
||||||
*) print ${usage}; return 1
|
*) print ${usage}; return 1
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
|
@ -24,10 +24,21 @@
|
||||||
done
|
done
|
||||||
|
|
||||||
# zcompile enabled module init scripts
|
# zcompile enabled module init scripts
|
||||||
for file in ${ZIM_HOME}/modules/${^zmodules}/init.zsh(-.N); do
|
local zmodule
|
||||||
zrecompile -pq ${file}
|
for zmodule (${zmodules}); do
|
||||||
|
local zmodule_dir=${ZIM_HOME}/modules/${zmodule}
|
||||||
|
if [[ -d ${zmodule_dir} ]]; then
|
||||||
|
for zmodule_file (${zmodule_dir}/{,zsh-}${zmodule}.zsh-theme \
|
||||||
|
${zmodule_dir}/init.zsh \
|
||||||
|
${zmodule_dir}/{,zsh-}${zmodule}.plugin.zsh \
|
||||||
|
${zmodule_dir}/{,zsh-}${zmodule}.{z,}sh); do
|
||||||
|
if [[ -f ${zmodule_file} ]]; then
|
||||||
|
zrecompile -pq ${zmodule_file}
|
||||||
|
break
|
||||||
|
fi
|
||||||
|
done
|
||||||
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
# zcompile all prompt setup scripts
|
# zcompile all prompt setup scripts
|
||||||
for file in ${ZIM_HOME}/modules/prompt/functions/prompt_*_setup; do
|
for file in ${ZIM_HOME}/modules/prompt/functions/prompt_*_setup; do
|
||||||
zrecompile -pq ${file}
|
zrecompile -pq ${file}
|
||||||
|
@ -42,4 +53,4 @@
|
||||||
# zsh-histery-substring-search
|
# zsh-histery-substring-search
|
||||||
zrecompile -pq ${ZIM_HOME}/modules/history-substring-search/external/zsh-history-substring-search.zsh
|
zrecompile -pq ${ZIM_HOME}/modules/history-substring-search/external/zsh-history-substring-search.zsh
|
||||||
|
|
||||||
) &!
|
) &!
|
Loading…
Add table
Reference in a new issue