Previous change fixed the old dumpfile vs. new dumpfile check, but
removed an existing (but flawled) old Zim fpath vs. new Zim fpath check.
We should be doing both checks the right way now.
Show the value of some relevant environment variables instead of calling
uname, which might show private information like the host name.
Other minor fixes regarding output.
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
first because simpler is usually better, and second because we cannot
always guarantee that the .latest_comp file, which was holding the list
of all completion functions, is consistently in sync with the dumpfile
that is generated afterwards.
that removes the dumpfile if it's outdated, so it will get dumped again
when the shell starts next time. We're not using comdump because wrapped
ZLE widgets cannot or should not be identified by compdump when they
have a different name than the original one.
See https://github.com/zsh-users/zsh-syntax-highlighting/issues/851
Changes are:
* Don't compile in the background anymore, only via the `zimfw` tool
after actions where scripts can change (build, install, update)
* Move compilation of the completion dumpfile to the completion module:
9386a76eac/init.zsh (L10-L11)
* Don't compile users startup scripts anymore (.zshenv, .zshrc, etc.)
* Make output of `zimfw init` friendlier for the terminal startup
screen when called without `-q`.
See https://github.com/romkatv/zsh-bench/pull/11#issuecomment-994979683
and https://github.com/romkatv/zsh-bench#cutting-corners
Regarding not compiling users startup scripts anymore, I'm choosing to
only compile the modules' scripts at least for the reason that compile
won't happen so ofter anymore -- it will only happen when the user calls
the `zimfw` build, install or update actions. So it makes more sense to
only compile the files that `zimfw` has control over changes...
Closes#450
so the code is not broken by unexpected option changes, like
setopt RC_EXPAND_PARAM
which breaks
print -R 'fpath=('${${_zfpaths#${~zpre}}:A}' ${fpath})'
in the _zimfw_build_init function, for example.
See #444.
to avoid the horizontal scroll in the https://github.com/zimfw/zimfw
GitHub homepage, as GitHub made the width of the pre block further
narrower. (It's 94 characters now, was 97 before)
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.
listing modules that are frozen or exernal.
Also be less colorful. And some other minor fixes: allow autoloading a
function name that starts with `-`, and add required quotes around
command subsitution (otherwise words are split).
Fix computing the list of unused modules by using the full `_zdirs`
instead of just the `_zmodules` names. The fixed code was even simpler
and cleaner, which makes it even more satisfying. :- )
Show "not found" instead of "not installed" error when an external
module dir does not exist, since we don't install external modules.
For sake of simplicity, and also to distinguish warnings from errors.
So now we have:
* errors: output to stderr, are **not** silenced with `-q`
* warnings: output to stderr, are silenced with `-q`
* info: output to stdout, are silenced with `-q`
* solicited output (like help, info, or list): output to stdout, does
not make sense to be silenced with `-q`
We also only have warning in 3 situations so far... :- )
from the shell. This means getting
zmodule: Must be called from ${ZDOTDIR:-${HOME}}/.zimrc
and the full zmodule usage, instead of getting
zsh: command not found: zmodule
Fixes#430
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.
and ZIM_HOME is not. It can be reproduced with:
unset ZIM_HOME
setopt WARN_CREATE_GLOBAL
zimfw info
and the warning is:
zimfw.zsh:33: scalar parameter ZIM_HOME created globally in function zimfw