Skip to content

Commit 58a694b

Browse files
545 bug bad math expression in zinit plugins on ubuntu 2204wsl2 (#559)
Co-authored-by: GitHub Actions <[email protected]>
1 parent 97b087e commit 58a694b

File tree

4 files changed

+16
-7
lines changed

4 files changed

+16
-7
lines changed

doc/zsdoc/zinit-autoload.zsh.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -842,7 +842,7 @@ ____
842842
Has 21 line(s). Calls functions:
843843

844844
.zinit-list-plugins
845-
`-- zinit.zsh/+zinit-message
845+
`-- zinit.zsh/+zi-log
846846

847847
Uses feature(s): _setopt_
848848

doc/zsdoc/zinit.zsh.adoc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,7 @@ Called by:
232232
zinit-additional.zsh/.zinit-debug-status
233233
zinit-additional.zsh/.zinit-debug-stop
234234
zinit-additional.zsh/:zinit-tmp-subst-source
235+
zinit-autoload.zsh/.zinit-list-plugins
235236
zinit-autoload.zsh/.zinit-unload
236237

237238
==== +zinit-deploy-message
@@ -281,7 +282,6 @@ Called by:
281282
zinit-autoload.zsh/.zinit-confirm
282283
zinit-autoload.zsh/.zinit-delete
283284
zinit-autoload.zsh/.zinit-glance
284-
zinit-autoload.zsh/.zinit-list-plugins
285285
zinit-autoload.zsh/.zinit-self-update
286286
zinit-autoload.zsh/.zinit-show-zstatus
287287
zinit-autoload.zsh/.zinit-uninstall-completions

tests/commands.zunit

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@
1010
@setup {
1111
ZBIN="${ZPFX}/bin"
1212
}
13+
1314
@test 'delete --help' {
1415
run zinit delete --help
1516
assert $output contains 'zinit delete [options] [plugins...]'
@@ -35,4 +36,12 @@
3536
assert $state equals 0
3637
}
3738

39+
@test 'plugins' {
40+
run zinit plugins
41+
assert $output contains 'Plugins'
42+
assert $output contains 'Unloaded: '
43+
assert $output contains 'Loaded: '
44+
assert $state equals 0
45+
}
46+
3847
# vim:ft=zsh:sw=2:sts=2:et:foldmarker={,}:foldmethod=marker

zinit-autoload.zsh

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1554,20 +1554,20 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
15541554
keyword="${keyword## ##}"
15551555
keyword="${keyword%% ##}"
15561556
if [[ -n "$keyword" ]]; then
1557-
+zinit-message "{i} Installed plugins matching {info}$keyword{rst}:"
1557+
+zi-log "{i} Installed plugins matching {info}$keyword{rst}:"
15581558
filtered=( "${(M)ZINIT[@]:#STATES__*$keyword*}" )
15591559
else
15601560
filtered=(${${(M)${(k)ZINIT[@]}:##STATES__*}//[A-Z]*__/})
15611561
fi
15621562
local i
1563-
+zinit-message '{m} {b}Plugins{rst}'
1563+
+zi-log '{m} {b}Plugins{rst}'
15641564
for i in "${(o)filtered[@]}"; do
15651565
[[ "$i" = "local/zinit" ]] && continue
15661566
local is_loaded='{error}U'
1567-
(( "ZINIT[STATES__$i]" )) && is_loaded="{happy}L"
1568-
+zinit-message -C2 -- $is_loaded{rst} $i
1567+
(( ZINIT[STATES__${i}] )) && is_loaded="{happy}L"
1568+
+zi-log -C2 -- $is_loaded{rst} $i
15691569
done
1570-
+zinit-message -- '{nl}Loaded: {happy}L{rst} | Unloaded: {error}U{rst}'
1570+
+zi-log -- '{nl}Loaded: {happy}L{rst} | Unloaded: {error}U{rst}'
15711571
} # ]]]
15721572
# FUNCTION: .zinit-list-snippets [[[
15731573
.zinit-list-snippets() {

0 commit comments

Comments
 (0)