This commit is contained in:
Eric Nielsen 2021-08-10 09:56:25 -05:00
parent 35cd6f5f23
commit c51898fef0
No known key found for this signature in database
GPG Key ID: 47D1DBFA0765A1FB
7 changed files with 42 additions and 18 deletions

View File

@ -9,6 +9,19 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
_No unreleased changes._
## [1.5.0] - 2021-08-09
### Added
- Option to use the new `degit` tool in `zmodule`, that is able to install and update modules
from GitHub without requiring `git`. Modules are installed faster and take less disk space when
using this tool. It can be set as the default with `zstyle ':zim:zmodule' use 'degit'`.
### Fixed
- Force `core.autocrlf=false` when doing `git clone`.
(See [#404](https://github.com/zimfw/zimfw/issues/404))
- Allow uninstalling modules with custom names that have a slash.
## [1.4.3] - 2021-03-19
### Fixed
@ -174,7 +187,8 @@ Take your time to review the updated [README.md] and the changes listed below.
[termtitle]: https://github.com/zimfw/termtitle
[s1ck94]: https://github.com/zimfw/s1ck94
[Unreleased]: https://github.com/zimfw/zimfw/compare/v1.4.3...HEAD
[Unreleased]: https://github.com/zimfw/zimfw/compare/v1.5.0...HEAD
[1.5.0]: https://github.com/zimfw/zimfw/compare/v1.4.3...v1.5.0
[1.4.3]: https://github.com/zimfw/zimfw/compare/v1.4.2...v1.4.3
[1.4.2]: https://github.com/zimfw/zimfw/compare/v1.4.1...v1.4.2
[1.4.1]: https://github.com/zimfw/zimfw/compare/v1.4.0...v1.4.1

View File

@ -18,6 +18,11 @@ Repository options:
%B-u%b|%B--use%b <%%Bgit%b|%Bdegit%b> Install and update the module using the defined tool. Default is
defined by %Bzstyle ':zim:zmodule' use '%b<%%Bgit%b|%Bdegit%b>%B'%b, or %Bgit%b if none
is provided.
%Bgit%b requires git to be installed. Local changes are preserved during
updates.
%Bdegit%b requires curl or wget, and currently only works with GitHub
URLs. Modules install faster and take less disk space. Local changes
are lost during updates. Git submodules are not supported.
%B-z%b|%B--frozen%b Don't install or update the module.
Initialization options:
@ -149,8 +154,8 @@ Initialization options:
if (( ! ${#zfpaths} )) zfpaths=(${prezto_fpaths})
if (( ! ${#zcmds} )); then
# get script with largest size (descending `O`rder by `L`ength, and return only `[1]` first)
local -r zscript=(${zdir}/(init.zsh|${zmodule:t}.(zsh|plugin.zsh|zsh-theme|sh))(NOL[1]))
zcmds=("source ${^zscript[@]:A}")
local -ra zscripts=(${zdir}/(init.zsh|${zmodule:t}.(zsh|plugin.zsh|zsh-theme|sh))(NOL[1]))
zcmds=("source ${^zscripts[@]:A}")
fi
fi
if (( ! ${#zfunctions} )); then

View File

@ -5,5 +5,5 @@ _zimfw_clean_compiled() {
if (( _zprintlevel > 0 )) zopt='-v'
command rm -f ${zopt} ${^zscriptdirs}/**/*.zwc(|.old)(N) || return 1
command rm -f ${zopt} <%= home %>/<%= startup_files_glob %>.zwc(|.old)(N) || return 1
_zimfw_print -P '<%= done %>Done with clean-compiled. Run %Bzimfw compile%b to re-compile.'
_zimfw_print -P '<%= done %>Done with clean-compiled. Restart your terminal or run %Bzimfw compile%b to re-compile.'
}

View File

@ -13,8 +13,8 @@ Actions:
%Buninstall%b Delete unused modules
(prompts for confirmation)
%Bupdate%b Update current modules
%Bupgrade%b Upgrade %Bzimfw%b
%Bversion%b Print Zim version
%Bupgrade%b Upgrade zimfw
%Bversion%b Print zimfw version
Options:
%B-q%b Quiet (yes to prompts, and

View File

@ -29,7 +29,7 @@ download_tarball() {
repo=${match[4]%.git}
fi
if [[ ${host} != github.com || -z ${repo} ]]; then
print_error "${URL} is not a valid github.com URL. Will not try to ${ACTION}."
print_error "${URL} is not a valid GitHub URL. Will not try to ${ACTION}."
return 1
fi
local -r headers_target=${DIR}/${TEMP}_headers
@ -102,7 +102,7 @@ create_dir() {
case ${ACTION} in
install)
{
create_dir ${DIR} && download_tarball && untar_tarball ${DIR} && print_done installed
create_dir ${DIR} && download_tarball && untar_tarball ${DIR} && print_okay installed
} always {
# return 1 does not change ${TRY_BLOCK_ERROR}, only changes ${?}
(( TRY_BLOCK_ERROR = ? ))

View File

@ -4,7 +4,7 @@ class Zim
:clear_line, :ellipsis, :okay, :warn, :error, :done, :failed
def initialize
@version = "1.5.0-SNAPSHOT"
@version = "1.5.0"
@home = "${ZDOTDIR:-${HOME}}"
@min_zsh_version = "5.2"
@startup_files_glob = ".z(shenv|profile|shrc|login|logout)"

View File

@ -124,6 +124,11 @@ Repository options:
%B-u%b|%B--use%b <%Bgit%b|%Bdegit%b> Install and update the module using the defined tool. Default is
defined by %Bzstyle ':zim:zmodule' use '%b<%Bgit%b|%Bdegit%b>%B'%b, or %Bgit%b if none
is provided.
%Bgit%b requires git to be installed. Local changes are preserved during
updates.
%Bdegit%b requires curl or wget, and currently only works with GitHub
URLs. Modules install faster and take less disk space. Local changes
are lost during updates. Git submodules are not supported.
%B-z%b|%B--frozen%b Don't install or update the module.
Initialization options:
@ -255,8 +260,8 @@ Initialization options:
if (( ! ${#zfpaths} )) zfpaths=(${prezto_fpaths})
if (( ! ${#zcmds} )); then
# get script with largest size (descending `O`rder by `L`ength, and return only `[1]` first)
local -r zscript=(${zdir}/(init.zsh|${zmodule:t}.(zsh|plugin.zsh|zsh-theme|sh))(NOL[1]))
zcmds=("source ${^zscript[@]:A}")
local -ra zscripts=(${zdir}/(init.zsh|${zmodule:t}.(zsh|plugin.zsh|zsh-theme|sh))(NOL[1]))
zcmds=("source ${^zscripts[@]:A}")
fi
fi
if (( ! ${#zfunctions} )); then
@ -316,7 +321,7 @@ _zimfw_clean_compiled() {
if (( _zprintlevel > 0 )) zopt='-v'
command rm -f ${zopt} ${^zscriptdirs}/**/*.zwc(|.old)(N) || return 1
command rm -f ${zopt} ${ZDOTDIR:-${HOME}}/.z(shenv|profile|shrc|login|logout).zwc(|.old)(N) || return 1
_zimfw_print -P 'Done with clean-compiled. Run %Bzimfw compile%b to re-compile.'
_zimfw_print -P 'Done with clean-compiled. Restart your terminal or run %Bzimfw compile%b to re-compile.'
}
_zimfw_clean_dumpfile() {
@ -334,7 +339,7 @@ _zimfw_compile() {
}
_zimfw_info() {
print -R 'zimfw version: '${_zversion}' (built at 2021-08-10 03:26:13 UTC, previous commit is f6b623f)'
print -R 'zimfw version: '${_zversion}' (built at 2021-08-10 14:52:54 UTC, previous commit is 35cd6f5)'
print -R 'ZIM_HOME: '${ZIM_HOME}
print -R 'Zsh version: '${ZSH_VERSION}
print -R 'System info: '$(command uname -a)
@ -449,7 +454,7 @@ download_tarball() {
repo=\${match[4]%.git}
fi
if [[ \${host} != github.com || -z \${repo} ]]; then
print_error \"\${URL} is not a valid github.com URL. Will not try to \${ACTION}.\"
print_error \"\${URL} is not a valid GitHub URL. Will not try to \${ACTION}.\"
return 1
fi
local -r headers_target=\${DIR}/\${TEMP}_headers
@ -522,7 +527,7 @@ create_dir() {
case \${ACTION} in
install)
{
create_dir \${DIR} && download_tarball && untar_tarball \${DIR} && print_done installed
create_dir \${DIR} && download_tarball && untar_tarball \${DIR} && print_okay installed
} always {
# return 1 does not change \${TRY_BLOCK_ERROR}, only changes \${?}
(( TRY_BLOCK_ERROR = ? ))
@ -656,7 +661,7 @@ esac
}
zimfw() {
local -r _zversion='1.5.0-SNAPSHOT' zusage="Usage: %B${0}%b <action> [%B-q%b|%B-v%b]
local -r _zversion='1.5.0' zusage="Usage: %B${0}%b <action> [%B-q%b|%B-v%b]
Actions:
%Bbuild%b Build %Binit.zsh%b and %Blogin_init.zsh%b
@ -670,8 +675,8 @@ Actions:
%Buninstall%b Delete unused modules
(prompts for confirmation)
%Bupdate%b Update current modules
%Bupgrade%b Upgrade %Bzimfw%b
%Bversion%b Print Zim version
%Bupgrade%b Upgrade zimfw
%Bversion%b Print zimfw version
Options:
%B-q%b Quiet (yes to prompts, and