1
0
Fork 0
mirror of synced 2024-06-28 03:11:09 -04:00
zimfw/src/stage2/20_guard.zsh.erb
Eric Nielsen 26151d2f54
Remove prompt expansion from print statements
and replace the foreground color and bold expansions by ANSI escape
codes. This should make the print calls now safe and no expansion at all
should happen as we're using `-R` -- unless the `-e` flag is given.
Fixes #521. Closes #522
2023-09-16 13:21:14 -05:00

9 lines
428 B
Plaintext

autoload -Uz is-at-least && if ! is-at-least <%= min_zsh_version %>; then
print -u2 -R $'<%= red %>'${0}$': Error starting zimfw. You\'re using Zsh version <%= bold %>'${ZSH_VERSION}$'<%= normalred %> and versions < <%= bold %><%= min_zsh_version %><%= normalred %> are not supported. Upgrade your Zsh.<%= normal %>'
return 1
fi
autoload -Uz zargs
# Define zimfw location
if (( ! ${+ZIM_HOME} )) typeset -g ZIM_HOME=${0:h}