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)



I've just noticed this changes the parameters completion, and I think
this is quite a big change to the default experience. Especially
considering this was originally added as "extra-verbose" in
587cced35d9  48513: Let extra-verbose completion show parameter values
which was then downgraded to "verbose" (but default off) in
b41dd30c90 51761: Use zstyle verbose for _parameters descriptions

If we want to have verbose consistently enabled, maybe it's better to
change _parameters back to extra-verbose? (despite the rationale given
in 51761).

On Thu, Feb 12, 2026 at 3:18 PM Jun. T <takimoto-j@xxxxxxxxxxxxxxxxx> wrote:
>
>
> > 2026/02/04 18:08, I wrote:
> >
> > Is the verbose style set by default?
>
> The default value is on for 'zstyle -T' but off for 'zstyle -t'.
> There are several places where 'zstyle -t context verbose' is used.
> I think it's better to replace them with -T (to be consistent with
> the man page).
>
>  Completion/Unix/Command/_find    | 2 +-
>  Completion/Unix/Command/_git     | 2 +-
>  Completion/Unix/Command/_iftop   | 2 +-
>  Completion/Unix/Command/_tcpdump | 2 +-
>  Completion/Zsh/Type/_globquals   | 4 ++--
>  Completion/Zsh/Type/_parameters  | 2 +-
>  6 files changed, 7 insertions(+), 7 deletions(-)
>
>
> diff --git a/Completion/Unix/Command/_find b/Completion/Unix/Command/_find
> index 95e4fac4e..4908cabbc 100644
> --- a/Completion/Unix/Command/_find
> +++ b/Completion/Unix/Command/_find
> @@ -158,7 +158,7 @@ _arguments -C $args \
>  if [[ $state = times ]]; then
>    if ! compset -P '[+-]' || [[ -prefix '[0-9]' ]]; then
>      compstate[list]+=' packed'
> -    if zstyle -t ":completion:${curcontext}:senses" verbose; then
> +    if zstyle -T ":completion:${curcontext}:senses" verbose; then
>        zstyle -s ":completion:${curcontext}:senses" list-separator sep || sep=--
>        default=" [default exactly]"
>        disp=( "+ $sep before (older files)" "- $sep since (newer files)" )
> diff --git a/Completion/Unix/Command/_git b/Completion/Unix/Command/_git
> index 8d2239cba..69d3ab609 100644
> --- a/Completion/Unix/Command/_git
> +++ b/Completion/Unix/Command/_git
> @@ -1674,7 +1674,7 @@ _git-reset () {
>    case $state in
>      (file)
>        local tree=HEAD
> -      if zstyle -t :completion:${curcontext}: verbose; then
> +      if zstyle -T :completion:${curcontext}: verbose; then
>          if ! tree=$(_call_program headed git rev-parse --verify HEAD); then
>            # well-known sha1 of the empty tree
>            tree=4b825dc642cb6eb9a060e54bf8d69288fbee4904
> diff --git a/Completion/Unix/Command/_iftop b/Completion/Unix/Command/_iftop
> index 05db3fa03..4e6633083 100644
> --- a/Completion/Unix/Command/_iftop
> +++ b/Completion/Unix/Command/_iftop
> @@ -4,7 +4,7 @@ _interfaces () {
>    local disp expl sep
>    _description interfaces expl 'network interface'
>    _net_interfaces "$expl[@]"
> -  if zstyle -t ":completion:${curcontext}:interfaces" verbose; then
> +  if zstyle -T ":completion:${curcontext}:interfaces" verbose; then
>      zstyle -s ":completion:${curcontext}:interfaces" list-separator sep || sep=--
>      disp=( "any $sep capture on all interfaces" )
>      compadd "$expl[@]" -ld disp any
> diff --git a/Completion/Unix/Command/_tcpdump b/Completion/Unix/Command/_tcpdump
> index 9aad84d7b..7047b2d34 100644
> --- a/Completion/Unix/Command/_tcpdump
> +++ b/Completion/Unix/Command/_tcpdump
> @@ -13,7 +13,7 @@ _tcpdump_interfaces() {
>    else
>      _description interfaces expl 'network interface'
>      _net_interfaces "$expl[@]"
> -    if zstyle -t ":completion:${curcontext}:interfaces" verbose; then
> +    if zstyle -T ":completion:${curcontext}:interfaces" verbose; then
>        zstyle -s ":completion:${curcontext}:interfaces" list-separator sep || sep=--
>        disp=( "any $sep capture on all interfaces" )
>        compadd "$expl[@]" -ld disp any
> diff --git a/Completion/Zsh/Type/_globquals b/Completion/Zsh/Type/_globquals
> index beb47ed30..c19e19f0b 100644
> --- a/Completion/Zsh/Type/_globquals
> +++ b/Completion/Zsh/Type/_globquals
> @@ -120,14 +120,14 @@ while [[ -n $PREFIX ]]; do
>        if ! compset -P '[Mwhmsd]' && [[ -z $PREFIX ]]; then
>         tdisp=( seconds minutes hours days weeks Months )
>         tmatch=( s m h d w M )
> -       if zstyle -t ":completion:${curcontext}:time-specifiers" verbose; then
> +       if zstyle -T ":completion:${curcontext}:time-specifiers" verbose; then
>           zstyle -s ":completion:${curcontext}:time-specifiers" list-separator sep || sep=--
>            print -v tdisp -f "%s ${sep//(#m)[%\\]/$MATCH$MATCH} %s" ${tmatch:^^tdisp}
>         fi
>         alts+=( "time-specifiers:time specifier:compadd -E 0 -d tdisp -S '' -a tmatch" )
>        fi
>        if ! compset -P '[-+]' && [[ -z $PREFIX ]]; then
> -       if zstyle -t ":completion:${curcontext}:senses" verbose; then
> +       if zstyle -T ":completion:${curcontext}:senses" verbose; then
>           zstyle -s ":completion:${curcontext}:senses" list-separator sep || sep=--
>           default=" [default exactly]"
>            sdisp=( "+ $sep before (older files)" "- $sep since (newer files)" )
> diff --git a/Completion/Zsh/Type/_parameters b/Completion/Zsh/Type/_parameters
> index 7b7692a3c..f8b8ef001 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" verbose; then
>    described=(
>        "${(@M)${(@k)parameters[(R)$~pattern[2]~*(hideval|local|special)*]}:#$~pfilt*}"
>    )
>
>
>


-- 
Mikael Magnusson




Messages sorted by: Reverse Date, Date, Thread, Author