1
0
Fork 0
mirror of synced 2024-05-24 19:15:21 -04:00
zimfw/src/stage2/31_zimfw_source_zimrc.zsh.erb
Eric Nielsen e097e6bf71
Add list action, don't run tool on external module
Using the `list` action with `-v` shows all current details for the
existing modules.
Don't try to install or update external modules, since they have an
absolute path instead of a valid URL.
2021-09-19 13:37:13 -05:00

13 lines
413 B
Plaintext

_zimfw_source_zimrc() {
local -r ztarget=<%= home %>/.zimrc _zflags=${1} _zargs_action=${2}
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 && ${#_zmodules_zargs} == 0 )); then
print -u2 -PR "%F{red}<%= failed %>No modules defined in %B${ztarget}%b%f"
return 1
fi
}