1
0
Fork 0
mirror of synced 2024-06-01 14:51:11 -04:00
zimfw/src/stage2/50_zimfw_compile.zsh.erb
Eric Nielsen 5bcfb8cc9f
Override repository options along zmodule calls
for the same module name. Other minor fixes:
* Show skipping already installed modules with install action and `-v`.
* Consider external module dirs when calling compile action directly, by
  making sure _zimfw_source_zimrc is called first.
* Ignore return value from `zargs` with `-P`, as it's oddly returning
  123 since Zsh 5.9. Maybe related to these changes:
  67f932e7c5
2022-05-17 18:43:59 -05:00

13 lines
478 B
Plaintext

_zimfw_compile() {
# Array with unique dirs. ${ZIM_HOME} or any subdirectory should only occur once.
local -Ur zscriptdirs=(${ZIM_HOME} ${${(v)_zdirs##${ZIM_HOME}/*}:A})
# Compile Zim scripts
local zfile
for zfile in ${^zscriptdirs}/(^*test*/)#*.zsh(|-theme)(N-.); do
if [[ ! ${zfile}.zwc -nt ${zfile} ]]; then
zcompile -R ${zfile} && _zimfw_print -PR "<%= okay %>%B${zfile}.zwc:%b Compiled"
fi
done
_zimfw_print -P '<%= done %>Done with compile.'
}