1
0
Fork 0
mirror of synced 2024-05-24 19:15:21 -04:00
zimfw/src/stage2/20_guard.zsh.erb
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

8 lines
291 B
Plaintext

autoload -Uz is-at-least && if ! is-at-least <%= min_zsh_version %>; then
print -u2 -R "${0}: Error starting Zim. You're using Zsh version ${ZSH_VERSION} and versions < <%= min_zsh_version %> are not supported. Update your Zsh."
return 1
fi
# Define Zim location
: ${ZIM_HOME=${0:A:h}}