1
0
mirror of https://github.com/go-task/task.git synced 2024-12-14 10:52:43 +02:00

Merge pull request #182 from GuillaumeAmat/fix-completion

Fix the zsh completion with sub-tasks
This commit is contained in:
Andrey Nering 2019-03-04 21:39:43 -03:00 committed by GitHub
commit f9330f6cd9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

3
completion/zsh/_task Normal file → Executable file
View File

@ -5,7 +5,7 @@ function __list() {
local -a scripts
if [ -f Taskfile.yml ]; then
scripts=($(task -l | sed '1d' | sed 's/://' | awk '{ print $2 }'))
scripts=($(task -l | sed '1d' | sed 's/^\* //' | awk '{ print $1 }' | sed 's/:$//' | sed 's/:/\\:/'))
_describe 'script' scripts
fi
}
@ -23,3 +23,4 @@ _arguments \
'(-w --watch)'{-w,--watch} \
'(- *)'{-h,--help} \
'*: :__list' \