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
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.
that have a slash, as that yields subdirectories. For example:
zmodule duration-info -n zimfw/duration-info
zmodule git-info -n zimfw/git-info
zmodule asciiship -n zimfw/asciiship
Had to remove ${DIR} before renaming ${dir_new} to ${DIR}.
Also also add ${REV} to the info file, in case we need it in the future,
when extracting Zim's degit as a standalone tool for example.
and rename previous to git.
Tools allow for different install and update scripts. The git tool does
what the previous implementation did (installs and updates using the git
client). The new tool installs and updates with the GitHub API, not
using the git client, but using curl/wget and tar instead.
Closes#373
`foo | sed 's?^.*/v??' | sort -n -t. -k1,1 -k2,2 -k3,3 | tail -n1` is
the same as `${${(On)${(f)"$(foo)"}##*v}[1]}`. We don't want to depend
on external tools that might not be available in all platforms.
to avoid conflicts when we have Zim modules made to also be compatible
with ohmyzsh, like https://github.com/zimfw/pvenv
We don't want to be affected by the noise a `${module_name}.plugin.zsh`
file creates, as we always want to source `init.zsh` when a module also
has a `functions` subdir. Hope this better protects us from the "wild
west out there".
We need to fetch all branches first to handle the scenario when the HEAD
remote branch was renamed. Recently repositories started changing their
HEAD branch names from master to main.
Fixes#424
The regression was introduced in commit 3567694. I wrongly assumed that
`git fetch -pq origin HEAD` would fetch from the remote default branch.
Fixes#423