1
0
Fork 0
mirror of synced 2025-01-15 16:36:16 -05:00

Move down autoload -Uz zargs

to a more specific scope and closer to where it's being used.
This commit is contained in:
Eric Nielsen 2025-01-06 20:28:40 -05:00
parent 30ab012ad1
commit 4f1c59ae51
No known key found for this signature in database
GPG key ID: 678AF5E338C87D99
3 changed files with 3 additions and 3 deletions

View file

@ -2,7 +2,6 @@ autoload -Uz is-at-least && if ! is-at-least <%= min_zsh_version %>; then
print -u2 -R "${_zred}${0}: Error starting zimfw. You're using Zsh version ${_zbold}${ZSH_VERSION}${_znormalred} and versions < ${_zbold}<%= min_zsh_version %>${_znormalred} are not supported. Update your Zsh.${_znormal}" print -u2 -R "${_zred}${0}: Error starting zimfw. You're using Zsh version ${_zbold}${ZSH_VERSION}${_znormalred} and versions < ${_zbold}<%= min_zsh_version %>${_znormalred} are not supported. Update your Zsh.${_znormal}"
return 1 return 1
fi fi
autoload -Uz zargs
# Define zimfw location # Define zimfw location
typeset -g __ZIMFW_FILE=${0} typeset -g __ZIMFW_FILE=${0}

View file

@ -85,6 +85,7 @@ Options:
local -A _zfrozens _ztools _zdirs _zurls _ztypes _zrevs _zsubmodules _zonpulls _zifs local -A _zfrozens _ztools _zdirs _zurls _ztypes _zrevs _zsubmodules _zonpulls _zifs
local -a _zfpaths _zfunctions _zcmds _zunused_dirs local -a _zfpaths _zfunctions _zcmds _zunused_dirs
local _zrestartmsg=' Restart your terminal for changes to take effect.' local _zrestartmsg=' Restart your terminal for changes to take effect.'
autoload -Uz zargs
case ${1} in case ${1} in
build) build)
_zimfw_source_zimrc 1 && _zimfw_build || return 1 _zimfw_source_zimrc 1 && _zimfw_build || return 1

View file

@ -28,7 +28,6 @@ autoload -Uz is-at-least && if ! is-at-least 5.2; then
print -u2 -R "${_zred}${0}: Error starting zimfw. You're using Zsh version ${_zbold}${ZSH_VERSION}${_znormalred} and versions < ${_zbold}5.2${_znormalred} are not supported. Update your Zsh.${_znormal}" print -u2 -R "${_zred}${0}: Error starting zimfw. You're using Zsh version ${_zbold}${ZSH_VERSION}${_znormalred} and versions < ${_zbold}5.2${_znormalred} are not supported. Update your Zsh.${_znormal}"
return 1 return 1
fi fi
autoload -Uz zargs
# Define zimfw location # Define zimfw location
typeset -g __ZIMFW_FILE=${0} typeset -g __ZIMFW_FILE=${0}
@ -464,7 +463,7 @@ _zimfw_info() {
_zimfw_info_print_symlink ZIM_HOME ${ZIM_HOME} _zimfw_info_print_symlink ZIM_HOME ${ZIM_HOME}
_zimfw_info_print_symlink 'zimfw config' ${_zconfig} _zimfw_info_print_symlink 'zimfw config' ${_zconfig}
_zimfw_info_print_symlink 'zimfw script' ${__ZIMFW_FILE} _zimfw_info_print_symlink 'zimfw script' ${__ZIMFW_FILE}
print -R 'zimfw version: '${_zversion}' (built at 2025-01-07 01:10:19 UTC, previous commit is f51b548)' print -R 'zimfw version: '${_zversion}' (built at 2025-01-07 01:26:16 UTC, previous commit is 30ab012)'
local zparam local zparam
for zparam in LANG ${(Mk)parameters:#LC_*} OSTYPE TERM TERM_PROGRAM TERM_PROGRAM_VERSION ZSH_VERSION; do for zparam in LANG ${(Mk)parameters:#LC_*} OSTYPE TERM TERM_PROGRAM TERM_PROGRAM_VERSION ZSH_VERSION; do
print -R ${(r.22....:.)zparam}${(P)zparam} print -R ${(r.22....:.)zparam}${(P)zparam}
@ -1039,6 +1038,7 @@ Options:
local -A _zfrozens _ztools _zdirs _zurls _ztypes _zrevs _zsubmodules _zonpulls _zifs local -A _zfrozens _ztools _zdirs _zurls _ztypes _zrevs _zsubmodules _zonpulls _zifs
local -a _zfpaths _zfunctions _zcmds _zunused_dirs local -a _zfpaths _zfunctions _zcmds _zunused_dirs
local _zrestartmsg=' Restart your terminal for changes to take effect.' local _zrestartmsg=' Restart your terminal for changes to take effect.'
autoload -Uz zargs
case ${1} in case ${1} in
build) build)
_zimfw_source_zimrc 1 && _zimfw_build || return 1 _zimfw_source_zimrc 1 && _zimfw_build || return 1