File tree Expand file tree Collapse file tree 4 files changed +17
-0
lines changed
test/fallback/completions Expand file tree Collapse file tree 4 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -216,6 +216,7 @@ bashcomp_DATA = 2to3 \
216
216
kldload \
217
217
kldunload \
218
218
koji \
219
+ _kontena \
219
220
ktutil \
220
221
larch \
221
222
lastlog \
Original file line number Diff line number Diff line change
1
+ # 3rd party completion loader for kontena -*- shell-script -*-
2
+ #
3
+ # This serves as a fallback in case the completion is not installed otherwise.
4
+
5
+ # To avoid sourcing an empty string with `. "$(...)"` on failing to obtain the
6
+ # path, we assign the output to a variable `_comp_cmd_kontena__completion_path`
7
+ # and test it before sourcing. The variable is removed on successful loading
8
+ # but left on a failure for the debugging purpose.
9
+ _comp_cmd_kontena__completion_path=$( " $1 " whoami --bash-completion-path 2> /dev/null) &&
10
+ [[ -r $_comp_cmd_kontena__completion_path ]] &&
11
+ . " $_comp_cmd_kontena__completion_path " &&
12
+ unset -v _comp_cmd_kontena__completion_path
13
+
14
+ # ex: filetype=sh
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ EXTRA_DIST = \
15
15
hwclock \
16
16
ionice \
17
17
keyring \
18
+ kontena \
18
19
look \
19
20
mdbook \
20
21
mock \
Original file line number Diff line number Diff line change
1
+ ../../../completions/_kontena
You can’t perform that action at this time.
0 commit comments