This was needed when we were using xargs, but we're already using zargs
instead for quite some time. Pro is that now common functions are reused
instead of repeated. Con (or change) is that due to that reuse, and in
favor of simplification, the warning for a module with git submodules in
degit is in a separate line from a separate print call now.
Also fix regressions from recent commits:
- Need to call _zimfw_source_zimrc twice with 1 and 2 flags instead of
with flag 3, since flag 2 must be used after module is installed or
updated.
- Need to call _zimfw_print_okay from the function that handles on-pull,
since we want to include the on-pull output in verbose mode. This
function was called just `handle` before, now it's called
_zimfw_pull_print_okay.
Still need to figure out how to return a final error code from
_zimfw_run_tool_action.
This fixes a regression introduced in commit b1edcf34d0.
Also don't use any option after `-R` just to be safe. The zshbuiltins(1)
manual states:
> Only the -e and -n flags are recognized after -R; all other arguments
> and options are printed.
and also simplify code by setting multiple variables at once. This
should make the resulting script a tiny bit smaller, while not
compromising on legibility.
as we do for init.zsh, so behavior is symmetric. This guarantees that
both init.zsh and login_init.zsh will always have newer timestamps than
.zimrc after a build.
Pattern must match from the beginning (`##`).
Also don't quote ${ZIM_HOME}. We don't want to have an array like
('${ZIM_HOME}' '/path/to/zim_home'), so it needs to be unquoted for the
uniqueness to work.
So we can have the following code in the zlogin template:
source ${ZIM_HOME}/login_init.zsh -q &!
instead of depending on the zimfw function there. This allows fixing the
issue were a non-interactive login shell currently yields:
command not found: zimfw.
To fully fix the issue, we also need a new zshenv template containing:
ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
Templates will be updated in the install script.