Skip to content

Commit 6239823

Browse files
committed
feat(task): add 3rd party fallback completion loader
https://taskfile.dev/installation/#setup-completions
1 parent 7cf1b3f commit 6239823

File tree

4 files changed

+11
-0
lines changed

4 files changed

+11
-0
lines changed

completions/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -437,6 +437,7 @@ cross_platform = 2to3 \
437437
sysbench \
438438
sysctl \
439439
tar \
440+
_task \
440441
tcpdump \
441442
tcpkill \
442443
tcpnice \

completions/_task

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# 3rd party completion loader for commands emitting -*- shell-script -*-
2+
# their completion using "$cmd --completion bash".
3+
#
4+
# This serves as a fallback in case the completion is not installed otherwise.
5+
6+
eval -- "$("$1" --completion bash 2>/dev/null)"
7+
8+
# ex: filetype=sh

test/fallback/completions/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,7 @@ EXTRA_DIST = \
5454
svn \
5555
svnadmin \
5656
svnlook \
57+
task \
5758
tokio-console \
5859
udevadm \
5960
umount \

test/fallback/completions/task

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../completions/_task

0 commit comments

Comments
 (0)