Skip to content

Commit

Permalink
feat(task): add 3rd party fallback completion loader
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Dec 25, 2024
1 parent 7cf1b3f commit 6239823
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions completions/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ cross_platform = 2to3 \
sysbench \
sysctl \
tar \
_task \
tcpdump \
tcpkill \
tcpnice \
Expand Down
8 changes: 8 additions & 0 deletions completions/_task
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# 3rd party completion loader for commands emitting -*- shell-script -*-
# their completion using "$cmd --completion bash".
#
# This serves as a fallback in case the completion is not installed otherwise.

eval -- "$("$1" --completion bash 2>/dev/null)"

# ex: filetype=sh
1 change: 1 addition & 0 deletions test/fallback/completions/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ EXTRA_DIST = \
svn \
svnadmin \
svnlook \
task \
tokio-console \
udevadm \
umount \
Expand Down
1 change: 1 addition & 0 deletions test/fallback/completions/task

0 comments on commit 6239823

Please sign in to comment.