1
0
Fork 0
mirror of synced 2024-06-16 22:01:09 -04:00
zimfw/src/stage2/31_zimfw_source_zimrc.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
386 B
Plaintext

_zimfw_source_zimrc() {
local -r ztarget=<%= home %>/.zimrc _zflags=${1}
local -i _zfailed=0
if ! source ${ztarget} || (( _zfailed )); then
print -u2 -PR "%F{red}<%= failed %>Failed to source %B${ztarget}%b%f"
return 1
fi
if (( _zflags & 1 && ${#_znames} == 0 )); then
print -u2 -PR "%F{red}<%= failed %>No modules defined in %B${ztarget}%b%f"
return 1
fi
}