Commit Graph

6 Commits

Author SHA1 Message Date
Eric Nielsen 4b750cb72f
Fix zimfw failing in termux with NO_CASE_GLOB
that is set by the completion module.
This is a known still unsolved issue with termux.
See https://github.com/termux/termux-packages/issues/1894
2020-01-02 12:58:03 -05:00
Eric Nielsen 3ae4fec895
Use builtin cd -q
to bypass aliases and to avoid calling any chpwd hook functions.
2020-01-02 12:58:03 -05:00
Eric Nielsen eaebf1731c
Give credit to zrecompile doc in zshcontrib(1)
and make code closer to the one in the manual pages (unless for our code
style). Why reinvent the wheel?

This last change makes the arguments to zrecompile shorter (passing
relative paths instead of full paths to each function file).
The number of arguments can be huge. There are 1143 of them currently
for /usr/local/Cellar/zsh/5.7.1/share/zsh/functions!
2020-01-02 12:58:03 -05:00
Eric Nielsen 196a0585f7
Don't fail zimfw compile on empty fpath dir
otherwise it would fail with, for example

    zrecompile:zcompile:133: can't open file /usr/local/share/zsh/site-functions
2020-01-02 12:58:02 -05:00
Eric Nielsen dfe35e1bfa
Generate static init.zsh script \o/
to autoloads the functions and sources the scripts, instead of executing
zimfw during startup, and having it always figuring out what do to on
the fly.

This takes out the worry about zimfw interfering with the startup time,
and allows room to add more features to it. So, zstyle was replaced by a
custom zmodule function to define the modules, with the extra ability of
allowing users to set custom fpath paths, autoloaded functions and
sourced scripts per module.
2020-01-02 12:58:01 -05:00
Eric Nielsen 1980ca091d
Zim script in a single file \o/
Also moved the templates out of this repository, and into the
zimfw/install repo.

This is a second big change after introducing the plugin mechanism. This
makes installation and upgrading of Zim straightforward. Maybe the most
important aspect of having the script in a single file is not having to
manage "git repos inside git repos" (see #297), since the single file
exists by itself and is not version-controlled (with git).

I've implemented a two-stage sourcing of the file, so most of the file
is only sourced when needed (namely when calling `zimfw` with any action
other than `login-init`). The two-stage process is designed to avoid
compromising the startup speed, which is our top priority.

In an effort to help making the script maintainable, I've broken it into
small ERB templates. This also adds the ability to pre-process the Zsh
code with Ruby code. To build the script, use `make`.
2020-01-02 12:58:01 -05:00