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
gunzip should not try to seek the stream, but an issue was reported
in #407, where it fails with
gzip: stdin: unexpected end of file
So we're writing to a file first just to be safer.
Fixes#407.
instead of allowing xargs to execute the action with no positional
parameters.
Also don't try to write to .latest_version if there's no write
permission. This is supposed to be a background/optional operation, so
we don't want to show an error message in this case.
And use Zsh globs instead of find with -exec, and find won't fail if
there's an error with the -exec command.
before initial check for latest version. Not all versions of Zsh or all
OSs are affected. Error seen with Zsh 5.6.2 running on FreeBSD is:
_zimfw_version_check:10: no such file or directory: /path/to/.latest_version
Last-minute minor fixes:
* Delete .latest_version after upgrading. Having a cache brings in these
complexities.
* Print warning to stderr, to distinguish it from the normal output.
* Update help to be in sync with the README.md.
Zim does not use/modify .zprofile in it's templates. For completeness/
performance, the .zprofile should be compiled/cleaned if present.
Ref: http://zsh.sourceforge.net/Intro/intro_3.htmlCloses#358
It fails with
_zimfw_build_init:8: unrecognized modifier `P'
The `:P` modifier was introduced in Zsh 5.3. Replace it by `:A`, as we
still want to keep compatibility with Zsh 5.2.
Fixes#349