Skip to content

Commit 1bedb38

Browse files
committed
feat(tokio-console): add fallback 3rd party completion loader
1 parent b161be8 commit 1bedb38

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
@@ -428,6 +428,7 @@ bashcomp_DATA = 2to3 \
428428
tcpnice \
429429
timeout \
430430
tipc \
431+
_tokio-console \
431432
tox \
432433
tracepath \
433434
tree \

completions/_tokio-console

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 gen-completion bash".
3+
#
4+
# This serves as a fallback in case the completion is not installed otherwise.
5+
6+
eval -- "$("$1" gen-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
@@ -36,6 +36,7 @@ EXTRA_DIST = \
3636
svn \
3737
svnadmin \
3838
svnlook \
39+
tokio-console \
3940
udevadm \
4041
umount \
4142
umount.linux \
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
../../../completions/_tokio-console

0 commit comments

Comments
 (0)