Skip to content

Commit

Permalink
feat(keyring): add fallback 3rd party completion loader
Browse files Browse the repository at this point in the history
  • Loading branch information
scop committed Aug 4, 2023
1 parent 9e4a48f commit 8082602
Show file tree
Hide file tree
Showing 4 changed files with 12 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 @@ -210,6 +210,7 @@ bashcomp_DATA = 2to3 \
jsonschema \
k3b \
kcov \
_keyring \
kill \
killall \
kldload \
Expand Down
9 changes: 9 additions & 0 deletions completions/_keyring
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# 3rd party completion loader for commands emitting -*- shell-script -*-
# their completion using "$cmd --print-completion bash".
# For example, many Python programs using https://github.com/iterative/shtab do.
#
# This serves as a fallback in case the completion is not installed otherwise.

eval -- "$("$1" --print-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 @@ -14,6 +14,7 @@ EXTRA_DIST = \
hexdump \
hwclock \
ionice \
keyring \
look \
mdbook \
mock \
Expand Down
1 change: 1 addition & 0 deletions test/fallback/completions/keyring

0 comments on commit 8082602

Please sign in to comment.