File tree Expand file tree Collapse file tree 3 files changed +30
-3
lines changed
Expand file tree Collapse file tree 3 files changed +30
-3
lines changed Original file line number Diff line number Diff line change 5252 using ` for ` loops in Taskfiles (#2576 by @vmaerten ).
5353- Added ` --remote-cache-dir ` flag and ` remote.cache-dir ` taskrc option to
5454 customize the cache directory for Remote Taskfiles (#2572 by @vmaerten ).
55+ - Zsh completion now supports zstyle verbose option to show or hide task
56+ descriptions (#2571 by @vmaerten ).
5557
5658## v3.45.5 - 2025-11-11
5759
Original file line number Diff line number Diff line change @@ -45,12 +45,27 @@ function __task_list() {
4545 (( enabled )) || return 0
4646
4747 scripts=()
48+
49+ # Read zstyle verbose option (default = true via -T)
50+ local show_desc
51+ zstyle -T ":completion:${curcontext}:" verbose && show_desc=true || show_desc=false
52+
4853 for item in "${(@)${(f)output}[2,-1]#\* }"; do
4954 task="${item%%:[[:space:]]*}"
50- desc="${item##[^[:space:]]##[[:space:]]##}"
51- scripts+=( "${task//:/\\:}:$desc" )
55+
56+ if [[ "$show_desc" == "true" ]]; then
57+ local desc="${item##[^[:space:]]##[[:space:]]##}"
58+ scripts+=( "${task//:/\\:}:$desc" )
59+ else
60+ scripts+=( "$task" )
61+ fi
5262 done
53- _describe 'Task to run' scripts
63+
64+ if [[ "$show_desc" == "true" ]]; then
65+ _describe 'Task to run' scripts
66+ else
67+ compadd -Q -a scripts
68+ fi
5469}
5570
5671_task() {
Original file line number Diff line number Diff line change @@ -384,3 +384,13 @@ task --completion fish > ~/.config/fish/completions/task.fish
384384```
385385
386386:::
387+
388+ ### Zsh customization
389+
390+ The Zsh completion supports the standard ` verbose ` zstyle to control whether task
391+ descriptions are shown. By default, descriptions are displayed. To show only task
392+ names without descriptions, add this to your ` ~/.zshrc ` (after the completion is loaded):
393+
394+ ``` shell
395+ zstyle ' :completion:*:*:task:*' verbose false
396+ ```
You can’t perform that action at this time.
0 commit comments