1
0
Fork 0
mirror of synced 2024-12-04 21:15:35 -05:00

Compare commits

..

1 commit

Author SHA1 Message Date
Dawn Magnet
3d952e6032
Merge 0f2d2f06c1 into 923014aea4 2024-11-25 09:09:26 -05:00
8 changed files with 28 additions and 30 deletions

View file

@ -7,9 +7,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
## [Unreleased]
### Added
- Also list not installed modules with `list` action, when not in verbose mode.
_No unreleased changes._
## [1.16.0] - 2024-11-25

View file

@ -206,8 +206,10 @@ Per-call initialization options:
esac
shift
done
_znames+=(${zname})
if (( _zeager )); then
if (( _zflags & 1 )); then
_znames+=(${zname})
fi
if (( _zflags & 2 )); then
if [[ ! -e ${zroot_dir} ]]; then
print -u2 -R "${_zerror}${funcfiletrace[1]}:${_zbold}${zname}: ${zroot_dir}${_znormalred} not found${_znormal}"
_zfailed=1

View file

@ -1,13 +1,13 @@
_zimfw_source_zimrc() {
<%= render_all("src/functions/*.erb") %>
{
local -ri _zeager=${1}
local -r _zflags=${1}
local -i _zfailed=0
if ! source ${_zconfig} || (( _zfailed )); then
print -u2 -R "${_zred}Failed to source ${_zbold}${_zconfig}${_znormal}"
return 1
fi
if (( ${#_znames} == 0 )); then
if (( _zflags & 1 && ${#_znames} == 0 )); then
print -u2 -R "${_zred}No modules defined in ${_zbold}${_zconfig}${_znormal}"
return 1
fi

View file

@ -2,7 +2,6 @@ _zimfw_run_list() {
local -r zname=${1}
local -r zdir=${_zdirs[${zname}]}
print -nR "${_zbold}${zname}:${_znormal} ${zdir}"
if [[ ! -e ${zdir} ]] print -n ' (not installed)'
if [[ -z ${_zurls[${zname}]} ]] print -n ' (external)'
if (( ${_zfrozens[${zname}]} )) print -n ' (frozen)'
if (( ${_zdisabled_root_dirs[(I)${zdir}]} )) print -n ' (disabled)'

View file

@ -1,7 +1,7 @@
_zimfw_run_tool_action() {
local -i zmaxprocs=0
if [[ ${1} == reinstall ]] zmaxprocs=1
_zimfw_source_zimrc 0 || return 1
_zimfw_source_zimrc 1 || return 1
zargs -n 2 -P ${zmaxprocs} -- "${_znames[@]}" -- _zimfw_run_tool ${1}
return 0
}

View file

@ -72,7 +72,7 @@ Options:
local _zrestartmsg=' Restart your terminal for changes to take effect.'
case ${1} in
build)
_zimfw_source_zimrc 1 && _zimfw_build || return 1
_zimfw_source_zimrc 2 && _zimfw_build || return 1
(( _zprintlevel-- ))
_zimfw_compile
;;
@ -84,9 +84,8 @@ Options:
help) print -R ${zusage} ;;
info) _zimfw_info ;;
list)
_zimfw_source_zimrc $(( _zprintlevel > 1 )) && \
zargs -n 1 -- "${_znames[@]}" -- _zimfw_run_list && \
_zimfw_list_unuseds ' (unused)'
_zimfw_source_zimrc 3 && zargs -n 1 -- "${_znames[@]}" -- _zimfw_run_list && \
_zimfw_list_unuseds ' (unused)'
;;
check)
_zrestartmsg=
@ -99,13 +98,13 @@ Options:
_zimfw_run_tool_action install || return 1
(( _zprintlevel-- ))
_zimfw_print 'Done with install.' # Only printed in verbose mode
_zimfw_source_zimrc 1 && _zimfw_build && _zimfw_compile
_zimfw_source_zimrc 2 && _zimfw_build && _zimfw_compile
;;
install|update|reinstall)
_zimfw_run_tool_action ${1} || return 1
_zimfw_print -R "Done with ${1}.${_zrestartmsg}"
(( _zprintlevel-- ))
_zimfw_source_zimrc 1 && _zimfw_build && _zimfw_compile
_zimfw_source_zimrc 2 && _zimfw_build && _zimfw_compile
;;
uninstall) _zimfw_source_zimrc 0 && _zimfw_list_unuseds && _zimfw_uninstall ;;
check-version) _zimfw_check_version 1 ;;

View file

@ -4,7 +4,7 @@ class Zim
:bold, :normal, :red, :normalred, :yellow, :normalyellow, :clear_line, :ellipsis, :okay, :warn, :error
def initialize
@version = "1.17.0-SNAPSHOT"
@version = "1.16.0"
@home = "${ZDOTDIR:-${HOME}}"
@min_zsh_version = "5.2"
# Matches {ssh,http,https,git}://{user@,}host/org/repo and {user@,}host:org/repo

View file

@ -325,8 +325,10 @@ Per-call initialization options:
esac
shift
done
_znames+=(${zname})
if (( _zeager )); then
if (( _zflags & 1 )); then
_znames+=(${zname})
fi
if (( _zflags & 2 )); then
if [[ ! -e ${zroot_dir} ]]; then
print -u2 -R "${_zerror}${funcfiletrace[1]}:${_zbold}${zname}: ${zroot_dir}${_znormalred} not found${_znormal}"
_zfailed=1
@ -360,13 +362,13 @@ Per-call initialization options:
}
{
local -ri _zeager=${1}
local -r _zflags=${1}
local -i _zfailed=0
if ! source ${_zconfig} || (( _zfailed )); then
print -u2 -R "${_zred}Failed to source ${_zbold}${_zconfig}${_znormal}"
return 1
fi
if (( ${#_znames} == 0 )); then
if (( _zflags & 1 && ${#_znames} == 0 )); then
print -u2 -R "${_zred}No modules defined in ${_zbold}${_zconfig}${_znormal}"
return 1
fi
@ -468,7 +470,7 @@ _zimfw_info() {
_zimfw_info_print_symlink ZIM_HOME ${ZIM_HOME}
_zimfw_info_print_symlink 'zimfw config' ${_zconfig}
_zimfw_info_print_symlink 'zimfw script' ${__ZIMFW_FILE}
print -R 'zimfw version: '${_zversion}' (built at 2024-11-27 23:56:10 UTC, previous commit is e9279aa)'
print -R 'zimfw version: '${_zversion}' (built at 2024-11-25 13:50:33 UTC, previous commit is 2d5718e)'
local zparam
for zparam in LANG ${(Mk)parameters:#LC_*} OSTYPE TERM TERM_PROGRAM TERM_PROGRAM_VERSION ZSH_VERSION; do
print -R ${(r.22....:.)zparam}${(P)zparam}
@ -532,7 +534,6 @@ _zimfw_run_list() {
local -r zname=${1}
local -r zdir=${_zdirs[${zname}]}
print -nR "${_zbold}${zname}:${_znormal} ${zdir}"
if [[ ! -e ${zdir} ]] print -n ' (not installed)'
if [[ -z ${_zurls[${zname}]} ]] print -n ' (external)'
if (( ${_zfrozens[${zname}]} )) print -n ' (frozen)'
if (( ${_zdisabled_root_dirs[(I)${zdir}]} )) print -n ' (disabled)'
@ -951,7 +952,7 @@ _zimfw_run_tool() {
_zimfw_run_tool_action() {
local -i zmaxprocs=0
if [[ ${1} == reinstall ]] zmaxprocs=1
_zimfw_source_zimrc 0 || return 1
_zimfw_source_zimrc 1 || return 1
zargs -n 2 -P ${zmaxprocs} -- "${_znames[@]}" -- _zimfw_run_tool ${1}
return 0
}
@ -964,7 +965,7 @@ zimfw() {
local -r _znormal= _zbold= _zred= _znormalred= _zgreen= _zyellow= _znormalyellow=
fi
local -r _zerror="${_zred}x " _zokay="${_zgreen}) ${_znormal}" _zwarn="${_zyellow}! "
local -r _zconfig=${ZIM_CONFIG_FILE:-${ZDOTDIR:-${HOME}}/.zimrc} _zversion='1.17.0-SNAPSHOT'
local -r _zconfig=${ZIM_CONFIG_FILE:-${ZDOTDIR:-${HOME}}/.zimrc} _zversion='1.16.0'
local -r zusage="Usage: ${_zbold}${0}${_znormal} <action> [${_zbold}-q${_znormal}|${_zbold}-v${_znormal}]
Actions:
@ -1030,7 +1031,7 @@ Options:
local _zrestartmsg=' Restart your terminal for changes to take effect.'
case ${1} in
build)
_zimfw_source_zimrc 1 && _zimfw_build || return 1
_zimfw_source_zimrc 2 && _zimfw_build || return 1
(( _zprintlevel-- ))
_zimfw_compile
;;
@ -1042,9 +1043,8 @@ Options:
help) print -R ${zusage} ;;
info) _zimfw_info ;;
list)
_zimfw_source_zimrc $(( _zprintlevel > 1 )) && \
zargs -n 1 -- "${_znames[@]}" -- _zimfw_run_list && \
_zimfw_list_unuseds ' (unused)'
_zimfw_source_zimrc 3 && zargs -n 1 -- "${_znames[@]}" -- _zimfw_run_list && \
_zimfw_list_unuseds ' (unused)'
;;
check)
_zrestartmsg=
@ -1057,13 +1057,13 @@ Options:
_zimfw_run_tool_action install || return 1
(( _zprintlevel-- ))
_zimfw_print 'Done with install.' # Only printed in verbose mode
_zimfw_source_zimrc 1 && _zimfw_build && _zimfw_compile
_zimfw_source_zimrc 2 && _zimfw_build && _zimfw_compile
;;
install|update|reinstall)
_zimfw_run_tool_action ${1} || return 1
_zimfw_print -R "Done with ${1}.${_zrestartmsg}"
(( _zprintlevel-- ))
_zimfw_source_zimrc 1 && _zimfw_build && _zimfw_compile
_zimfw_source_zimrc 2 && _zimfw_build && _zimfw_compile
;;
uninstall) _zimfw_source_zimrc 0 && _zimfw_list_unuseds && _zimfw_uninstall ;;
check-version) _zimfw_check_version 1 ;;