Skip to content

Commit 90ef9a2

Browse files
committed
feat(bombadil): add 3rd party fallback completion loader
https://github.com/oknozor/toml-bombadil#shell-completions
1 parent a342d3a commit 90ef9a2

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
@@ -32,6 +32,7 @@ cross_platform = 2to3 \
3232
badblocks \
3333
bind \
3434
bk \
35+
_bombadil \
3536
brctl \
3637
btdownloadheadless.py \
3738
bts \

completions/_bombadil

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 generate-completions bash".
3+
#
4+
# This serves as a fallback in case the completion is not installed otherwise.
5+
6+
eval -- "$("$1" generate-completions 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
@@ -1,6 +1,7 @@
11
EXTRA_DIST = \
22
argc \
33
adb \
4+
bombadil \
45
cal \
56
cargo \
67
chfn \

test/fallback/completions/bombadil

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

0 commit comments

Comments
 (0)