Commit Graph

5 Commits

Author SHA1 Message Date
Eric Nielsen cfc955c9fd
Deprecate compile in background via login_init.zsh
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
2022-01-10 09:29:32 -05:00
Eric Nielsen a5fb148ccf
Force local zsh emulation options
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.
2021-11-21 14:39:20 -05:00
Eric Nielsen 99e6b31891
Init and compile local modules in their directories
instead of requiring that they're installed inside ZIM_HOME.

Fixes #399
2020-06-09 21:34:21 -05:00
Eric Nielsen ae3e71cb84
Don't create function digest files
At least until Zsh version 5.7.1, no performance improvement is observed
out of using those.

In some cases, the performance is even worsened, like when using

    autoload -w functions_digest.zwc

instead of

    autoload func_name1 func_name2 ...
2020-01-02 12:58:04 -05:00
Eric Nielsen aade4704b1
Generate login_init.zsh file
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.
2020-01-02 12:58:04 -05:00