1
0
mirror of https://github.com/go-task/task.git synced 2025-03-17 21:08:01 +02:00

Fix Zsh completion for tasks without description

Use --list-all instead of --list in order include tasks without
description in the auto-completion.
This commit is contained in:
Carl Smedstad 2022-07-10 01:43:47 +02:00
parent 4b2b713e59
commit 5d24e166ab
No known key found for this signature in database
GPG Key ID: 5EED78D7F779E010

View File

@ -27,7 +27,7 @@ function __task_list() {
(( enabled )) || return 0
scripts=()
for item in "${(@)${(f)$("${cmd[@]}" --list)}[2,-1]#\* }"; do
for item in "${(@)${(f)$("${cmd[@]}" --list-all)}[2,-1]#\* }"; do
task="${item%%:[[:space:]]*}"
desc="${item##[^[:space:]]##[[:space:]]##}"
scripts+=( "${task//:/\\:}:$desc" )