diff --git a/src/stage2/30_zmodule.zsh.erb b/src/stage2/30_zmodule.zsh.erb index 533fa3c..d335978 100644 --- a/src/stage2/30_zmodule.zsh.erb +++ b/src/stage2/30_zmodule.zsh.erb @@ -50,7 +50,6 @@ Initialization options: _zfailed=1 return 2 fi - setopt LOCAL_OPTIONS CASE_GLOB EXTENDED_GLOB local zurl=${1} zmodule=${1:t} ztool zdir ztype zrev zarg local -i zdisabled=0 zfrozen=0 local -a zfpaths zfunctions zcmds diff --git a/src/stage2/40_zimfw_version_check.zsh.erb b/src/stage2/40_zimfw_version_check.zsh.erb index 3c5b5d2..8b21b37 100644 --- a/src/stage2/40_zimfw_version_check.zsh.erb +++ b/src/stage2/40_zimfw_version_check.zsh.erb @@ -1,6 +1,5 @@ _zimfw_version_check() { if (( _zprintlevel > 0 )); then - setopt LOCAL_OPTIONS EXTENDED_GLOB local -r ztarget=${ZIM_HOME}/.latest_version # If .latest_version does not exist or was not modified in the last 30 days if [[ -w ${ztarget:h} && ! -f ${ztarget}(#qNm-30) ]]; then diff --git a/src/stage2/80_zimfw.zsh.erb b/src/stage2/80_zimfw.zsh.erb index 7f196ac..fd14545 100644 --- a/src/stage2/80_zimfw.zsh.erb +++ b/src/stage2/80_zimfw.zsh.erb @@ -1,4 +1,6 @@ zimfw() { + builtin emulate -L zsh + setopt EXTENDED_GLOB local -r _zversion='<%= version %>' zusage="Usage: %B${0}%b [%B-q%b|%B-v%b] Actions: diff --git a/src/templates/login_init.zsh.erb b/src/templates/login_init.zsh.erb index fad8904..485e02c 100644 --- a/src/templates/login_init.zsh.erb +++ b/src/templates/login_init.zsh.erb @@ -1,5 +1,6 @@ () { - setopt LOCAL_OPTIONS CASE_GLOB EXTENDED_GLOB + builtin emulate -L zsh + setopt EXTENDED_GLOB autoload -Uz zrecompile local zdumpfile zfile diff --git a/src/tools/degit.zsh.erb b/src/tools/degit.zsh.erb index 3fd861b..1bc9537 100644 --- a/src/tools/degit.zsh.erb +++ b/src/tools/degit.zsh.erb @@ -1,4 +1,6 @@ # This runs in a new shell +builtin emulate -L zsh +setopt EXTENDED_GLOB readonly -i PRINTLEVEL=${1} readonly ACTION=${2} MODULE=${3} DIR=${4} URL=${5} REV=${7} TEMP=.zdegit_${RANDOM} readonly TARBALL_TARGET=${DIR}/${TEMP}_tarball.tar.gz INFO_TARGET=${DIR}/.zdegit @@ -19,7 +21,6 @@ print_okay() { } download_tarball() { - setopt LOCAL_OPTIONS EXTENDED_GLOB local host repo if [[ ${URL} =~ <%= url_regex %> ]]; then host=${match[3]} diff --git a/src/tools/git.zsh.erb b/src/tools/git.zsh.erb index cf5cb81..c41633a 100644 --- a/src/tools/git.zsh.erb +++ b/src/tools/git.zsh.erb @@ -1,4 +1,5 @@ # This runs in a new shell +builtin emulate -L zsh readonly -i PRINTLEVEL=${1} readonly ACTION=${2} MODULE=${3} DIR=${4} URL=${5} TYPE=${6:=branch} SUBMODULES=1 REV=${7} diff --git a/zimfw.zsh b/zimfw.zsh index 8bb77a4..0ec6ad8 100644 --- a/zimfw.zsh +++ b/zimfw.zsh @@ -78,7 +78,8 @@ _zimfw_build_login_init() { fi _zimfw_mv =( print -nR "() { - setopt LOCAL_OPTIONS CASE_GLOB EXTENDED_GLOB + builtin emulate -L zsh + setopt EXTENDED_GLOB autoload -Uz zrecompile local zdumpfile zfile @@ -160,7 +161,6 @@ Initialization options: _zfailed=1 return 2 fi - setopt LOCAL_OPTIONS CASE_GLOB EXTENDED_GLOB local zurl=${1} zmodule=${1:t} ztool zdir ztype zrev zarg local -i zdisabled=0 zfrozen=0 local -a zfpaths zfunctions zcmds @@ -330,7 +330,6 @@ _zimfw_list_unuseds() { _zimfw_version_check() { if (( _zprintlevel > 0 )); then - setopt LOCAL_OPTIONS EXTENDED_GLOB local -r ztarget=${ZIM_HOME}/.latest_version # If .latest_version does not exist or was not modified in the last 30 days if [[ -w ${ztarget:h} && ! -f ${ztarget}(#qNm-30) ]]; then @@ -373,7 +372,7 @@ _zimfw_compile() { } _zimfw_info() { - print -R 'zimfw version: '${_zversion}' (built at 2021-11-15 16:43:17 UTC, previous commit is e060934)' + print -R 'zimfw version: '${_zversion}' (built at 2021-11-21 19:26:56 UTC, previous commit is de685e8)' print -R 'ZIM_HOME: '${ZIM_HOME} print -R 'Zsh version: '${ZSH_VERSION} print -R 'System info: '$(command uname -a) @@ -483,6 +482,8 @@ _zimfw_run_tool() { local zcmd case ${ztool} in degit) zcmd="# This runs in a new shell +builtin emulate -L zsh +setopt EXTENDED_GLOB readonly -i PRINTLEVEL=\${1} readonly ACTION=\${2} MODULE=\${3} DIR=\${4} URL=\${5} REV=\${7} TEMP=.zdegit_\${RANDOM} readonly TARBALL_TARGET=\${DIR}/\${TEMP}_tarball.tar.gz INFO_TARGET=\${DIR}/.zdegit @@ -503,7 +504,6 @@ print_okay() { } download_tarball() { - setopt LOCAL_OPTIONS EXTENDED_GLOB local host repo if [[ \${URL} =~ ^([^:@/]+://)?([^@]+@)?([^:/]+)[:/]([^/]+/[^/]+)/?\$ ]]; then host=\${match[3]} @@ -625,6 +625,7 @@ case \${ACTION} in esac " ;; git) zcmd="# This runs in a new shell +builtin emulate -L zsh readonly -i PRINTLEVEL=\${1} readonly ACTION=\${2} MODULE=\${3} DIR=\${4} URL=\${5} TYPE=\${6:=branch} SUBMODULES=1 REV=\${7} @@ -718,6 +719,8 @@ esac } zimfw() { + builtin emulate -L zsh + setopt EXTENDED_GLOB local -r _zversion='1.6.2-SNAPSHOT' zusage="Usage: %B${0}%b [%B-q%b|%B-v%b] Actions: