From bcae8c0a06bbebf45e7ea06f623406d0804791e8 Mon Sep 17 00:00:00 2001 From: Eric Nielsen Date: Mon, 4 Jan 2021 21:20:03 -0500 Subject: [PATCH] Set default ztype in update.zsh.erb since we're already setting the default zrev in there too. Leave both blank in zmodule if they're not set by the user. --- src/stage2/30_zmodule.zsh.erb | 4 ++-- src/tools/update.zsh.erb | 2 +- zimfw.zsh | 10 +++++----- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/src/stage2/30_zmodule.zsh.erb b/src/stage2/30_zmodule.zsh.erb index db231f3..29dced0 100644 --- a/src/stage2/30_zmodule.zsh.erb +++ b/src/stage2/30_zmodule.zsh.erb @@ -39,7 +39,7 @@ Initialization options: fi setopt LOCAL_OPTIONS CASE_GLOB EXTENDED_GLOB local zmodule=${1:t} zurl=${1} - local ztype=branch zrev + local ztype zrev local -i zdisabled=0 zfrozen=0 local -a zfpaths zfunctions zcmds local zarg zdir @@ -121,7 +121,7 @@ Initialization options: done if (( _zprepare_zargs )); then if (( ! zfrozen )); then - _zmodules_zargs+=(${zmodule} ${zdir} ${zurl} ${ztype} "${zrev}" ${_zprintlevel}) + _zmodules_zargs+=(${zmodule} ${zdir} ${zurl} "${ztype}" "${zrev}" ${_zprintlevel}) fi else if (( zdisabled )); then diff --git a/src/tools/update.zsh.erb b/src/tools/update.zsh.erb index ce6cb60..fbd1a39 100644 --- a/src/tools/update.zsh.erb +++ b/src/tools/update.zsh.erb @@ -2,7 +2,7 @@ readonly MODULE=${1} readonly DIR=${2} readonly URL=${3} -readonly TYPE=${4} +readonly TYPE=${4:=branch} readonly REV=${5:=HEAD} readonly -i PRINTLEVEL=${6} readonly CLEAR_LINE=$'\E[2K\r' diff --git a/zimfw.zsh b/zimfw.zsh index 0f8c2af..746e5cb 100644 --- a/zimfw.zsh +++ b/zimfw.zsh @@ -4,7 +4,7 @@ # MIT License # # Copyright (c) 2015-2016 Matt Hamilton and contributors -# Copyright (c) 2016-2020 Eric Nielsen, Matt Hamilton and contributors +# Copyright (c) 2016-2021 Eric Nielsen, Matt Hamilton and contributors # # Permission is hereby granted, free of charge, to any person obtaining a copy # of this software and associated documentation files (the "Software"), to deal @@ -146,7 +146,7 @@ Initialization options: fi setopt LOCAL_OPTIONS CASE_GLOB EXTENDED_GLOB local zmodule=${1:t} zurl=${1} - local ztype=branch zrev + local ztype zrev local -i zdisabled=0 zfrozen=0 local -a zfpaths zfunctions zcmds local zarg zdir @@ -228,7 +228,7 @@ Initialization options: done if (( _zprepare_zargs )); then if (( ! zfrozen )); then - _zmodules_zargs+=(${zmodule} ${zdir} ${zurl} ${ztype} "${zrev}" ${_zprintlevel}) + _zmodules_zargs+=(${zmodule} ${zdir} ${zurl} "${ztype}" "${zrev}" ${_zprintlevel}) fi else if (( zdisabled )); then @@ -319,7 +319,7 @@ _zimfw_compile() { } _zimfw_info() { - print -R 'zimfw version: '${_zversion}' (built at 2021-01-02 23:47:25 UTC, previous commit is 153c547)' + print -R 'zimfw version: '${_zversion}' (built at 2021-01-04 20:46:42 UTC, previous commit is 3567694)' print -R 'ZIM_HOME: '${ZIM_HOME} print -R 'Zsh version: '${ZSH_VERSION} print -R 'System info: '$(command uname -a) @@ -435,7 +435,7 @@ fi readonly MODULE=\${1} readonly DIR=\${2} readonly URL=\${3} -readonly TYPE=\${4} +readonly TYPE=\${4:=branch} readonly REV=\${5:=HEAD} readonly -i PRINTLEVEL=\${6} readonly CLEAR_LINE=$'\E[2K\r'