Skip to content

File tree

4 files changed

+19
-0
lines changed

4 files changed

+19
-0
lines changed

completions/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,7 @@ bashcomp_DATA = 2to3 \
208208
jshint \
209209
json_xs \
210210
jsonschema \
211+
_jungle \
211212
k3b \
212213
kcov \
213214
_keyring \

completions/_jungle

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
# 3rd party completion loader for commands emitting -*- shell-script -*-
2+
# their completion using "_${cmdname^^}_COMPLETE=source $cmd".
3+
# This pattern is very similar to `completions/_pipenv`, but the value of the
4+
# environment variable is slightly different.
5+
#
6+
# This serves as a fallback in case the completion is not installed otherwise.
7+
8+
eval -- "$(
9+
# shellcheck disable=SC2154
10+
ucname="${cmdname^^}"
11+
ucname=${ucname//-/_}
12+
export "_${ucname}_COMPLETE=source"
13+
"$1" 2>/dev/null
14+
)"
15+
16+
# ex: filetype=sh

test/fallback/completions/Makefile.am

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ EXTRA_DIST = \
1414
hexdump \
1515
hwclock \
1616
ionice \
17+
jungle \
1718
keyring \
1819
kontena \
1920
look \

test/fallback/completions/jungle

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

0 commit comments

Comments
 (0)