Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion doc/zsdoc/zinit-autoload.zsh.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -842,7 +842,7 @@ ____
Has 21 line(s). Calls functions:

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

Uses feature(s): _setopt_

Expand Down
2 changes: 1 addition & 1 deletion doc/zsdoc/zinit.zsh.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -232,6 +232,7 @@ Called by:
zinit-additional.zsh/.zinit-debug-status
zinit-additional.zsh/.zinit-debug-stop
zinit-additional.zsh/:zinit-tmp-subst-source
zinit-autoload.zsh/.zinit-list-plugins
zinit-autoload.zsh/.zinit-unload

==== +zinit-deploy-message
Expand Down Expand Up @@ -281,7 +282,6 @@ Called by:
zinit-autoload.zsh/.zinit-confirm
zinit-autoload.zsh/.zinit-delete
zinit-autoload.zsh/.zinit-glance
zinit-autoload.zsh/.zinit-list-plugins
zinit-autoload.zsh/.zinit-self-update
zinit-autoload.zsh/.zinit-show-zstatus
zinit-autoload.zsh/.zinit-uninstall-completions
Expand Down
9 changes: 9 additions & 0 deletions tests/commands.zunit
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
@setup {
ZBIN="${ZPFX}/bin"
}

@test 'delete --help' {
run zinit delete --help
assert $output contains 'zinit delete [options] [plugins...]'
Expand All @@ -35,4 +36,12 @@
assert $state equals 0
}

@test 'plugins' {
run zinit plugins
assert $output contains 'Plugins'
assert $output contains 'Unloaded: '
assert $output contains 'Loaded: '
assert $state equals 0
}

# vim:ft=zsh:sw=2:sts=2:et:foldmarker={,}:foldmethod=marker
10 changes: 5 additions & 5 deletions zinit-autoload.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -1554,20 +1554,20 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
keyword="${keyword## ##}"
keyword="${keyword%% ##}"
if [[ -n "$keyword" ]]; then
+zinit-message "{i} Installed plugins matching {info}$keyword{rst}:"
+zi-log "{i} Installed plugins matching {info}$keyword{rst}:"
filtered=( "${(M)ZINIT[@]:#STATES__*$keyword*}" )
else
filtered=(${${(M)${(k)ZINIT[@]}:##STATES__*}//[A-Z]*__/})
fi
local i
+zinit-message '{m} {b}Plugins{rst}'
+zi-log '{m} {b}Plugins{rst}'
for i in "${(o)filtered[@]}"; do
[[ "$i" = "local/zinit" ]] && continue
local is_loaded='{error}U'
(( "ZINIT[STATES__$i]" )) && is_loaded="{happy}L"
+zinit-message -C2 -- $is_loaded{rst} $i
(( ZINIT[STATES__${i}] )) && is_loaded="{happy}L"
+zi-log -C2 -- $is_loaded{rst} $i
done
+zinit-message -- '{nl}Loaded: {happy}L{rst} | Unloaded: {error}U{rst}'
+zi-log -- '{nl}Loaded: {happy}L{rst} | Unloaded: {error}U{rst}'
} # ]]]
# FUNCTION: .zinit-list-snippets [[[
.zinit-list-snippets() {
Expand Down
3 changes: 3 additions & 0 deletions zinit.zsh
Original file line number Diff line number Diff line change
Expand Up @@ -3295,9 +3295,12 @@ if [[ -e ${${ZINIT[BIN_DIR]}}/zmodules/Src/zdharma/zplugin.so ]] {

# create so that for sure no warncreateglobal warning is issued
typeset -g REPLY
typeset -ga reply

# a searchable menu of tags for current directory
zinit null light-mode autoload'zi-browse-symbol' for %$ZINIT[BIN_DIR]
ZINIT_REGISTERED_PLUGINS[-1]=()

zle -N zi-browse-symbol
zle -N zi-browse-symbol-backwards zi-browse-symbol
zle -N zi-browse-symbol-pbackwards zi-browse-symbol
Expand Down