summaryrefslogtreecommitdiffstats
path: root/Completion/compinit
diff options
context:
space:
mode:
authordana <dana@dana.is>2026-05-02 14:06:50 -0500
committerdana <dana@dana.is>2026-05-02 14:09:17 -0500
commitb40b7e908aa3df8716a1be1e1958a7a3f2ca57ab (patch)
treee27e01b9ba2506e172226eb926c034f0b8ca70a2 /Completion/compinit
parentunposted: tests: add basic tests for _describe (diff)
downloadzsh-b40b7e908aa3df8716a1be1e1958a7a3f2ca57ab.tar
zsh-b40b7e908aa3df8716a1be1e1958a7a3f2ca57ab.tar.gz
zsh-b40b7e908aa3df8716a1be1e1958a7a3f2ca57ab.tar.bz2
zsh-b40b7e908aa3df8716a1be1e1958a7a3f2ca57ab.tar.lz
zsh-b40b7e908aa3df8716a1be1e1958a7a3f2ca57ab.tar.xz
zsh-b40b7e908aa3df8716a1be1e1958a7a3f2ca57ab.tar.zst
zsh-b40b7e908aa3df8716a1be1e1958a7a3f2ca57ab.zip
54423 (tweaked): compinit: improve and document -w
also add new-line after compaudit prompt tweaked -D/-w exclusions in _compinit
Diffstat (limited to 'Completion/compinit')
-rw-r--r--Completion/compinit10
1 files changed, 8 insertions, 2 deletions
diff --git a/Completion/compinit b/Completion/compinit
index 60dbb599d..f1280fc60 100644
--- a/Completion/compinit
+++ b/Completion/compinit
@@ -461,6 +461,7 @@ if [[ -n "$_i_check" ]]; then
if ! read -q \
"?zsh compinit: insecure $_i_q, run compaudit for list.
Ignore insecure $_i_q and continue [y] or abort compinit [n]? "; then
+ print -u2
print -u2 "$0: initialization aborted"
unfunction compinit compdef
unset _comp_dumpfile _comp_secure compprefuncs comppostfuncs \
@@ -468,6 +469,7 @@ Ignore insecure $_i_q and continue [y] or abort compinit [n]? "; then
return 1
fi
+ print -u2
fi
fpath=(${fpath:|_i_wdirs})
(( $#_i_wfiles )) && _i_files=( "${(@)_i_files:#(${(j:|:)_i_wfiles%.zwc})}" )
@@ -484,6 +486,8 @@ autoload -RUz compdump compinstall
_i_done=''
+[[ _i_why -eq 1 ]] && print -ru2 "Using dump file: $_comp_dumpfile"
+
if [[ -f "$_comp_dumpfile" ]]; then
if [[ -n "$_i_check" ]]; then
IFS=$' \t' read -rA _i_line < "$_comp_dumpfile"
@@ -493,7 +497,7 @@ if [[ -f "$_comp_dumpfile" ]]; then
builtin . "$_comp_dumpfile"
_i_done=yes
elif [[ _i_why -eq 1 ]]; then
- print -nu2 "Loading dump file skipped, regenerating"
+ print -nu2 "Loading dump file skipped"
local pre=" because: "
if [[ _i_autodump -ne 1 ]]; then
print -nu2 $pre"-D flag given"
@@ -513,8 +517,9 @@ if [[ -f "$_comp_dumpfile" ]]; then
_i_done=yes
fi
elif [[ _i_why -eq 1 ]]; then
- print -u2 "No existing compdump file found, regenerating"
+ print -u2 "No existing dump file found"
fi
+
if [[ -z "$_i_done" ]]; then
typeset -A _i_test
@@ -547,6 +552,7 @@ if [[ -z "$_i_done" ]]; then
# If autodumping was requested, do it now.
if [[ $_i_autodump = 1 ]]; then
+ [[ _i_why -eq 1 ]] && print -u2 "Regenerating dump file"
compdump
fi
fi