Zsh Mailing List Archive
Messages sorted by:
Reverse Date,
Date,
Thread,
Author
Re: [PATCH] verbose style on by default (was Re: [PATCH] fix core dump by reverse-menu-complete)
> 2026/03/22 3:06、Mikael Magnusson <mikachu@xxxxxxxxx>のメール:
>
> Looking back a bit at the git history, and the commit message that
> added the "as it is by default" phrase:
> "unposted: rewritten compsys.yo down to end of _describe function" Mon
> Apr 14 20:10:00 2003
> I think it's likely that it was only meant to say that it is enabled
> for _describe by default,
Maybe, but the git log shows:
-The default value for this style is `true'.
+If set, as it is by default, the completion listing is more verbose.
and
The default value for this style is `true'
was added by
commit e025336f2f6d9f107ee1e03b9900f04af0544ba9
Author: Peter Stephenson <pws@xxxxxxxxxxxxxxxxxxxxx>
Date: Sat Apr 1 20:43:43 2000 +0000
This means the default value (described in the man page) has been
'true' for about 26 years.
> maybe we could just say something like
> "enabled by default except where otherwise noted" or something (and
> note it is off in _parameters)?
This is one possibility, but maybe we can use your first suggestion,
i.e., use extra-verbose in _parameters. I think this would not
confuse the users since the change verbose --> extra-verbose was made
after the release of zsh-5.9.
How about the patch below?
The extra-verbose is currently used only in _path_commands, and
I don't feel
% which <TAB>
is slow even if extra-verbose is true. So I removed the
'at the cost of a probable decrease in completion speed ....'
Are there any systems on which this is indeed 'slow'?
I added some notes in the description of the extra-verbose style
(we could add a notes for the _parameter function, but there is
no entry for the _path_commands function).
> While searching around for mentions of the verbose style I also came
> across this example, which is pretty useless in the present state:
> For example, many completion functions can generate matches in
> a simple and a verbose form and use the verbose style to decide
> which form should be used. To make all such functions use the verbose
> form, put
> zstyle ':completion:*' verbose yes
Is there any style (other than verbose) that is suitable as an example
of setting the style everywhere?
diff --git a/Completion/Unix/Type/_path_commands b/Completion/Unix/Type/_path_commands
index 59b146a88..489c47c71 100644
--- a/Completion/Unix/Type/_path_commands
+++ b/Completion/Unix/Type/_path_commands
@@ -57,7 +57,7 @@ _call_whatis() {
_path_commands() {
local need_desc expl ret=1
-if zstyle -t ":completion:${curcontext}:" extra-verbose; then
+if zstyle -t ":completion:${curcontext}:commands" extra-verbose; then
local update_policy first
if [[ $+_command_descriptions -eq 0 ]]; then
first=yes
diff --git a/Completion/Zsh/Type/_parameters b/Completion/Zsh/Type/_parameters
index f8b8ef001..d3893a942 100644
--- a/Completion/Zsh/Type/_parameters
+++ b/Completion/Zsh/Type/_parameters
@@ -16,7 +16,7 @@ zstyle -t ":completion:${curcontext}:parameters" prefix-needed &&
_description parameters expl parameter
zparseopts -D -K -E g:=pattern
-if zstyle -T ":completion:${curcontext}:parameters" verbose; then
+if zstyle -t ":completion:${curcontext}:parameters" extra-verbose; then
described=(
"${(@M)${(@k)parameters[(R)$~pattern[2]~*(hideval|local|special)*]}:#$~pfilt*}"
)
diff --git a/Doc/Zsh/compsys.yo b/Doc/Zsh/compsys.yo
index d9bf368d0..fbfccf82e 100644
--- a/Doc/Zsh/compsys.yo
+++ b/Doc/Zsh/compsys.yo
@@ -1375,9 +1375,12 @@ However, menu completion can be used to cycle through all matches.
)
kindex(extra-verbose, completion style)
item(tt(extra-verbose))(
-If set, the completion listing is more verbose at the cost of
-a probable decrease in completion speed. Completion performance
-will suffer if this style is set to `true'.
+If this style set to `true', the completion listing is still more verbose.
+
+Currently, it is used for tt(commands) and tt(parameters) tags.
+If it is `true' for the tt(commands) (or tt(parameters)) tag, short
+descriptions of the commands (or the values of the parameters) are
+displayed along with the command (or parameter) names.
)
kindex(fake, completion style)
item(tt(fake))(
Messages sorted by:
Reverse Date,
Date,
Thread,
Author